OpenCPN Partial API docs
Loading...
Searching...
No Matches
about.h
Go to the documentation of this file.
1/**************************************************************************
2 * Copyright (C) 2010 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#ifndef _ABOUT_H_
25#define _ABOUT_H_
26
27#include <functional>
28
29#include <wx/dialog.h>
30#include <wx/event.h>
31#include <wx/html/htmlwin.h>
32#include <wx/notebook.h>
33#include <wx/panel.h>
34#include <wx/string.h>
35#include <wx/textctrl.h>
36
37#include "about_frame_impl.h"
38
39// Constants
40
41#define ID_DIALOG 10001
42
43#define SYMBOL_ABOUT_TITLE _("About OpenCPN")
44
45#define ID_DONATE 10010
46#define ID_COPYINI 10011
47#define ID_COPYLOG 10012
48
49#define ID_NOTEBOOK_HELP 10002
50
51class About; // forward
52
61class About : public wxDialog {
62 DECLARE_EVENT_TABLE()
63
64public:
65 explicit About();
66 explicit About(wxWindow* parent, wxString License_Data_Locn,
67 std::function<void()> launch_local_help,
68 wxWindowID id = ID_DIALOG,
69 const wxString& caption = SYMBOL_ABOUT_TITLE,
70 const wxPoint& pos = wxDefaultPosition,
71 const wxSize& size = wxSize(500, 500),
72 long style = wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU |
73 wxCLOSE_BOX);
74 bool Create(wxWindow* parent, wxWindowID id = ID_DIALOG,
75 const wxString& caption = SYMBOL_ABOUT_TITLE,
76 const wxPoint& pos = wxDefaultPosition,
77 const wxSize& size = wxSize(500, 500),
78 long style = wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU |
79 wxCLOSE_BOX);
80
81 void RecalculateSize(void);
82
83private:
84 void CreateControls(void);
85 void Populate(void);
86 void OnXidOkClick(wxCommandEvent& event);
87 void OnNBPageChange(wxNotebookEvent& event);
88 void OnDonateClick(wxCommandEvent& event);
89 void OnCopyClick(wxCommandEvent& event);
90 void OnClose(wxCloseEvent& event);
91 void SetColorScheme(void);
92
93 wxString m_DataLocn;
94 wxWindow* m_parent;
95 std::function<void()> m_launch_local_help;
96 bool m_btips_loaded;
97 bool m_blicensePageSet;
98
99 wxPanel* itemPanelAbout;
100 wxPanel* itemPanelAuthors;
101 wxPanel* itemPanelLicense;
102 wxPanel* itemPanelTips;
103
104 wxNotebook* pNotebook;
105 wxHtmlWindow* pAboutHTMLCtl;
106 wxHtmlWindow* pLicenseHTMLCtl;
107 wxHtmlWindow* pAuthorHTMLCtl;
108
109 wxSize m_displaySize;
110};
111
112#endif // _ABOUT_H_
AboutFrameImpl * g_pAboutDlg
Global instance.
Definition about.cpp:60
About * g_pAboutDlgLegacy
Global instance.
Definition about.cpp:59
Class AboutFrameImpl.
Extends AboutFrame, providing implementation for various event handlers and additional methods.
The OpenCPN About dialog displaying information including version, authors, license,...
Definition about.h:61