Audacity  2.2.0
AboutDialog.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  AboutDialog.h
6 
7  Dominic Mazzoni
8 
9 **********************************************************************/
10 
11 #ifndef __AUDACITY_ABOUT_DLG__
12 #define __AUDACITY_ABOUT_DLG__
13 
14 #include "MemoryX.h"
15 #include <vector>
16 #include <wx/sizer.h>
17 #include <wx/statbmp.h>
18 #include <wx/bitmap.h>
19 #include "widgets/wxPanelWrapper.h"
20 
21 extern const wxString VerCheckArgs();
22 extern const wxString VerCheckUrl();
23 extern const wxString VerCheckHtml();
24 
25 class ShuttleGui;
26 
28  wxString description;
29  int role;
30 
31  AboutDialogCreditItem(wxString &&description_, int role_)
32  : description(description_), role(role_)
33  {}
34 
35 #ifdef __AUDACITY_OLD_STD__
38 #else
39  // No copy, use the move
41  AboutDialogCreditItem& operator= (const AboutDialogCreditItem&) PROHIBITED;
42 #endif
43 
44  // Move constructor, because wxString lacks one
46  : role(moveMe.role)
47  {
48  description.swap(moveMe.description);
49  }
50 
52 };
53 
54 using AboutDialogCreditItemsList = std::vector<AboutDialogCreditItem>;
55 
56 class AboutDialog final : public wxDialogWrapper {
57  DECLARE_DYNAMIC_CLASS(AboutDialog)
58 
59  public:
60  AboutDialog(wxWindow * parent);
61  virtual ~ AboutDialog();
62 
63  static AboutDialog *ActiveIntance();
64 
65  void OnOK(wxCommandEvent & event);
66 
67  wxStaticBitmap *icon;
68 
69  DECLARE_EVENT_TABLE()
70 
71  private:
72  enum Role {
80  };
81 
83  void PopulateAudacityPage( ShuttleGui & S );
84  void PopulateLicensePage( ShuttleGui & S );
86 
87  void CreateCreditsList();
88  void AddCredit(wxString &&description, Role role);
89  wxString GetCreditsByRole(AboutDialog::Role role);
90 
91  void AddBuildinfoRow( wxString* htmlstring, const wxChar * libname, const wxChar * libdesc, const wxString &status);
92  void AddBuildinfoRow( wxString* htmlstring, const wxChar * libname, const wxChar * libdesc);
93 };
94 
95 #endif
wxString description
Definition: AboutDialog.h:28
static AboutDialog * ActiveIntance()
Definition: AboutDialog.cpp:297
void PopulateLicensePage(ShuttleGui &S)
Definition: AboutDialog.cpp:734
#define PROHIBITED
Definition: Audacity.h:248
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:369
Definition: AboutDialog.h:78
Definition: AboutDialog.h:77
Role
Definition: AboutDialog.h:72
Definition: AboutDialog.h:75
void CreateCreditsList()
Definition: AboutDialog.cpp:105
AboutDialogCreditItem is a structure used by the AboutDialog to hold information about one contributo...
Definition: AboutDialog.h:27
Definition: AboutDialog.h:73
AboutDialogCreditItem(wxString &&description_, int role_)
Definition: AboutDialog.h:31
void OnOK(wxCommandEvent &event)
Definition: AboutDialog.cpp:1103
void AddCredit(wxString &&description, Role role)
Definition: AboutDialog.cpp:1041
std::vector< AboutDialogCreditItem > AboutDialogCreditItemsList
Definition: AboutDialog.h:54
Definition: wxPanelWrapper.h:19
AboutDialogCreditItem & operator=(const AboutDialogCreditItem &) PROHIBITED
const wxString VerCheckHtml()
Definition: AboutDialog.cpp:96
void AddBuildinfoRow(wxString *htmlstring, const wxChar *libname, const wxChar *libdesc, const wxString &status)
Add a table row saying if a library is used or not.
Definition: AboutDialog.cpp:1074
~AboutDialogCreditItem()
Definition: AboutDialog.h:51
void PopulateAudacityPage(ShuttleGui &S)
Definition: AboutDialog.cpp:332
virtual ~AboutDialog()
Definition: AboutDialog.cpp:1098
The AboutDialog shows the program version and developer credits.
Definition: AboutDialog.h:56
Definition: AboutDialog.h:76
int role
Definition: AboutDialog.h:29
const wxString VerCheckUrl()
Definition: AboutDialog.cpp:84
wxStaticBitmap * icon
Definition: AboutDialog.h:67
AboutDialogCreditItemsList creditItems
Definition: AboutDialog.h:82
void PopulateInformationPage(ShuttleGui &S)
: Fills out the "Information" tab of the preferences dialogue
Definition: AboutDialog.cpp:488
const wxString VerCheckArgs()
Definition: AboutDialog.cpp:73
Definition: AboutDialog.h:79
Definition: AboutDialog.h:74
wxString GetCreditsByRole(AboutDialog::Role role)
Definition: AboutDialog.cpp:1050
AboutDialogCreditItem(AboutDialogCreditItem &&moveMe)
Definition: AboutDialog.h:45
AboutDialog(wxWindow *parent)
Definition: AboutDialog.cpp:302