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// Constants
38
39#define ID_DIALOG 10001
40
41#define SYMBOL_ABOUT_TITLE _("About OpenCPN")
42
43#define ID_DONATE 10010
44#define ID_COPYINI 10011
45#define ID_COPYLOG 10012
46
47#define ID_NOTEBOOK_HELP 10002
48
49class About; // forward
50
51extern About* g_pAboutDlgLegacy;
52
58class About : public wxDialog {
59 DECLARE_EVENT_TABLE()
60
61public:
62 explicit About();
63 explicit About(wxWindow* parent, wxString License_Data_Locn,
64 std::function<void()> launch_local_help,
65 wxWindowID id = ID_DIALOG,
66 const wxString& caption = SYMBOL_ABOUT_TITLE,
67 const wxPoint& pos = wxDefaultPosition,
68 const wxSize& size = wxSize(500, 500),
69 long style = wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU |
70 wxCLOSE_BOX);
71 bool Create(wxWindow* parent, wxWindowID id = ID_DIALOG,
72 const wxString& caption = SYMBOL_ABOUT_TITLE,
73 const wxPoint& pos = wxDefaultPosition,
74 const wxSize& size = wxSize(500, 500),
75 long style = wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU |
76 wxCLOSE_BOX);
77
78 void RecalculateSize(void);
79
80private:
81 void CreateControls(void);
82 void Populate(void);
83 void OnXidOkClick(wxCommandEvent& event);
84 void OnNBPageChange(wxNotebookEvent& event);
85 void OnDonateClick(wxCommandEvent& event);
86 void OnCopyClick(wxCommandEvent& event);
87 void OnClose(wxCloseEvent& event);
88 void SetColorScheme(void);
89
90 wxString m_DataLocn;
91 wxWindow* m_parent;
92 std::function<void()> m_launch_local_help;
93 bool m_btips_loaded;
94 bool m_blicensePageSet;
95
96 wxPanel* itemPanelAbout;
97 wxPanel* itemPanelAuthors;
98 wxPanel* itemPanelLicense;
99 wxPanel* itemPanelTips;
100
101 wxNotebook* pNotebook;
102 wxHtmlWindow* pAboutHTMLCtl;
103 wxHtmlWindow* pLicenseHTMLCtl;
104 wxHtmlWindow* pAuthorHTMLCtl;
105
106 wxSize m_displaySize;
107};
108
109#endif // _ABOUT_H_
The OpenCPN About dialog displaying information including version, authors, license,...
Definition about.h:58