Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::Gtk::AboutDialog Class Reference

A GtkAboutDialog C++ wrapper class. More...

#include <xfc/gtk/aboutdialog.hh>

Inheritance diagram for Xfc::Gtk::AboutDialog:

Xfc::Gtk::Dialog Xfc::Gtk::Window Xfc::Gtk::Bin Xfc::Gtk::Container Xfc::Gtk::Widget Xfc::Gtk::Object Xfc::Atk::Implementor Xfc::G::Object Xfc::G::TypeInterface Xfc::G::TypeInstance Xfc::G::TypeInstance Xfc::Trackable Xfc::Trackable List of all members.

Public Types

Public Member Functions

Constructors
Accessors
Methods

Static Public Member Functions

Methods

Protected Member Functions

Constructors

Detailed Description

A GtkAboutDialog C++ wrapper class.

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. AboutDialog supports this by letting you to set a callback slot, which is called when the user clicks on a link or email address (see set_email_hook() and set_url_hook(). Email addresses in the authors, documenters and artists properties are recognized by looking for <user@host>, URLs are recognized by looking for http://url, with url extending to the next space, tab or line break.


Member Typedef Documentation

typedef sigc::slot<void, AboutDialog&, const String&> Xfc::Gtk::AboutDialog::ActivateLinkSlot
 

Signature of the callback slot to be called when a URL or email link is activated.

Example: Method signature for ActivateLinkSlot.

             void method(AboutDialog& about, const String& link);
             // about: the AboutDialog in which the link was activated.
             // link: the URL or email address to which the activated link points.


Constructor & Destructor Documentation

Xfc::Gtk::AboutDialog::AboutDialog GtkAboutDialog *  about,
bool  owns_reference = false
[explicit, protected]
 

Construct a new AboutDialog from an existing GtkAboutDialog.

Parameters:
about A pointer to a GtkAboutDialog.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The about can be a newly created GtkAboutDialog or an existing GtkAboutDialog. (see G::Object::Object).

Xfc::Gtk::AboutDialog::AboutDialog const String name,
const String version
 

Construct a new about dialog with the specified name and version.

Parameters:
name The program name.
version The version string.
If name is not set, it defaults to g_get_application_name().

Xfc::Gtk::AboutDialog::AboutDialog const String name,
const String version,
const String copyright,
Gdk::Pixbuf logo = 0
 

Construct a new about dialog with the specified name, version and logo.

Parameters:
name The program name.
version The version string.
copyright The copyright string.
logo A Gdk::Pixbuf, or null.
If name is not set, it defaults to g_get_application_name().


Member Function Documentation

std::vector<String> Xfc::Gtk::AboutDialog::get_artists  )  const
 

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

Returns:
A vector of String containing the artists.

std::vector<String> Xfc::Gtk::AboutDialog::get_authors  )  const
 

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

Returns:
A vector of String containing the authors.

String Xfc::Gtk::AboutDialog::get_comments  )  const
 

Gets the comments string.

Returns:
The comments string.

String Xfc::Gtk::AboutDialog::get_copyright  )  const
 

Gets the copyright string.

Returns:
The copyright string.

std::vector<String> Xfc::Gtk::AboutDialog::get_documenters  )  const
 

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

Returns:
A vector of String containing the documenters.

String Xfc::Gtk::AboutDialog::get_license  )  const
 

Gets the license information.

Returns:
The license information.

Gdk::Pixbuf* Xfc::Gtk::AboutDialog::get_logo  )  const
 

Gets the pixbuf displayed as the logo in the about dialog.

Returns:
The pixbuf displayed as the logo.

String Xfc::Gtk::AboutDialog::get_logo_icon_name  )  const
 

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

Returns:
The icon name displayed as the logo.

String Xfc::Gtk::AboutDialog::get_name  )  const
 

Gets the program name displayed in the about dialog.

Returns:
The program name.

Reimplemented from Xfc::Gtk::Widget.

String Xfc::Gtk::AboutDialog::get_translator_credits  )  const
 

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

Returns:
The translator credits string.

String Xfc::Gtk::AboutDialog::get_version  )  const
 

Gets the version string.

Returns:
The version string.

String Xfc::Gtk::AboutDialog::get_website  )  const
 

Gets the website URL.

Returns:
The website URL.

String Xfc::Gtk::AboutDialog::get_website_label  )  const
 

Get the label used for the website link.

Returns:
The label used for the website link.

void Xfc::Gtk::AboutDialog::set_artists const std::vector< String > &  artists  ) 
 

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

Parameters:
artists A vector of String containing the artists.

void Xfc::Gtk::AboutDialog::set_authors const std::vector< String > &  authors  ) 
 

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

Parameters:
authors A vector of String containing the authors.

void Xfc::Gtk::AboutDialog::set_comments const String comments  ) 
 

Sets the comments string to display in the about dialog.

Parameters:
comments The comments copyright.
This should be a short string of one or two lines.

void Xfc::Gtk::AboutDialog::set_copyright const String copyright  ) 
 

Sets the copyright string to display in the about dialog.

Parameters:
copyright The copyright copyright.
This should be a short string of one or two lines.

void Xfc::Gtk::AboutDialog::set_documenters const std::vector< String > &  documenters  ) 
 

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

Parameters:
documenters A vector of String containing the documenters.

void Xfc::Gtk::AboutDialog::set_email_hook const ActivateLinkSlot slot  )  [static]
 

Installs a global callback slot to be called whenever the user activates an email link in an about dialog.

param slot The slot to call when an email link is activated.

void Xfc::Gtk::AboutDialog::set_license const String license  ) 
 

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

Parameters:
license The license information, or null.
If license is null, the license button is hidden.

void Xfc::Gtk::AboutDialog::set_logo Gdk::Pixbuf logo  ) 
 

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

Parameters:
logo A Gdk::Pixbuf, or null.
If logo is null, the default window icon set with Gtk::Window::set_default_icon() will be used.

void Xfc::Gtk::AboutDialog::set_logo_icon_name const String icon_name  ) 
 

Sets the icon name to be displayed as the logo in the about dialog.

Parameters:
icon_name The icon name to display as the logo.

void Xfc::Gtk::AboutDialog::set_name const String name  ) 
 

Sets the name to display in the about dialog.

Parameters:
name The program name.
If this is not set, the name defaults to g_get_application_name().

Reimplemented from Xfc::Gtk::Widget.

void Xfc::Gtk::AboutDialog::set_translator_credits const String translator_credits  ) 
 

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

Parameters:
translator_credits The translator credits string.
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:

             dialog->set_translator_credits(_("translator-credits"));

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 AboutDialog will detect if "translator-credits" is untranslated and hide the tab.

void Xfc::Gtk::AboutDialog::set_url_hook const ActivateLinkSlot slot  )  [static]
 

Installs a global callback slot to be called whenever the user activates a URL link in an about dialog.

Parameters:
slot The slot to call when a URL link is activated.

void Xfc::Gtk::AboutDialog::set_version const String version  ) 
 

Sets the version string to display in the about dialog.

Parameters:
version The version string.

void Xfc::Gtk::AboutDialog::set_website const String website  ) 
 

Sets the URL to use for the website link.

Parameters:
website A URL string starting with "http://".

void Xfc::Gtk::AboutDialog::set_website_label const String website_label  ) 
 

Sets the label to be used for the website link.

Parameters:
website_label The label used for the website link.
The default label is the website URL.


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3