1 /*************************************************************************** 2 * 3 * Project: OpenCPN 4 * 5 *************************************************************************** 6 * Copyright (C) 2019 by David S. Register * 7 * * 8 * This program is free software; you can redistribute it and/or modify * 9 * it under the terms of the GNU General Public License as published by * 10 * the Free Software Foundation; either version 2 of the License, or * 11 * (at your option) any later version. * 12 * * 13 * This program is distributed in the hope that it will be useful, * 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 16 * GNU General Public License for more details. * 17 * * 18 * You should have received a copy of the GNU General Public License * 19 * along with this program; if not, write to the * 20 * Free Software Foundation, Inc., * 21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 22 **************************************************************************/ 23 24 #pragma once 25 #ifndef _ABOUTFRAMEIMPL_H_ 26 #define _ABOUTFRAMEIMPL_H_ 27 28 #include "AboutFrame.h" 29 30 31 class AboutFrameImpl : public AboutFrame 32 { 33 protected: AboutFrameOnClose(wxCloseEvent & event)34 void AboutFrameOnClose(wxCloseEvent& event) { Hide(); SetSize(GetMinSize()); Centre(); event.Veto(); } OnLinkDonate(wxHyperlinkEvent & event)35 void OnLinkDonate( wxHyperlinkEvent& event ) { event.Skip(); } OnLinkGetInvolved(wxHyperlinkEvent & event)36 void OnLinkGetInvolved( wxHyperlinkEvent& event ) { event.Skip(); } OnLinkLogfile(wxHyperlinkEvent & event)37 void OnLinkLogfile( wxHyperlinkEvent& event ) { event.Skip(); } OnLinkConfigfile(wxHyperlinkEvent & event)38 void OnLinkConfigfile( wxHyperlinkEvent& event ) { event.Skip(); } 39 void OnLinkHelp( wxHyperlinkEvent& event ); 40 void OnLinkLicense( wxHyperlinkEvent& event ); 41 void OnLinkAuthors( wxHyperlinkEvent& event ); 42 void AboutFrameOnActivate( wxActivateEvent& event ); 43 #if wxUSE_WEBVIEW && defined(HAVE_WEBVIEW) m_btnBackOnButtonClick(wxCommandEvent & event)44 void m_btnBackOnButtonClick( wxCommandEvent& event ) { m_htmlWinHelp->GoBack(); m_btnBack->Enable(m_htmlWinHelp->CanGoBack()); } 45 #else m_btnBackOnButtonClick(wxCommandEvent & event)46 void m_btnBackOnButtonClick( wxCommandEvent& event ) { m_htmlWinHelp->HistoryBack(); m_btnBack->Enable(m_htmlWinHelp->HistoryCanBack()); } 47 #endif m_htmlWinHelpOnHtmlLinkClicked(wxHtmlLinkEvent & event)48 void m_htmlWinHelpOnHtmlLinkClicked( wxHtmlLinkEvent& event ) { m_btnBack->Enable(); event.Skip(); } 49 50 void RecalculateSize( void ); 51 52 public: ~AboutFrameImpl()53 ~AboutFrameImpl() {}; 54 55 AboutFrameImpl( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("About OpenCPN"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxCAPTION|wxCLOSE_BOX|wxFRAME_FLOAT_ON_PARENT|wxFRAME_NO_TASKBAR|wxRESIZE_BORDER|wxTAB_TRAVERSAL ); 56 }; 57 58 #endif // _ABOUTFRAMEIMPL_H_ 59