KiCad PCB EDA Suite
dialog_about.h
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2010 Rafael Sokolowski <Rafael.Sokolowski@web.de>
5  * Copyright (C) 2010-2019 KiCad Developers, see CHANGELOG.TXT for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
25 #ifndef DIALOG_ABOUT_H
26 #define DIALOG_ABOUT_H
27 
28 #include <wx/html/htmlwin.h>
29 #include <wx/statbmp.h>
30 #include <wx/stattext.h>
31 #include <wx/hyperlink.h>
32 
33 #include "aboutinfo.h"
34 #include "dialog_about_base.h"
35 
36 // Used for the notebook image list
37 enum class IMAGES {
39  VERSION,
40  DEVELOPERS,
41  DOCWRITERS,
42  LIBRARIANS,
43  ARTISTS,
45  PACKAGERS,
46  LICENSE
47 };
48 
54 {
55 private:
56  wxImageList* m_images;
57  wxString m_titleName;
58 
60 
61 public:
62  DIALOG_ABOUT( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aAppInfo );
63  ~DIALOG_ABOUT();
64 
65 protected:
66  void OnNotebookPageChanged( wxNotebookEvent& aEvent ) override;
67 
68 private:
69  void onHtmlLinkClicked( wxHtmlLinkEvent& event );
70 
71  void onCopyVersionInfo( wxCommandEvent& event ) override;
72 
73  void onReportBug( wxCommandEvent& event ) override;
74 
75  // Notebook pages
76  wxFlexGridSizer* createFlexGridSizer();
77  void createNotebooks();
78  void createNotebookPage( wxNotebook* aParent,
79  const wxString& aCaption,
80  IMAGES aIconIndex,
81  const CONTRIBUTORS& aContributors );
82  void createNotebookPageByCategory( wxNotebook* aParent,
83  const wxString& aCaption,
84  IMAGES aIconIndex,
85  const CONTRIBUTORS& aContributors );
86  void createNotebookHtmlPage( wxNotebook* aParent,
87  const wxString& aCaption,
88  IMAGES aIconIndex,
89  const wxString& aHtmlMessage,
90  bool aSelection = false );
91 
92  wxStaticText* wxStaticTextRef( wxScrolledWindow* aParent, const wxString& aReference );
93  wxStaticBitmap* createStaticBitmap( wxScrolledWindow* aParent, wxBitmap* icon );
94 };
95 
96 #endif // DIALOG_ABOUT_H
wxFlexGridSizer * createFlexGridSizer()
DIALOG_ABOUT(EDA_BASE_FRAME *aParent, ABOUT_APP_INFO &aAppInfo)
void createNotebookPageByCategory(wxNotebook *aParent, const wxString &aCaption, IMAGES aIconIndex, const CONTRIBUTORS &aContributors)
wxImageList * m_images
Definition: dialog_about.h:56
void createNotebooks()
void createNotebookPage(wxNotebook *aParent, const wxString &aCaption, IMAGES aIconIndex, const CONTRIBUTORS &aContributors)
void OnNotebookPageChanged(wxNotebookEvent &aEvent) override
An object of this class is meant to be used to store application specific information like who has co...
Definition: aboutinfo.h:44
void createNotebookHtmlPage(wxNotebook *aParent, const wxString &aCaption, IMAGES aIconIndex, const wxString &aHtmlMessage, bool aSelection=false)
IMAGES
Definition: dialog_about.h:37
void onCopyVersionInfo(wxCommandEvent &event) override
void onHtmlLinkClicked(wxHtmlLinkEvent &event)
wxStaticBitmap * createStaticBitmap(wxScrolledWindow *aParent, wxBitmap *icon)
wxStaticText * wxStaticTextRef(wxScrolledWindow *aParent, const wxString &aReference)
Class DIALOG_ABOUT_BASE.
The base frame for deriving all KiCad main window classes.
wxString m_titleName
Definition: dialog_about.h:57
About dialog to show application specific information.
Definition: dialog_about.h:53
ABOUT_APP_INFO & m_info
Definition: dialog_about.h:59
void onReportBug(wxCommandEvent &event) override