X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/12f5e1e78fe906050ff2fee9529476db332633f0..f9afe2fece164276af2154ad5046de810f32933f:/interface/wx/aboutdlg.h diff --git a/interface/wx/aboutdlg.h b/interface/wx/aboutdlg.h index a3187bfb46..35cd11aa32 100644 --- a/interface/wx/aboutdlg.h +++ b/interface/wx/aboutdlg.h @@ -3,7 +3,7 @@ // Purpose: interface of wxAboutDialogInfo // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -29,9 +29,25 @@ don't support URLs, licence text nor custom icons in the about dialog and if either of those is used, wxAboutBox() will automatically use the generic version so you should avoid specifying these fields to achieve more native look and feel. + + Example of usage: + @code + void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) + { + wxAboutDialogInfo aboutInfo; + aboutInfo.SetName("MyApp"); + aboutInfo.SetVersion(MY_APP_VERSION_STRING); + aboutInfo.SetDescription(_("My wxWidgets-based application!")); + aboutInfo.SetCopyright("(C) 1992-2010"); + aboutInfo.SetWebSite("http://myapp.org"); + aboutInfo.AddDeveloper("My Self"); + + wxAboutBox(aboutInfo); + } + @endcode @library{wxadv} - @category{misc} + @category{cmndlg,data} @see wxAboutDialogInfo::SetArtists */ @@ -67,7 +83,7 @@ public: /** Adds a translator name to be shown in the program credits. Notice that if no - translator names are specified explicitely, wxAboutBox() will try to use the + translator names are specified explicitly, wxAboutBox() will try to use the translation of the string @c 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. @@ -77,7 +93,43 @@ public: void AddTranslator(const wxString& translator); /** - Sets the the list of artists to be shown in the program credits. + Get the name of the program. + + @return Name of the program + @see SetName() + */ + wxString GetName() const; + + /** + Returns @true if a description string has been specified. + + @see GetDescription() + */ + bool HasDescription() const; + + /** + Get the description string. + + @return The description string, free-form. + */ + const wxString& GetDescription(); + + /** + Returns @true if a copyright string has been specified. + + @see GetCopyright() + */ + bool HasCopyright() const; + + /** + Get the copyright string. + + @return The copyright string + */ + const wxString& GetCopyright() const; + + /** + Sets the list of artists to be shown in the program credits. @see AddArtist() */ @@ -148,10 +200,19 @@ public: void SetTranslators(const wxArrayString& translators); /** - Set the version of the program. The version is in free format, i.e. not - necessarily in the @c x.y.z form but it shouldn't contain the "version" word. + Set the version of the program. The word "version" shouldn't be included + in @a version. Example @a version values: "1.2" and "RC2". In about dialogs + with more space set aside for version information, @a longVersion is used. + Example @a longVersion values: "Version 1.2" and "Release Candidate 2". + If @a version is non-empty but @a longVersion is empty, a long version + is constructed automatically, using @a version (by simply prepending + "Version " to @a version). + + The generic about dialog and native GTK+ dialog use @a version only, + as a suffix to the program name. The native MSW and OS X about dialogs + use the long version. */ - void SetVersion(const wxString& version); + void SetVersion(const wxString& version, const wxString& longVersion = wxString()); /** Set the web site for the program and its description (which defaults to @a url @@ -170,7 +231,7 @@ public: // Global functions/macros // ============================================================================ -/** @ingroup group_funcmacro_dialog */ +/** @addtogroup group_funcmacro_dialog */ //@{ /** @@ -189,7 +250,7 @@ public: info.SetName(_("My Program")); info.SetVersion(_("1.2.3 Beta")); info.SetDescription(_("This program does something great.")); - info.SetCopyright(_T("(C) 2007 Me ")); + info.SetCopyright(wxT("(C) 2007 Me ")); wxAboutBox(info); } @@ -201,7 +262,7 @@ public: @header{wx/aboutdlg.h} */ -void wxAboutBox(const wxAboutDialogInfo& info); +void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* parent = NULL); /** This function does the same thing as wxAboutBox() except that it always uses @@ -218,6 +279,6 @@ void wxAboutBox(const wxAboutDialogInfo& info); @header{wx/aboutdlg.h} */ -void wxGenericAboutBox(const wxAboutDialogInfo& info); +void wxGenericAboutBox(const wxAboutDialogInfo& info, wxWindow* parent = NULL); //@}