forked from Sneeds-Feed-and-Seed/sneedacity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAboutDialog.h
74 lines (53 loc) · 1.83 KB
/
AboutDialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/**********************************************************************
Sneedacity: A Digital Audio Editor
AboutDialog.h
Dominic Mazzoni
**********************************************************************/
#ifndef __SNEEDACITY_ABOUT_DLG__
#define __SNEEDACITY_ABOUT_DLG__
#include <vector>
#include "widgets/wxPanelWrapper.h" // to inherit
class wxStaticBitmap;
class wxTextOutputStream;
class ShuttleGui;
struct AboutDialogCreditItem {
AboutDialogCreditItem( TranslatableString str, int r )
: description{ std::move( str ) }, role{ r }
{}
TranslatableString description;
int role;
};
using AboutDialogCreditItemsList = std::vector<AboutDialogCreditItem>;
class SNEEDACITY_DLL_API AboutDialog final : public wxDialogWrapper {
DECLARE_DYNAMIC_CLASS(AboutDialog)
public:
AboutDialog(wxWindow * parent);
virtual ~ AboutDialog();
static AboutDialog *ActiveIntance();
void OnOK(wxCommandEvent & event);
wxStaticBitmap *icon;
DECLARE_EVENT_TABLE()
private:
enum Role {
roleTeamMember,
roleEmeritusTeam,
roleDeceased,
roleContributor,
roleGraphics,
roleLibrary,
roleThanks
};
AboutDialogCreditItemsList creditItems;
void PopulateSneedacityPage( ShuttleGui & S );
void PopulateLicensePage( ShuttleGui & S );
void PopulateInformationPage (ShuttleGui & S );
void CreateCreditsList();
void AddCredit( const wxString &name, Role role );
void AddCredit( const wxString &name, TranslatableString format, Role role );
wxString GetCreditsByRole(AboutDialog::Role role);
void AddBuildinfoRow( wxTextOutputStream *str, const wxChar * libname,
const TranslatableString &libdesc, const TranslatableString &status);
void AddBuildinfoRow( wxTextOutputStream *str,
const TranslatableString &description, const wxChar *spec);
};
#endif