wx.adv.AboutDialogInfo contains information shown in the standard About dialog displayed by the wx.adv.AboutBox
function.
This class contains the general information about the program, such as its name, version, copyright and so on, as well as lists of the program developers, documentation writers, artists and translators. The simple properties from the former group are represented as a string with the exception of the program icon and the program web site, while the lists from the latter group are stored as list of strings and can be either set entirely at once using wx.adv.AboutDialogInfo.SetDevelopers
and similar functions or built one by one using wx.adv.AboutDialogInfo.AddDeveloper
etc.
Please also notice that while all the main platforms have the native implementation of the about dialog, they are often more limited than the generic version provided by wxWidgets and so the generic version is used if wx.adv.AboutDialogInfo has any fields not supported by the native version. Currently GTK+ version supports all the possible fields natively but MSW and Mac versions don’t support URLs, licence text nor custom icons in the about dialog and if either of those is used, wx.adv.AboutBox
will automatically use the generic version so you should avoid specifying these fields to achieve more native look and feel.
Example of usage:
def OnAbout(self, event):
aboutInfo = wx.adv.AboutDialogInfo()
aboutInfo.SetName("MyApp")
aboutInfo.SetVersion(MY_APP_VERSION_STRING)
aboutInfo.SetDescription(_("My wxPython-based application!"))
aboutInfo.SetCopyright("(C) 1992-2012")
aboutInfo.SetWebSite("http:#myapp.org")
aboutInfo.AddDeveloper("My Self")
wx.adv.AboutBox(aboutInfo)
See also
wx.adv.AboutDialogInfo.SetArtists
Default constructor leaves all fields are initially uninitialized, in general you should call at least |
|
Adds an artist name to be shown in the program credits. |
|
Adds a developer name to be shown in the program credits. |
|
Adds a documentation writer name to be shown in the program credits. |
|
Adds a translator name to be shown in the program credits. |
|
Returns an array of the artist strings set in the dialog info. |
|
Get the copyright string. |
|
Get the description string. |
|
Returns an array of the developer strings set in the dialog info. |
|
Returns an array of the writer strings set in the dialog info. |
|
Returns the icon set by |
|
Returns the licence string. |
|
Return the long version string if set. |
|
Get the name of the program. |
|
Returns an array of the translator strings set in the dialog info. |
|
Return the short version string. |
|
Returns the description of the website URL set for the dialog. |
|
Returns the website URL set for the dialog. |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Sets the list of artists to be shown in the program credits. |
|
Set the short string containing the program copyright information. |
|
Set brief, but possibly multiline, description of the program. |
|
Set the list of developers of the program. |
|
Set the list of documentation writers. |
|
Set the icon to be shown in the dialog. |
|
Set the long, multiline string containing the text of the program licence. |
|
This is the same as |
|
Set the name of the program. |
|
Set the list of translators. |
|
Set the version of the program. |
|
Set the web site for the program and its description (which defaults to url itself if empty). |
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
wx.adv.
AboutDialogInfo
(object)¶Possible constructors:
AboutDialogInfo()
AboutDialogInfo contains information shown in the standard About dialog displayed by the AboutBox() function.
__init__
(self)¶Default constructor leaves all fields are initially uninitialized, in general you should call at least SetVersion
, SetCopyright
and SetDescription
.
AddArtist
(self, artist)¶Adds an artist name to be shown in the program credits.
artist (string) –
See also
AddDeveloper
(self, developer)¶Adds a developer name to be shown in the program credits.
developer (string) –
See also
AddDocWriter
(self, docwriter)¶Adds a documentation writer name to be shown in the program credits.
docwriter (string) –
See also
AddTranslator
(self, translator)¶Adds a translator name to be shown in the program credits.
Notice that if no translator names are specified explicitly, wx.adv.AboutBox
will try to use the translation of the string translator-credits
from the currently used message catalog – this can be used to show just the name of the translator of the program in the current language.
translator (string) –
See also
GetArtists
(self)¶Returns an array of the artist strings set in the dialog info.
list of strings
GetCopyright
(self)¶Get the copyright string.
string
The copyright string
GetDescription
(self)¶Get the description string.
string
The description string, free-form.
GetDevelopers
(self)¶Returns an array of the developer strings set in the dialog info.
list of strings
GetDocWriters
(self)¶Returns an array of the writer strings set in the dialog info.
list of strings
GetLicence
(self)¶Returns the licence string.
string
See also
GetLongVersion
(self)¶Return the long version string if set.
string
See also
GetName
(self)¶Get the name of the program.
string
Name of the program
See also
GetTranslators
(self)¶Returns an array of the translator strings set in the dialog info.
list of strings
GetVersion
(self)¶Return the short version string.
string
See also
GetWebSiteDescription
(self)¶Returns the description of the website URL set for the dialog.
string
GetWebSiteURL
(self)¶Returns the website URL set for the dialog.
string
HasArtists
(self)¶Returns True
if artists have been set in the dialog info.
bool
HasCopyright
(self)¶Returns True
if a copyright string has been specified.
bool
See also
HasDescription
(self)¶Returns True
if a description string has been specified.
bool
See also
HasDevelopers
(self)¶Returns True
if developers have been set in the dialog info.
bool
HasDocWriters
(self)¶Returns True
if writers have been set in the dialog info.
bool
HasIcon
(self)¶Returns True
if an icon has been set for the about dialog.
bool
HasLicence
(self)¶Returns True
if the licence string has been set.
bool
HasTranslators
(self)¶Returns True
if translators have been set in the dialog info.
bool
HasWebSite
(self)¶Returns True
if the website info has been set.
bool
SetArtists
(self, artists)¶Sets the list of artists to be shown in the program credits.
artists (list of strings) –
See also
SetCopyright
(self, copyright)¶Set the short string containing the program copyright information.
Notice that any occurrences of "(C)"
in copyright will be replaced by the copyright symbol (circled C) automatically, which means that you can avoid using this symbol in the program source code which can be problematic,
copyright (string) –
SetDescription
(self, desc)¶Set brief, but possibly multiline, description of the program.
desc (string) –
SetDevelopers
(self, developers)¶Set the list of developers of the program.
developers (list of strings) –
See also
SetDocWriters
(self, docwriters)¶Set the list of documentation writers.
docwriters (list of strings) –
See also
SetIcon
(self, icon)¶Set the icon to be shown in the dialog.
By default the icon of the main frame will be shown if the native about dialog supports custom icons. If it doesn’t but a valid icon is specified using this method, the generic about dialog is used instead so you should avoid calling this function for maximally native look and feel.
icon (wx.Icon) –
SetLicence
(self, licence)¶Set the long, multiline string containing the text of the program licence.
Only GTK+ version supports showing the licence text in the native about dialog currently so the generic version will be used under all the other platforms if this method is called. To preserve the native look and feel it is advised that you do not call this method but provide a separate menu item in the "Help"
menu for displaying the text of your program licence.
licence (string) –
SetLicense
(self, licence)¶This is the same as SetLicence
.
licence (string) –
SetName
(self, name)¶Set the name of the program.
If this method is not called, the string returned by wx.App.GetAppName
will be shown in the dialog.
name (string) –
SetTranslators
(self, translators)¶Set the list of translators.
Please see AddTranslator
for additional discussion.
translators (list of strings) –
SetVersion
(self, version, longVersion="")¶Set the version of the program.
The word “version” shouldn’t be included in version. Example version values: “1.2” and “RC2
”. In about dialogs with more space set aside for version information, longVersion is used. Example longVersion values: “Version 1.2” and “Release Candidate 2”. If version is non-empty but longVersion is empty, a long version is constructed automatically, using version (by simply prepending “Version “ to version).
The generic about dialog and native GTK+ dialog use version only, as a suffix to the program name. The native MSW and macOS about dialogs use the long version.
version (string) –
longVersion (string) –
SetWebSite
(self, url, desc="")¶Set the web site for the program and its description (which defaults to url itself if empty).
Please notice that only GTK+ version currently supports showing the link in the native about dialog so if this method is called, the generic version will be used under all the other platforms.
url (string) –
desc (string) –
Artists
¶See GetArtists
and SetArtists
Copyright
¶See GetCopyright
and SetCopyright
Description
¶See GetDescription
and SetDescription
Developers
¶See GetDevelopers
and SetDevelopers
DocWriters
¶See GetDocWriters
and SetDocWriters
Licence
¶See GetLicence
and SetLicence
LongVersion
¶See GetLongVersion
Translators
¶See GetTranslators
and SetTranslators
Version
¶See GetVersion
and SetVersion
WebSiteDescription
¶WebSiteURL
¶See GetWebSiteURL