OpenCPN Partial API docs
Loading...
Searching...
No Matches
AboutFrameImpl.h
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
30class AboutFrameImpl : public AboutFrame {
31protected:
32 void AboutFrameOnClose(wxCloseEvent& event) {
33 Hide();
34 SetSize(GetMinSize());
35 Centre();
36 event.Veto();
37 }
38 void OnLinkDonate(wxHyperlinkEvent& event) { event.Skip(); }
39 void OnLinkGetInvolved(wxHyperlinkEvent& event) { event.Skip(); }
40 void OnLinkLogfile(wxHyperlinkEvent& event) { event.Skip(); }
41 void OnLinkConfigfile(wxHyperlinkEvent& event) { event.Skip(); }
42 void OnLinkHelp(wxHyperlinkEvent& event);
43 void OnLinkLicense(wxHyperlinkEvent& event);
44 void OnLinkAuthors(wxHyperlinkEvent& event);
45 void AboutFrameOnActivate(wxActivateEvent& event);
46#if wxUSE_WEBVIEW && defined(HAVE_WEBVIEW)
47 void m_btnBackOnButtonClick(wxCommandEvent& event) {
48 m_htmlWinHelp->GoBack();
49 m_btnBack->Enable(m_htmlWinHelp->CanGoBack());
50 }
51#else
52 void m_btnBackOnButtonClick(wxCommandEvent& event) {
53 m_htmlWinHelp->HistoryBack();
54 m_btnBack->Enable(m_htmlWinHelp->HistoryCanBack());
55 }
56#endif
57 void m_htmlWinHelpOnHtmlLinkClicked(wxHtmlLinkEvent& event) {
58 m_btnBack->Enable();
59 event.Skip();
60 }
61
62 void RecalculateSize(void);
63
64public:
66
67 AboutFrameImpl(wxWindow* parent, wxWindowID id = wxID_ANY,
68 const wxString& title = _("About OpenCPN"),
69 const wxPoint& pos = wxDefaultPosition,
70 const wxSize& size = wxSize(500, 300),
71 long style = wxCAPTION | wxCLOSE_BOX |
72 wxFRAME_FLOAT_ON_PARENT | wxFRAME_NO_TASKBAR |
73 wxRESIZE_BORDER | wxTAB_TRAVERSAL);
74};
75
76#endif // _ABOUTFRAMEIMPL_H_
Class AboutFrame.
Definition: AboutFrame.h:39