Audacity  2.2.2
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  // No copy, use the move
37  AboutDialogCreditItem& operator= (const AboutDialogCreditItem&) PROHIBITED;
38 
39  // Move constructor, because wxString lacks one
41  : role(moveMe.role)
42  {
43  description.swap(moveMe.description);
44  }
45 
47 };
48 
49 using AboutDialogCreditItemsList = std::vector<AboutDialogCreditItem>;
50 
51 class AboutDialog final : public wxDialogWrapper {
52  DECLARE_DYNAMIC_CLASS(AboutDialog)
53 
54  public:
55  AboutDialog(wxWindow * parent);
56  virtual ~ AboutDialog();
57 
58  static AboutDialog *ActiveIntance();
59 
60  void OnOK(wxCommandEvent & event);
61 
62  wxStaticBitmap *icon;
63 
64  DECLARE_EVENT_TABLE()
65 
66  private:
67  enum Role {
74  };
75 
77  void PopulateAudacityPage( ShuttleGui & S );
78  void PopulateLicensePage( ShuttleGui & S );
80 
81  void CreateCreditsList();
82  void AddCredit(wxString &&description, Role role);
83  wxString GetCreditsByRole(AboutDialog::Role role);
84 
85  void AddBuildinfoRow( wxString* htmlstring, const wxChar * libname, const wxChar * libdesc, const wxString &status);
86  void AddBuildinfoRow( wxString* htmlstring, const wxChar * libname, const wxChar * libdesc);
87 };
88 
89 #endif
static AboutDialog * ActiveIntance()
void PopulateLicensePage(ShuttleGui &S)
#define PROHIBITED
Definition: Audacity.h:224
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
void CreateCreditsList()
AboutDialogCreditItem is a structure used by the AboutDialog to hold information about one contributo...
Definition: AboutDialog.h:27
AboutDialogCreditItem(wxString &&description_, int role_)
Definition: AboutDialog.h:31
void OnOK(wxCommandEvent &event)
void AddCredit(wxString &&description, Role role)
std::vector< AboutDialogCreditItem > AboutDialogCreditItemsList
Definition: AboutDialog.h:49
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.
void PopulateAudacityPage(ShuttleGui &S)
virtual ~AboutDialog()
The AboutDialog shows the program version and developer credits.
Definition: AboutDialog.h:51
const wxString VerCheckUrl()
Definition: AboutDialog.cpp:84
wxStaticBitmap * icon
Definition: AboutDialog.h:62
AboutDialogCreditItemsList creditItems
Definition: AboutDialog.h:76
void PopulateInformationPage(ShuttleGui &S)
: Fills out the "Information" tab of the preferences dialogue
const wxString VerCheckArgs()
Definition: AboutDialog.cpp:73
wxString GetCreditsByRole(AboutDialog::Role role)
AboutDialog(wxWindow *parent)