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:
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
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. 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.
Sets the the list of artists to be shown in the program credits.
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 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. 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 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.
This is the same as set_licence.
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 the list of translators. Please see
add_translator for additional
discussion.
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 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 2023-06-03 08:07:36 +0000]