OpenCPN Partial API docs
Loading...
Searching...
No Matches
about_frame_impl.h
Go to the documentation of this file.
1/**************************************************************************
2 * Copyright (C) 2019 by David S. Register *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18 **************************************************************************/
19
25#pragma once
26#ifndef _ABOUTFRAMEIMPL_H_
27#define _ABOUTFRAMEIMPL_H_
28
29#include "about_frame.h"
30
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_
Class AboutFrame.
Extends AboutFrame, providing implementation for various event handlers and additional methods.
About dialog main frame, various controls to display information about OpenCPN.
Definition about_frame.h:57