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