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
35class AboutFrameImpl : public AboutFrame {
36protected:
37 void AboutFrameOnClose(wxCloseEvent& event) {
38 Hide();
39 SetSize(GetMinSize());
40 Centre();
41 event.Veto();
42 }
43 void OnLinkDonate(wxHyperlinkEvent& event) { event.Skip(); }
44 void OnLinkGetInvolved(wxHyperlinkEvent& event) { event.Skip(); }
45 void OnLinkLogfile(wxHyperlinkEvent& event) { event.Skip(); }
46 void OnLinkConfigfile(wxHyperlinkEvent& event) { event.Skip(); }
47 void OnLinkHelp(wxHyperlinkEvent& event);
48 void OnLinkLicense(wxHyperlinkEvent& event);
49 void OnLinkAuthors(wxHyperlinkEvent& event);
50 void AboutFrameOnActivate(wxActivateEvent& event);
51#if wxUSE_WEBVIEW && defined(HAVE_WEBVIEW)
52 void m_btnBackOnButtonClick(wxCommandEvent& event) {
53 wxString locn = m_htmlWinHelp->GetCurrentURL();
54 if (!locn.Contains("toc_flat")) {
55 m_htmlWinHelp->GoBack();
56 m_btnBack->Enable(m_htmlWinHelp->CanGoBack());
57 }
58 }
59#else
60 void m_btnBackOnButtonClick(wxCommandEvent& event) {
61 m_htmlWinHelp->HistoryBack();
62 m_btnBack->Enable(m_htmlWinHelp->HistoryCanBack());
63 }
64#endif
65 void m_htmlWinHelpOnHtmlLinkClicked(wxHtmlLinkEvent& event) {
66 m_btnBack->Enable();
67 event.Skip();
68 }
69
70 void RecalculateSize(void);
71
72public:
73 ~AboutFrameImpl() {};
74
75 AboutFrameImpl(wxWindow* parent, wxWindowID id = wxID_ANY,
76 const wxString& title = _("About OpenCPN"),
77 const wxPoint& pos = wxDefaultPosition,
78 const wxSize& size = wxSize(500, 300),
79 long style = wxCAPTION | wxCLOSE_BOX |
80 wxFRAME_FLOAT_ON_PARENT | wxFRAME_NO_TASKBAR |
81 wxRESIZE_BORDER | wxTAB_TRAVERSAL);
82};
83
84#endif // _ABOUTFRAMEIMPL_H_
Implements the AboutFrame class with additional functionality.
Represents the main frame for the About dialog.
Definition AboutFrame.h:40