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, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18 **************************************************************************/
19
25#include <functional>
26
27#ifndef _ABOUT_H_
28#define _ABOUT_H_
29
30#include <wx/notebook.h>
31#include <wx/html/htmlwin.h>
32#include <wx/dialog.h>
33#include <wx/textctrl.h>
34
35// Constants
36
37#define ID_DIALOG 10001
38
39#define SYMBOL_ABOUT_TITLE _("About OpenCPN")
40
41#define ID_DONATE 10010
42#define ID_COPYINI 10011
43#define ID_COPYLOG 10012
44
45#define ID_NOTEBOOK_HELP 10002
46
52class About : public wxDialog {
53 DECLARE_EVENT_TABLE()
54
55public:
56 explicit About();
57 explicit About(wxWindow* parent, wxString License_Data_Locn,
58 std::function<void()> launch_local_help,
59 wxWindowID id = ID_DIALOG,
60 const wxString& caption = SYMBOL_ABOUT_TITLE,
61 const wxPoint& pos = wxDefaultPosition,
62 const wxSize& size = wxSize(500, 500),
63 long style = wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU |
64 wxCLOSE_BOX);
65 bool Create(wxWindow* parent, 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
72 void RecalculateSize(void);
73
74private:
75 void CreateControls(void);
76 void Populate(void);
77 void OnXidOkClick(wxCommandEvent& event);
78 void OnNBPageChange(wxNotebookEvent& event);
79 void OnDonateClick(wxCommandEvent& event);
80 void OnCopyClick(wxCommandEvent& event);
81 void OnClose(wxCloseEvent& event);
82 void SetColorScheme(void);
83
84 wxString m_DataLocn;
85 wxWindow* m_parent;
86 std::function<void()> m_launch_local_help;
87 bool m_btips_loaded;
88 bool m_blicensePageSet;
89
90 wxPanel* itemPanelAbout;
91 wxPanel* itemPanelAuthors;
92 wxPanel* itemPanelLicense;
93 wxPanel* itemPanelTips;
94
95 wxNotebook* pNotebook;
96 wxHtmlWindow* pAboutHTMLCtl;
97 wxHtmlWindow* pLicenseHTMLCtl;
98 wxHtmlWindow* pAuthorHTMLCtl;
99
100 wxSize m_displaySize;
101};
102
103#endif // _ABOUT_H_
The OpenCPN About dialog displaying information including version, authors, license,...
Definition about.h:52