X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6679eeeb9b85a3953e7a73efec7950a90b629678..616c0d1f3ac084bb92f0a75dc48812e8647f1b22:/include/wx/aboutdlg.h diff --git a/include/wx/aboutdlg.h b/include/wx/aboutdlg.h index cc93b7f091..edcf6fd105 100644 --- a/include/wx/aboutdlg.h +++ b/include/wx/aboutdlg.h @@ -31,15 +31,25 @@ public: // accessors for various simply fields // ----------------------------------- - // name of the program, if not used defaults wxApp::GetAppName() + // name of the program, if not used defaults to wxApp::GetAppDisplayName() void SetName(const wxString& name) { m_name = name; } wxString GetName() const - { return m_name.empty() ? wxTheApp->GetAppName() : m_name; } + { return m_name.empty() ? wxTheApp->GetAppDisplayName() : m_name; } + + // version should contain program version without "version" word (e.g., + // "1.2" or "RC2") while longVersion may contain the full version including + // "version" word (e.g., "Version 1.2" or "Release Candidate 2") + // + // if longVersion is empty, it is automatically constructed from version + // + // generic and gtk native: use short version only, as a suffix to the + // program name msw and osx native: use long version + void SetVersion(const wxString& version, + const wxString& longVersion = wxString()); - // version of the program, in free format (but without "version" word) - void SetVersion(const wxString& version) { m_version = version; } bool HasVersion() const { return !m_version.empty(); } const wxString& GetVersion() const { return m_version; } + const wxString& GetLongVersion() const { return m_longVersion; } // brief, but possibly multiline, description of the program void SetDescription(const wxString& desc) { m_description = desc; } @@ -59,7 +69,7 @@ public: // icon to be shown in the dialog, defaults to the main frame icon void SetIcon(const wxIcon& icon) { m_icon = icon; } - bool HasIcon() const { return m_icon.Ok(); } + bool HasIcon() const { return m_icon.IsOk(); } wxIcon GetIcon() const; // web site for the program and its description (defaults to URL itself if @@ -128,9 +138,14 @@ public: // artists and translators) as a one long multiline string wxString GetDescriptionAndCredits() const; + // returns the copyright with the (C) string substituted by the Unicode + // character U+00A9 + wxString GetCopyrightToDisplay() const; + private: wxString m_name, m_version, + m_longVersion, m_description, m_copyright, m_licence; @@ -147,7 +162,7 @@ private: }; // functions to show the about dialog box -WXDLLIMPEXP_ADV void wxAboutBox(const wxAboutDialogInfo& info); +WXDLLIMPEXP_ADV void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* parent = NULL); #endif // wxUSE_ABOUTDLG