gtkmm  3.4.0
Public Member Functions | Protected Member Functions | Related Functions
Gtk::AboutDialog Class Reference

The AboutDialog offers a simple way to display information about a program like its logo, name, copyright, website and license. More...

Inheritance diagram for Gtk::AboutDialog:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~AboutDialog ()
GtkAboutDialog* gobj ()
 Provides access to the underlying C GtkObject.
const GtkAboutDialog* gobj () const
 Provides access to the underlying C GtkObject.
 AboutDialog ()
Glib::ustring get_program_name () const
 Return value: The program name.
void set_program_name (const Glib::ustring& name)
 Sets the name to display in the about dialog.
Glib::ustring get_version () const
 Returns the version string.
void set_version (const Glib::ustring& version)
 Sets the version string to display in the about dialog.
Glib::ustring get_copyright () const
 Returns the copyright string.
void set_copyright (const Glib::ustring& copyright)
 Sets the copyright string to display in the about dialog.
Glib::ustring get_comments () const
 Returns the comments string.
void set_comments (const Glib::ustring& comments)
 Sets the comments string to display in the about dialog.
Glib::ustring get_license () const
 Returns the license information.
void set_license (const Glib::ustring& license)
 Sets the license information to be displayed in the secondary license dialog.
void unset_license ()
 Hides the license button.
License get_license_type () const
 Retrieves the license set using set_license_type()
void set_license_type (License license_type)
 Sets the license of the application showing the about dialog from a list of known licenses.
Glib::ustring get_website () const
 Returns the website URL.
void set_website (const Glib::ustring& website)
 Sets the URL to use for the website link.
Glib::ustring get_website_label () const
 Return value: The label used for the website link.
void set_website_label (const Glib::ustring& website_label)
 Sets the label to be used for the website link.
std::vector< Glib::ustringget_authors () const
 Returns the string which are displayed in the authors tab of the secondary credits dialog.
void set_authors (const std::vector< Glib::ustring >& authors) const
 Sets the strings which are displayed in the authors tab of the secondary credits dialog.
std::vector< Glib::ustringget_documenters () const
 Returns the string which are displayed in the documenters tab of the secondary credits dialog.
void set_documenters (const std::vector< Glib::ustring >& documenters)
 Sets the strings which are displayed in the documenters tab of the secondary credits dialog.
std::vector< Glib::ustringget_artists () const
 Returns the string which are displayed in the artists tab of the secondary credits dialog.
void set_artists (const std::vector< Glib::ustring >& artists)
 Sets the strings which are displayed in the artists tab of the secondary credits dialog.
Glib::ustring get_translator_credits () const
 Returns the translator credits string which is displayed in the translators tab of the secondary credits dialog.
void set_translator_credits (const Glib::ustring& translator_credits)
 Sets the translator credits string which is displayed in the translators tab of the secondary credits dialog.
Glib::RefPtr< Gdk::Pixbufget_logo ()
 Returns the pixbuf displayed as logo in the about dialog.
Glib::RefPtr< const Gdk::Pixbufget_logo () const
 Returns the pixbuf displayed as logo in the about dialog.
void set_logo (const Glib::RefPtr< Gdk::Pixbuf >& logo)
 Sets the pixbuf to be displayed as logo in the about dialog.
void set_logo_default ()
 Sets the pixbuf to be displayed as logo in the about dialog.
Glib::ustring get_logo_icon_name () const
 Returns the icon name displayed as logo in the about dialog.
void set_logo_icon_name (const Glib::ustring& icon_name)
 Sets the pixbuf to be displayed as logo in the about dialog.
bool get_wrap_license () const
 Returns whether the license text in about is automatically wrapped.
void set_wrap_license (bool wrap_license)
 Sets whether the license text in about is automatically wrapped.
void add_credit_section (const Glib::ustring& section_name, const std::vector< Glib::ustring >& people)
 Creates a new section in the Credits page.
Glib::PropertyProxy
< Glib::ustring
property_program_name ()
 The name of the program.
Glib::PropertyProxy_ReadOnly
< Glib::ustring
property_program_name () const
 The name of the program.
Glib::PropertyProxy
< Glib::ustring
property_version ()
 The version of the program.
Glib::PropertyProxy_ReadOnly
< Glib::ustring
property_version () const
 The version of the program.
Glib::PropertyProxy
< Glib::ustring
property_copyright ()
 Copyright information for the program.
Glib::PropertyProxy_ReadOnly
< Glib::ustring
property_copyright () const
 Copyright information for the program.
Glib::PropertyProxy
< Glib::ustring
property_comments ()
 Comments about the program.
Glib::PropertyProxy_ReadOnly
< Glib::ustring
property_comments () const
 Comments about the program.
Glib::PropertyProxy
< Glib::ustring
property_website ()
 The URL for the link to the website of the program.
Glib::PropertyProxy_ReadOnly
< Glib::ustring
property_website () const
 The URL for the link to the website of the program.
Glib::PropertyProxy
< Glib::ustring
property_website_label ()
 The label for the link to the website of the program.
Glib::PropertyProxy_ReadOnly
< Glib::ustring
property_website_label () const
 The label for the link to the website of the program.
Glib::PropertyProxy
< Glib::ustring
property_license ()
 The license of the program.
Glib::PropertyProxy_ReadOnly
< Glib::ustring
property_license () const
 The license of the program.
Glib::PropertyProxy< Licenseproperty_license_type ()
 The license type of the program.
Glib::PropertyProxy_ReadOnly
< License
property_license_type () const
 The license type of the program.
Glib::PropertyProxy
< std::vector< Glib::ustring > > 
property_authors ()
 List of authors of the program.
Glib::PropertyProxy_ReadOnly
< std::vector< Glib::ustring > > 
property_authors () const
 List of authors of the program.
Glib::PropertyProxy
< std::vector< Glib::ustring > > 
property_documenters ()
 List of people documenting the program.
Glib::PropertyProxy_ReadOnly
< std::vector< Glib::ustring > > 
property_documenters () const
 List of people documenting the program.
Glib::PropertyProxy
< std::vector< Glib::ustring > > 
property_translator_credits ()
 Credits to the translators.
Glib::PropertyProxy_ReadOnly
< std::vector< Glib::ustring > > 
property_translator_credits () const
 Credits to the translators.
Glib::PropertyProxy
< std::vector< Glib::ustring > > 
property_artists ()
 List of people who have contributed artwork to the program.
Glib::PropertyProxy_ReadOnly
< std::vector< Glib::ustring > > 
property_artists () const
 List of people who have contributed artwork to the program.
Glib::PropertyProxy
< Glib::RefPtr< Gdk::Pixbuf > > 
property_logo ()
 A logo for the about box.
Glib::PropertyProxy_ReadOnly
< Glib::RefPtr< Gdk::Pixbuf > > 
property_logo () const
 A logo for the about box.
Glib::PropertyProxy
< Glib::ustring
property_logo_icon_name ()
 A named icon to use as the logo for the about box.
Glib::PropertyProxy_ReadOnly
< Glib::ustring
property_logo_icon_name () const
 A named icon to use as the logo for the about box.
Glib::PropertyProxy< bool > property_wrap_license ()
 Whether to wrap the license text.
Glib::PropertyProxy_ReadOnly
< bool > 
property_wrap_license () const
 Whether to wrap the license text.
Glib::SignalProxy1< bool,
const std::string& > 
signal_activate_link ()

Protected Member Functions

virtual bool on_activate_link (const std::string& uri)
 This is a default handler for the signal signal_activate_link().

Related Functions

(Note that these are not member functions.)

Gtk::AboutDialogwrap (GtkAboutDialog* object, bool take_copy=false)
 A Glib::wrap() method for this object.

Detailed Description

The AboutDialog offers a simple way to display information about a program like its logo, name, copyright, website and license.

It is also possible to give credits to the authors, documenters, translators and artists who have worked on the program. An about dialog is typically opened when the user selects the About option from the Help menu. All parts of the dialog are optional.

About dialogs often contain links and email addresses. Gtk::AboutDialog displays these as clickable links. By default, it calls gtk_show_uri() when a user clicks one. The behaviour can be overridden with the activate_link signal. Email addresses in the authors, documenters and artists properties are recognized by looking for <user>, URLs are recognized by looking for http://url, with the URL extending to the next space, tab or line break.

An AboutDialog looks like this:

aboutdialog1.png

Constructor & Destructor Documentation

virtual Gtk::AboutDialog::~AboutDialog ( ) [virtual]

Member Function Documentation

void Gtk::AboutDialog::add_credit_section ( const Glib::ustring section_name,
const std::vector< Glib::ustring > &  people 
)

Creates a new section in the Credits page.

Since gtkmm 3.4:
Parameters:
section_nameThe name of the section.
peopleThe people who belong to that section.

Returns the string which are displayed in the artists tab of the secondary credits dialog.

Since gtkmm 2.6:
Returns:
A 0-terminated string array containing the artists. The array is owned by the about dialog and must not be modified.

Returns the string which are displayed in the authors tab of the secondary credits dialog.

Since gtkmm 2.6:
Returns:
A 0-terminated string array containing the authors. The array is owned by the about dialog and must not be modified.

Returns the comments string.

Since gtkmm 2.6:
Returns:
The comments. The string is owned by the about dialog and must not be modified.

Returns the copyright string.

Since gtkmm 2.6:
Returns:
The copyright string. The string is owned by the about dialog and must not be modified.

Returns the string which are displayed in the documenters tab of the secondary credits dialog.

Since gtkmm 2.6:
Returns:
A 0-terminated string array containing the documenters. The array is owned by the about dialog and must not be modified.

Returns the license information.

Since gtkmm 2.6:
Returns:
The license information. The string is owned by the about dialog and must not be modified.

Retrieves the license set using set_license_type()

Since gtkmm 3.0:
Returns:
A Gtk::License value.

Returns the pixbuf displayed as logo in the about dialog.

Since gtkmm 2.6:
Returns:
The pixbuf displayed as logo. The pixbuf is owned by the about dialog. If you want to keep a reference to it, you have to call Glib::object_ref() on it.

Returns the pixbuf displayed as logo in the about dialog.

Since gtkmm 2.6:
Returns:
The pixbuf displayed as logo. The pixbuf is owned by the about dialog. If you want to keep a reference to it, you have to call Glib::object_ref() on it.

Returns the icon name displayed as logo in the about dialog.

Since gtkmm 2.6:
Returns:
The icon name displayed as logo. The string is owned by the dialog. If you want to keep a reference to it, you have to call Glib::strdup() on it.

Return value: The program name.

Returns:
The program name.
Since gtkmm 2.12:

Returns the translator credits string which is displayed in the translators tab of the secondary credits dialog.

Since gtkmm 2.6:
Returns:
The translator credits string. The string is owned by the about dialog and must not be modified.

Returns the version string.

Since gtkmm 2.6:
Returns:
The version string. The string is owned by the about dialog and must not be modified.

Returns the website URL.

Since gtkmm 2.6:
Returns:
The website URL. The string is owned by the about dialog and must not be modified.

Return value: The label used for the website link.

Returns:
The label used for the website link.
Since gtkmm 2.6:

Returns whether the license text in about is automatically wrapped.

Since gtkmm 2.8:
Returns:
true if the license text is wrapped.
GtkAboutDialog* Gtk::AboutDialog::gobj ( ) [inline]

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Dialog.

const GtkAboutDialog* Gtk::AboutDialog::gobj ( ) const [inline]

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Dialog.

virtual bool Gtk::AboutDialog::on_activate_link ( const std::string uri) [protected, virtual]

This is a default handler for the signal signal_activate_link().

List of people who have contributed artwork to the program.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

List of people who have contributed artwork to the program.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

List of authors of the program.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

List of authors of the program.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Comments about the program.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Comments about the program.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Copyright information for the program.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Copyright information for the program.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

List of people documenting the program.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

List of people documenting the program.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

The license of the program.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

The license of the program.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

The license type of the program.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

The license type of the program.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

A logo for the about box.

If this is not set, it defaults to gtk_window_get_default_icon_list().

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

A logo for the about box.

If this is not set, it defaults to gtk_window_get_default_icon_list().

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

A named icon to use as the logo for the about box.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

A named icon to use as the logo for the about box.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

The name of the program.

If this is not set, it defaults to g_get_application_name().

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

The name of the program.

If this is not set, it defaults to g_get_application_name().

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Credits to the translators.

This string should be marked as translatable.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Credits to the translators.

This string should be marked as translatable.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

The version of the program.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

The version of the program.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

The URL for the link to the website of the program.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

The URL for the link to the website of the program.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

The label for the link to the website of the program.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

The label for the link to the website of the program.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Whether to wrap the license text.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Whether to wrap the license text.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.

Sets the strings which are displayed in the artists tab of the secondary credits dialog.

Since gtkmm 2.6:
Parameters:
artistsA 0-terminated array of strings.
void Gtk::AboutDialog::set_authors ( const std::vector< Glib::ustring > &  authors) const

Sets the strings which are displayed in the authors tab of the secondary credits dialog.

Since gtkmm 2.6:
Parameters:
authorsA 0-terminated array of strings.
void Gtk::AboutDialog::set_comments ( const Glib::ustring comments)

Sets the comments string to display in the about dialog.

This should be a short string of one or two lines.

Since gtkmm 2.6:
Parameters:
commentsA comments string.
void Gtk::AboutDialog::set_copyright ( const Glib::ustring copyright)

Sets the copyright string to display in the about dialog.

This should be a short string of one or two lines.

Since gtkmm 2.6:
Parameters:
copyright(allow-none) the copyright string.

Sets the strings which are displayed in the documenters tab of the secondary credits dialog.

Since gtkmm 2.6:
Parameters:
documentersA 0-terminated array of strings.
void Gtk::AboutDialog::set_license ( const Glib::ustring license)

Sets the license information to be displayed in the secondary license dialog.

If license is 0, the license button is hidden.

Since gtkmm 2.6:
Parameters:
licenseThe license information or 0.

Sets the license of the application showing the about dialog from a list of known licenses.

This function overrides the license set using set_license().

Since gtkmm 3.0:
Parameters:
license_typeThe type of license.

Sets the pixbuf to be displayed as logo in the about dialog.

If it is 0, the default window icon set with Gtk::Window::set_default_icon() will be used.

Since gtkmm 2.6:
Parameters:
logoA Gdk::Pixbuf, or 0.

Sets the pixbuf to be displayed as logo in the about dialog.

The logo is set to the default window icon set with Gtk::Window::set_default_icon() or Gtk::Window::set_default_icon_list().

Since gtkmm 3.4:

Sets the pixbuf to be displayed as logo in the about dialog.

If it is 0, the default window icon set with Gtk::Window::set_default_icon() will be used.

Since gtkmm 2.6:
Parameters:
icon_nameAn icon name, or 0.

Sets the name to display in the about dialog.

If this is not set, it defaults to Glib::get_application_name().

Since gtkmm 2.12:
Parameters:
nameThe program name.
void Gtk::AboutDialog::set_translator_credits ( const Glib::ustring translator_credits)

Sets the translator credits string which is displayed in the translators tab of the secondary credits dialog.

The intended use for this string is to display the translator of the language which is currently used in the user interface. Using gettext(), a simple way to achieve that is to mark the string for translation:

[C example ellipted] It is a good idea to use the customary msgid "translator-credits" for this purpose, since translators will already know the purpose of that msgid, and since Gtk::AboutDialog will detect if "translator-credits" is untranslated and hide the tab.

Since gtkmm 2.6:
Parameters:
translator_creditsThe translator credits.
void Gtk::AboutDialog::set_version ( const Glib::ustring version)

Sets the version string to display in the about dialog.

Since gtkmm 2.6:
Parameters:
versionThe version string.
void Gtk::AboutDialog::set_website ( const Glib::ustring website)

Sets the URL to use for the website link.

Since gtkmm 2.6:
Parameters:
websiteA URL string starting with "http://".
void Gtk::AboutDialog::set_website_label ( const Glib::ustring website_label)

Sets the label to be used for the website link.

Since gtkmm 2.6:
Parameters:
website_labelThe label used for the website link.
void Gtk::AboutDialog::set_wrap_license ( bool  wrap_license)

Sets whether the license text in about is automatically wrapped.

Since gtkmm 2.8:
Parameters:
wrap_licenseWhether to wrap the license.
Slot Prototype:
bool on_my_activate_link(const std::string& uri)

The signal which gets emitted to activate a URI. Applications may connect to it to override the default behaviour, which is to call gtk_show_uri().

Since gtkmm 2.24:
Parameters:
uriThe URI that is activated.
Returns:
true if the link has been activated.

Hides the license button.

Since gtkmm 3.4:

Friends And Related Function Documentation

Gtk::AboutDialog* wrap ( GtkAboutDialog *  object,
bool  take_copy = false 
) [related]

A Glib::wrap() method for this object.

Parameters:
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file: