.. include:: headings.inc .. currentmodule:: adv .. _adv.AboutDialogInfo: ========================================================================================================================================== |phoenix_title| **AboutDialogInfo** ========================================================================================================================================== :ref:`adv.AboutDialogInfo` contains information shown in the standard `About` dialog displayed by the :func:`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 `ArrayString` and can be either set entirely at once using :meth:`AboutDialogInfo.SetDevelopers` and similar functions or built one by one using :meth:`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 :ref:`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, :func:`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.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.AboutBox(aboutInfo) .. seealso:: :meth:`AboutDialogInfo.SetArtists` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **AboutDialogInfo** .. raw:: html

Inheritance diagram of AboutDialogInfo

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~AboutDialogInfo.__init__` Default constructor leaves all fields are initially uninitialized, in general you should call at least :meth:`SetVersion` , :meth:`SetCopyright` and :meth:`SetDescription` . :meth:`~AboutDialogInfo.AddArtist` Adds an artist name to be shown in the program credits. :meth:`~AboutDialogInfo.AddDeveloper` Adds a developer name to be shown in the program credits. :meth:`~AboutDialogInfo.AddDocWriter` Adds a documentation writer name to be shown in the program credits. :meth:`~AboutDialogInfo.AddTranslator` Adds a translator name to be shown in the program credits. :meth:`~AboutDialogInfo.GetCopyright` Get the copyright string. :meth:`~AboutDialogInfo.GetDescription` Get the description string. :meth:`~AboutDialogInfo.GetName` Get the name of the program. :meth:`~AboutDialogInfo.HasCopyright` Returns ``True`` if a copyright string has been specified. :meth:`~AboutDialogInfo.HasDescription` Returns ``True`` if a description string has been specified. :meth:`~AboutDialogInfo.SetArtists` Sets the list of artists to be shown in the program credits. :meth:`~AboutDialogInfo.SetCopyright` Set the short string containing the program copyright information. :meth:`~AboutDialogInfo.SetDescription` Set brief, but possibly multiline, description of the program. :meth:`~AboutDialogInfo.SetDevelopers` Set the list of developers of the program. :meth:`~AboutDialogInfo.SetDocWriters` Set the list of documentation writers. :meth:`~AboutDialogInfo.SetIcon` Set the icon to be shown in the dialog. :meth:`~AboutDialogInfo.SetLicence` Set the long, multiline string containing the text of the program licence. :meth:`~AboutDialogInfo.SetLicense` This is the same as :meth:`SetLicence` . :meth:`~AboutDialogInfo.SetName` Set the name of the program. :meth:`~AboutDialogInfo.SetTranslators` Set the list of translators. :meth:`~AboutDialogInfo.SetVersion` Set the version of the program. :meth:`~AboutDialogInfo.SetWebSite` Set the web site for the program and its description (which defaults to `url` itself if empty). ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~AboutDialogInfo.Copyright` See :meth:`~AboutDialogInfo.GetCopyright` and :meth:`~AboutDialogInfo.SetCopyright` :attr:`~AboutDialogInfo.Description` See :meth:`~AboutDialogInfo.GetDescription` and :meth:`~AboutDialogInfo.SetDescription` :attr:`~AboutDialogInfo.Name` See :meth:`~AboutDialogInfo.GetName` and :meth:`~AboutDialogInfo.SetName` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: AboutDialogInfo(object) AboutDialogInfo contains information shown in the standard About dialog displayed by the AboutBox() function. **Possible constructors**:: AboutDialogInfo() .. method:: __init__(self) Default constructor leaves all fields are initially uninitialized, in general you should call at least :meth:`SetVersion` , :meth:`SetCopyright` and :meth:`SetDescription` . .. method:: AddArtist(self, artist) Adds an artist name to be shown in the program credits. :param `artist`: :type `artist`: string .. seealso:: :meth:`SetArtists` .. method:: AddDeveloper(self, developer) Adds a developer name to be shown in the program credits. :param `developer`: :type `developer`: string .. seealso:: :meth:`SetDevelopers` .. method:: AddDocWriter(self, docwriter) Adds a documentation writer name to be shown in the program credits. :param `docwriter`: :type `docwriter`: string .. seealso:: :meth:`SetDocWriters` .. method:: AddTranslator(self, translator) Adds a translator name to be shown in the program credits. Notice that if no translator names are specified explicitly, :func:`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. :param `translator`: :type `translator`: string .. seealso:: :meth:`SetTranslators` .. method:: GetCopyright(self) Get the copyright string. :rtype: `string` :returns: The copyright string .. method:: GetDescription(self) Get the description string. :rtype: `string` :returns: The description string, free-form. .. method:: GetName(self) Get the name of the program. :rtype: `string` :returns: Name of the program .. seealso:: :meth:`SetName` .. method:: HasCopyright(self) Returns ``True`` if a copyright string has been specified. :rtype: `bool` .. seealso:: :meth:`GetCopyright` .. method:: HasDescription(self) Returns ``True`` if a description string has been specified. :rtype: `bool` .. seealso:: :meth:`GetDescription` .. method:: SetArtists(self, artists) Sets the list of artists to be shown in the program credits. :param `artists`: :type `artists`: list of strings .. seealso:: :meth:`AddArtist` .. method:: 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, :param `copyright`: :type `copyright`: string .. method:: SetDescription(self, desc) Set brief, but possibly multiline, description of the program. :param `desc`: :type `desc`: string .. method:: SetDevelopers(self, developers) Set the list of developers of the program. :param `developers`: :type `developers`: list of strings .. seealso:: :meth:`AddDeveloper` .. method:: SetDocWriters(self, docwriters) Set the list of documentation writers. :param `docwriters`: :type `docwriters`: list of strings .. seealso:: :meth:`AddDocWriter` .. method:: 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. :param `icon`: :type `icon`: Icon .. method:: 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. :param `licence`: :type `licence`: string .. method:: SetLicense(self, licence) This is the same as :meth:`SetLicence` . :param `licence`: :type `licence`: string .. method:: SetName(self, name) Set the name of the program. If this method is not called, the string returned by :meth:`App.GetAppName` will be shown in the dialog. :param `name`: :type `name`: string .. method:: SetTranslators(self, translators) Set the list of translators. Please see :meth:`AddTranslator` for additional discussion. :param `translators`: :type `translators`: list of strings .. method:: 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 OS X about dialogs use the long version. :param `version`: :type `version`: string :param `longVersion`: :type `longVersion`: string .. method:: 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. :param `url`: :type `url`: string :param `desc`: :type `desc`: string .. attribute:: Copyright See :meth:`~AboutDialogInfo.GetCopyright` and :meth:`~AboutDialogInfo.SetCopyright` .. attribute:: Description See :meth:`~AboutDialogInfo.GetDescription` and :meth:`~AboutDialogInfo.SetDescription` .. attribute:: Name See :meth:`~AboutDialogInfo.GetName` and :meth:`~AboutDialogInfo.SetName`