OpenCPN Partial API docs
about.h
1 /******************************************************************************
2  *
3  * Project: OpenCPN
4  * Purpose: About Dialog
5  * Author: David Register
6  *
7  ***************************************************************************
8  * Copyright (C) 2010 by David S. Register *
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  * This program is distributed in the hope that it will be useful, *
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18  * GNU General Public License for more details. *
19  * *
20  * You should have received a copy of the GNU General Public License *
21  * along with this program; if not, write to the *
22  * Free Software Foundation, Inc., *
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
24  ***************************************************************************
25  *
26 
27  */
28 
29 #ifndef _ABOUT_H_
30 #define _ABOUT_H_
31 
32 #include <wx/notebook.h>
33 
34 // Constants
35 
36 #define ID_DIALOG 10001
37 
38 #define SYMBOL_ABOUT_TITLE _("About OpenCPN")
39 
40 #define ID_DONATE 10010
41 #define ID_COPYINI 10011
42 #define ID_COPYLOG 10012
43 
44 #define ID_NOTEBOOK_HELP 10002
45 
46 class wxHtmlWindow;
47 
48 class about : public wxDialog {
49  DECLARE_DYNAMIC_CLASS(about)
50  DECLARE_EVENT_TABLE()
51 
52 public:
53  explicit about();
54  explicit about(wxWindow* parent, wxString License_Data_Locn,
55  wxWindowID id = ID_DIALOG,
56  const wxString& caption = SYMBOL_ABOUT_TITLE,
57  const wxPoint& pos = wxDefaultPosition,
58  const wxSize& size = wxSize(500, 500),
59  long style = wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU |
60  wxCLOSE_BOX);
61  bool Create(wxWindow* parent, wxWindowID id = ID_DIALOG,
62  const wxString& caption = SYMBOL_ABOUT_TITLE,
63  const wxPoint& pos = wxDefaultPosition,
64  const wxSize& size = wxSize(500, 500),
65  long style = wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU |
66  wxCLOSE_BOX);
67 
68  void RecalculateSize(void);
69 
70 private:
71  void CreateControls(void);
72  void Populate(void);
73  void OnXidOkClick(wxCommandEvent& event);
74  void OnNBPageChange(wxNotebookEvent& event);
75  void OnDonateClick(wxCommandEvent& event);
76  void OnCopyClick(wxCommandEvent& event);
77  void OnClose(wxCloseEvent& event);
78  void SetColorScheme(void);
79 
80  wxString m_DataLocn;
81  wxWindow* m_parent;
82  bool m_btips_loaded;
83  bool m_blicensePageSet;
84 
85  wxPanel* itemPanelAbout;
86  wxPanel* itemPanelAuthors;
87  wxPanel* itemPanelLicense;
88  wxPanel* itemPanelTips;
89 
90  wxTextCtrl* pAuthorTextCtl;
91  wxTextCtrl* pLicenseTextCtl;
92  wxNotebook* pNotebook;
93  wxHtmlWindow* pAboutHTMLCtl;
94  wxHtmlWindow* pLicenseHTMLCtl;
95  wxHtmlWindow* pAuthorHTMLCtl;
96 
97  wxSize m_displaySize;
98 };
99 
100 #endif // _ABOUT_H_
Definition: about.h:48