/[pcsx2_0.9.7]/branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/aboutdlg.h
ViewVC logotype

Contents of /branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/aboutdlg.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (show annotations) (download)
Tue Sep 7 03:29:01 2010 UTC (9 years, 5 months ago) by william
File MIME type: text/plain
File size: 5723 byte(s)
branching from upstream revision (http://pcsx2.googlecode.com/svn/trunk
): r3113 to
https://svn.netsolutions.dnsalias.com/websvn/ps2/pcsx2/pcsx2_0.9.7/branch/r3113_0.9.7_beta
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/aboutdlg.h
3 // Purpose: declaration of wxAboutDialog class
4 // Author: Vadim Zeitlin
5 // Created: 2006-10-07
6 // RCS-ID: $Id: aboutdlg.h 58748 2009-02-08 09:46:03Z VZ $
7 // Copyright: (c) 2006 Vadim Zeitlin <vadim@wxwindows.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_ABOUTDLG_H_
12 #define _WX_ABOUTDLG_H_
13
14 #include "wx/defs.h"
15
16 #if wxUSE_ABOUTDLG
17
18 #include "wx/app.h"
19 #include "wx/icon.h"
20
21 // ----------------------------------------------------------------------------
22 // wxAboutDialogInfo: information shown by the standard "About" dialog
23 // ----------------------------------------------------------------------------
24
25 class WXDLLIMPEXP_ADV wxAboutDialogInfo
26 {
27 public:
28 // all fields are initially uninitialized
29 wxAboutDialogInfo() { }
30
31 // accessors for various simply fields
32 // -----------------------------------
33
34 // name of the program, if not used defaults wxApp::GetAppName()
35 void SetName(const wxString& name) { m_name = name; }
36 wxString GetName() const
37 { return m_name.empty() ? wxTheApp->GetAppName() : m_name; }
38
39 // version of the program, in free format (but without "version" word)
40 void SetVersion(const wxString& version) { m_version = version; }
41 bool HasVersion() const { return !m_version.empty(); }
42 wxString GetVersion() const { return m_version; }
43
44 // brief, but possibly multiline, description of the program
45 void SetDescription(const wxString& desc) { m_description = desc; }
46 bool HasDescription() const { return !m_description.empty(); }
47 wxString GetDescription() const { return m_description; }
48
49 // short string containing the program copyright information
50 void SetCopyright(const wxString& copyright) { m_copyright = copyright; }
51 bool HasCopyright() const { return !m_copyright.empty(); }
52 wxString GetCopyright() const { return m_copyright; }
53
54 // long, multiline string containing the text of the program licence
55 void SetLicence(const wxString& licence) { m_licence = licence; }
56 void SetLicense(const wxString& licence) { m_licence = licence; }
57 bool HasLicence() const { return !m_licence.empty(); }
58 wxString GetLicence() const { return m_licence; }
59
60 // icon to be shown in the dialog, defaults to the main frame icon
61 void SetIcon(const wxIcon& icon) { m_icon = icon; }
62 bool HasIcon() const { return m_icon.Ok(); }
63 wxIcon GetIcon() const;
64
65 // web site for the program and its description (defaults to URL itself if
66 // empty)
67 void SetWebSite(const wxString& url, const wxString& desc = wxEmptyString)
68 {
69 m_url = url;
70 m_urlDesc = desc.empty() ? url : desc;
71 }
72
73 bool HasWebSite() const { return !m_url.empty(); }
74
75 wxString GetWebSiteURL() const { return m_url; }
76 wxString GetWebSiteDescription() const { return m_urlDesc; }
77
78 // accessors for the arrays
79 // ------------------------
80
81 // the list of developers of the program
82 void SetDevelopers(const wxArrayString& developers)
83 { m_developers = developers; }
84 void AddDeveloper(const wxString& developer)
85 { m_developers.push_back(developer); }
86
87 bool HasDevelopers() const { return !m_developers.empty(); }
88 const wxArrayString& GetDevelopers() const { return m_developers; }
89
90 // the list of documentation writers
91 void SetDocWriters(const wxArrayString& docwriters)
92 { m_docwriters = docwriters; }
93 void AddDocWriter(const wxString& docwriter)
94 { m_docwriters.push_back(docwriter); }
95
96 bool HasDocWriters() const { return !m_docwriters.empty(); }
97 const wxArrayString& GetDocWriters() const { return m_docwriters; }
98
99 // the list of artists for the program art
100 void SetArtists(const wxArrayString& artists)
101 { m_artists = artists; }
102 void AddArtist(const wxString& artist)
103 { m_artists.push_back(artist); }
104
105 bool HasArtists() const { return !m_artists.empty(); }
106 const wxArrayString& GetArtists() const { return m_artists; }
107
108 // the list of translators
109 void SetTranslators(const wxArrayString& translators)
110 { m_translators = translators; }
111 void AddTranslator(const wxString& translator)
112 { m_translators.push_back(translator); }
113
114 bool HasTranslators() const { return !m_translators.empty(); }
115 const wxArrayString& GetTranslators() const { return m_translators; }
116
117
118 // implementation only
119 // -------------------
120
121 // "simple" about dialog shows only textual information (with possibly
122 // default icon but without hyperlink nor any long texts such as the
123 // licence text)
124 bool IsSimple() const
125 { return !HasWebSite() && !HasIcon() && !HasLicence(); }
126
127 // get the description and credits (i.e. all of developers, doc writers,
128 // artists and translators) as a one long multiline string
129 wxString GetDescriptionAndCredits() const;
130
131 #if wxABI_VERSION >= 20810
132 // returns the copyright with the (C) string substituted by the Unicode
133 // character U+00A9
134 wxString GetCopyrightToDisplay() const;
135 #endif // wx 2.8.10+
136
137 private:
138 wxString m_name,
139 m_version,
140 m_description,
141 m_copyright,
142 m_licence;
143
144 wxIcon m_icon;
145
146 wxString m_url,
147 m_urlDesc;
148
149 wxArrayString m_developers,
150 m_docwriters,
151 m_artists,
152 m_translators;
153 };
154
155 // functions to show the about dialog box
156 WXDLLIMPEXP_ADV void wxAboutBox(const wxAboutDialogInfo& info);
157
158 #endif // wxUSE_ABOUTDLG
159
160 #endif // _WX_ABOUTDLG_H_
161

  ViewVC Help
Powered by ViewVC 1.1.22