The Wx module function Wx::about_box displays a platform-native
“About” dialog with information about the application. AboutDialogInfo
is a simple class for passing information to it. You construct an
AboutDialogInfo object, set the relevant fields, and then pass it to
the function. The only required field is version. For convenience, you
may also just pass Wx::about_box keyword arguments, and skip creating an
AboutDialogInfo object altogether:
Wx::about_box( :name => 'A Tasty Application',
:version => '3.0.2',
:developers => ['Joe Bloggs'] )
The information for the dialog includes general application details like 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 as an array of strings and can be either set entirely at once using set_developers and similar functions or built one by one using add_developer 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 Widgets and so the generic version is used if 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, AboutBox() will automatically use the generic version so you should avoid specifying these fields to achieve more native look and feel.
No base class
add_artist(String artist)
Adds an artist name to be shown in the program credits.
add_developer(String developer)
Adds a developer name to be shown in the program credits.
add_doc_writer(String docwriter)
Adds a documentation writer name to be shown in the program credits.
add_translator(String translator)
Adds a translator name to be shown in the program credits. Notice that if no
translator names are specified explicitely, 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.
set_artists(ArrayString artists)
Sets the the list of artists to be shown in the program credits.
set_copyright(String 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,
set_description(String desc)
Set brief, but possibly multiline, description of the program.
set_developers(ArrayString developers)
Set the list of developers of the program.
set_doc_writers(ArrayString docwriters)
Set the list of documentation writers.
set_icon(Icon 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.
set_licence(String 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.
set_license(String licence)
This is the same as set_licence.
set_name(String name)
Set the name of the program. If this method is not called, the string returned by App::GetAppName() will be shown in the dialog.
set_translators(ArrayString translators)
Set the list of translators. Please see add_translator for additional discussion.
set_version(String version)
Set the version of the program. The version is in free format, i.e. not
necessarily in the x.y.z form but it shouldn’t contain the “version”
word.
set_web_site(String url, String 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.
[This page automatically generated from the Textile source at Thu May 01 00:50:32 +0100 2008]