wx.adv.AboutDialogInfo¶
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
Class Hierarchy¶
Methods Summary¶
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). |
Properties Summary¶
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
Class API¶
- class wx.adv.AboutDialogInfo(object)¶
Possible constructors:
AboutDialogInfo() -> None
AboutDialogInfo contains information shown in the standard About dialog displayed by the AboutBox() function.
Methods¶
- __init__(self)¶
Default constructor leaves all fields are initially uninitialized, in general you should call at least
SetVersion
,SetCopyright
andSetDescription
.- Return type:
None
- AddArtist(self, artist)¶
Adds an artist name to be shown in the program credits.
- Parameters:
artist (string)
- Return type:
None
See also
- AddDeveloper(self, developer)¶
Adds a developer name to be shown in the program credits.
- Parameters:
developer (string)
- Return type:
None
See also
- AddDocWriter(self, docwriter)¶
Adds a documentation writer name to be shown in the program credits.
- Parameters:
docwriter (string)
- Return type:
None
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 stringtranslator-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.- Parameters:
translator (string)
- Return type:
None
See also
- GetArtists(self)¶
Returns an array of the artist strings set in the dialog info.
- Return type:
List[str]
- GetCopyright(self)¶
Get the copyright string.
- Return type:
str
- Returns:
The copyright string
- GetDescription(self)¶
Get the description string.
- Return type:
str
- Returns:
The description string, free-form.
- GetDevelopers(self)¶
Returns an array of the developer strings set in the dialog info.
- Return type:
List[str]
- GetDocWriters(self)¶
Returns an array of the writer strings set in the dialog info.
- Return type:
List[str]
- GetLicence(self)¶
Returns the licence string.
- Return type:
str
See also
- GetLongVersion(self)¶
Return the long version string if set.
- Return type:
str
See also
- GetName(self)¶
Get the name of the program.
- Return type:
str
- Returns:
Name of the program
See also
- GetTranslators(self)¶
Returns an array of the translator strings set in the dialog info.
- Return type:
List[str]
- GetVersion(self)¶
Return the short version string.
- Return type:
str
See also
- GetWebSiteDescription(self)¶
Returns the description of the website URL set for the dialog.
- Return type:
str
- GetWebSiteURL(self)¶
Returns the website URL set for the dialog.
- Return type:
str
- HasArtists(self)¶
Returns
True
if artists have been set in the dialog info.- Return type:
bool
- HasCopyright(self)¶
Returns
True
if a copyright string has been specified.- Return type:
bool
See also
- HasDescription(self)¶
Returns
True
if a description string has been specified.- Return type:
bool
See also
- HasDevelopers(self)¶
Returns
True
if developers have been set in the dialog info.- Return type:
bool
- HasDocWriters(self)¶
Returns
True
if writers have been set in the dialog info.- Return type:
bool
- HasIcon(self)¶
Returns
True
if an icon has been set for the about dialog.- Return type:
bool
- HasLicence(self)¶
Returns
True
if the licence string has been set.- Return type:
bool
- HasTranslators(self)¶
Returns
True
if translators have been set in the dialog info.- Return type:
bool
- HasWebSite(self)¶
Returns
True
if the website info has been set.- Return type:
bool
- SetArtists(self, artists)¶
Sets the list of artists to be shown in the program credits.
- Parameters:
artists (list of strings)
- Return type:
None
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,- Parameters:
copyright (string)
- Return type:
None
- SetDescription(self, desc)¶
Set brief, but possibly multiline, description of the program.
- Parameters:
desc (string)
- Return type:
None
- SetDevelopers(self, developers)¶
Set the list of developers of the program.
- Parameters:
developers (list of strings)
- Return type:
None
See also
- SetDocWriters(self, docwriters)¶
Set the list of documentation writers.
- Parameters:
docwriters (list of strings)
- Return type:
None
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.
- Parameters:
icon (wx.Icon)
- Return type:
None
- 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.- Parameters:
licence (string)
- Return type:
None
- SetLicense(self, licence)¶
This is the same as
SetLicence
.- Parameters:
licence (string)
- Return type:
None
- 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.- Parameters:
name (string)
- Return type:
None
- SetTranslators(self, translators)¶
Set the list of translators.
Please see
AddTranslator
for additional discussion.- Parameters:
translators (list of strings)
- Return type:
None
- 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.
- Parameters:
version (string)
longVersion (string)
- Return type:
None
- 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.
- Parameters:
url (string)
desc (string)
- Return type:
None
Properties¶
- Artists¶
See
GetArtists
andSetArtists
- Copyright¶
See
GetCopyright
andSetCopyright
- Description¶
See
GetDescription
andSetDescription
- Developers¶
See
GetDevelopers
andSetDevelopers
- DocWriters¶
See
GetDocWriters
andSetDocWriters
- Licence¶
See
GetLicence
andSetLicence
- LongVersion¶
See
GetLongVersion
- Translators¶
See
GetTranslators
andSetTranslators
- Version¶
See
GetVersion
andSetVersion
- WebSiteDescription¶
- WebSiteURL¶
See
GetWebSiteURL