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


Public Types | Public Member Functions | Static Public Member Functions
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

Static Public 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:
aboutA pointer to a GtkAboutDialog.
owns_referenceSet 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:
nameThe program name.
versionThe 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:
nameThe program name.
versionThe version string.
copyrightThe copyright string.
logoA Gdk::Pixbuf, or null.

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


Member Function Documentation

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

Returns:
A vector of String containing the artists.

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

Returns:
A vector of String containing the authors.

Gets the comments string.

Returns:
The comments string.

Gets the copyright string.

Returns:
The copyright string.

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

Returns:
A vector of String containing the documenters.

Gets the license information.

Returns:
The license information.

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

Returns:
The pixbuf displayed as the logo.

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

Returns:
The icon name displayed as the logo.

Gets the program name displayed in the about dialog.

Returns:
The program name.

Reimplemented from Xfc::Gtk::Widget.

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

Returns:
The translator credits string.

Gets the version string.

Returns:
The version string.

Gets the website URL.

Returns:
The website URL.

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:
artistsA 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:
authorsA 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:
commentsThe comments text.

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:
copyrightThe copyright text.

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:
documentersA vector of String containing the documenters.
static 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:
licenseThe license information, or null.

If license is null, the license button is hidden.

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

Parameters:
logoA 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_nameThe 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:
nameThe 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_creditsThe 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.

static 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:
slotThe 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:
versionThe version string.
void Xfc::Gtk::AboutDialog::set_website ( const String website)

Sets the URL to use for the website link.

Parameters:
websiteA 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_labelThe 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