gtk.about_dialog

Module for [AboutDialog] class

Types 3

The gtk.about_dialog.AboutDialog offers a simple way to display information about a program.

The shown information includes the programs' 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.

!An example GtkAboutDialog

About dialogs often contain links and email addresses. gtk.about_dialog.AboutDialog displays these as clickable links. By default, it calls gtk.file_launcher.FileLauncher.launch when a user clicks one. The behaviour can be overridden with the gtk.about_dialog.AboutDialog.activateLink signal.

To specify a person with an email address, use a string like Edgar Allan Poe <edgar@poe.com>. To specify a website with a title, use a string like GTK team https://www.gtk.org.

To make constructing a gtk.about_dialog.AboutDialog as convenient as possible, you can use the function func@Gtk.show_about_dialog which constructs and shows a dialog and keeps it around so that it can be shown again.

Note that GTK sets a default title of _("About %s") on the dialog window (where %s is replaced by the name of the application, but in order to ensure proper translation of the title, applications should set the title property explicitly when constructing a gtk.about_dialog.AboutDialog, as shown in the following example:

GFile *logo_file = g_file_new_for_path ("./logo.png");
GdkTexture *example_logo = gdk_texture_new_from_file (logo_file, NULL);
g_object_unref (logo_file);

gtk_show_about_dialog (NULL,
                       "program-name", "ExampleCode",
                       "logo", example_logo,
                       "title", _("About ExampleCode"),
                       NULL);

CSS nodes

gtk.about_dialog.AboutDialog has a single CSS node with the name window and style class .aboutdialog.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
AboutDialog self() nothrowReturns `this`, for use in `with` statements.
AboutDialogGidBuilder builder() static nothrowGet builder for [gtk.about_dialog.AboutDialog] Returns: New builder object
string comments() @property nothrowGet `comments` property. Returns: Comments about the program.
void comments(string propval) @property nothrowSet `comments` property. Params: propval = Comments about the program.
string copyright() @property nothrowGet `copyright` property. Returns: Copyright information for the program.
void copyright(string propval) @property nothrowSet `copyright` property. Params: propval = Copyright information for the program.
string license() @property nothrowGet `license` property. Returns: The license of the program, as free-form text.
void license(string propval) @property nothrowSet `license` property. Params: propval = The license of the program, as free-form text.
gtk.types.License licenseType() @property nothrowGet `licenseType` property. Returns: The license of the program.
void licenseType(gtk.types.License propval) @property nothrowSet `licenseType` property. Params: propval = The license of the program.
gdk.paintable.Paintable logo() @property nothrowGet `logo` property. Returns: A logo for the about box.
void logo(gdk.paintable.Paintable propval) @property nothrowSet `logo` property. Params: propval = A logo for the about box.
string logoIconName() @property nothrowGet `logoIconName` property. Returns: A named icon to use as the logo for the about box.
void logoIconName(string propval) @property nothrowSet `logoIconName` property. Params: propval = A named icon to use as the logo for the about box.
string programName() @property nothrowGet `programName` property. Returns: The name of the program.
void programName(string propval) @property nothrowSet `programName` property. Params: propval = The name of the program.
string systemInformation() @property nothrowGet `systemInformation` property. Returns: Information about the system on which the program is running.
void systemInformation(string propval) @property nothrowSet `systemInformation` property. Params: propval = Information about the system on which the program is running.
string translatorCredits() @property nothrowGet `translatorCredits` property. Returns: Credits to the translators.
void translatorCredits(string propval) @property nothrowSet `translatorCredits` property. Params: propval = Credits to the translators.
string version_() @property nothrowGet `version_` property. Returns: The version of the program.
void version_(string propval) @property nothrowSet `version_` property. Params: propval = The version of the program.
string website() @property nothrowGet `website` property. Returns: The URL for the link to the website of the program.
void website(string propval) @property nothrowSet `website` property. Params: propval = The URL for the link to the website of the program.
string websiteLabel() @property nothrowGet `websiteLabel` property. Returns: The label for the link to the website of the program.
void websiteLabel(string propval) @property nothrowSet `websiteLabel` property. Params: propval = The label for the link to the website of the program.
bool wrapLicense() @property nothrowGet `wrapLicense` property. Returns: Whether to wrap the text in the license dialog.
void wrapLicense(bool propval) @property nothrowSet `wrapLicense` property. Params: propval = Whether to wrap the text in the license dialog.
void addCreditSection(string sectionName, string[] people) nothrowCreates a new section in the "Credits" page.
string[] getArtists() nothrowReturns the names of the artists which are displayed in the credits page. Returns: A `NULL`-terminated string array containing the artists
string[] getAuthors() nothrowReturns the names of the authors which are displayed in the credits page. Returns: A `NULL`-terminated string array containing the authors
string getComments() nothrowReturns the comments string. Returns: The comments
string getCopyright() nothrowReturns the copyright string. Returns: The copyright string
string[] getDocumenters() nothrowReturns the name of the documenters which are displayed in the credits page. Returns: A `NULL`-terminated string array containing the documenters
string getLicense() nothrowReturns the license information. Returns: The license information
gtk.types.License getLicenseType() nothrowRetrieves the license type. Returns: a [gtk.types.License] value
gdk.paintable.Paintable getLogo() nothrowReturns the paintable displayed as logo in the about dialog. Returns: the paintable displayed as logo or `NULL` if the logo is unset or has been set via [gtk.about_dialog.AboutDialog.setLogoIconName]
string getLogoIconName() nothrowReturns the icon name displayed as logo in the about dialog. Returns: the icon name displayed as logo, or `NULL` if the logo has been set via [gtk.about_dialog.AboutDialog.setLogo]
string getProgramName() nothrowReturns the program name displayed in the about dialog. Returns: The program name
string getSystemInformation() nothrowReturns the system information that is shown in the about dialog. Returns: the system information
string getTranslatorCredits() nothrowReturns the translator credits string which is displayed in the credits page. Returns: The translator credits string
string getVersion() nothrowReturns the version string. Returns: The version string
string getWebsite() nothrowReturns the website URL. Returns: The website URL
string getWebsiteLabel() nothrowReturns the label used for the website link. Returns: The label used for the website link
bool getWrapLicense() nothrowReturns whether the license text in the about dialog is automatically wrapped. Returns: `TRUE` if the license text is wrapped
void setArtists(string[] artists) nothrowSets the names of the artists to be displayed in the "Credits" page.
void setAuthors(string[] authors) nothrowSets the names of the authors which are displayed in the "Credits" page of the about dialog.
void setComments(string comments = null) nothrowSets the comments string to display in the about dialog.
void setCopyright(string copyright = null) nothrowSets the copyright string to display in the about dialog.
void setDocumenters(string[] documenters) nothrowSets the names of the documenters which are displayed in the "Credits" page.
void setLicense(string license = null) nothrowSets the license information to be displayed in the about dialog.
void setLicenseType(gtk.types.License licenseType) nothrowSets the license of the application showing the about dialog from a list of known licenses.
void setLogo(gdk.paintable.Paintable logo = null) nothrowSets the logo in the about dialog.
void setLogoIconName(string iconName = null) nothrowSets the icon name to be displayed as logo in the about dialog.
void setProgramName(string name = null) nothrowSets the name to display in the about dialog.
void setSystemInformation(string systemInformation = null) nothrowSets the system information to be displayed in the about dialog.
void setTranslatorCredits(string translatorCredits = null) nothrowSets the translator credits string which is displayed in the credits page.
void setVersion(string version_ = null) nothrowSets the version string to display in the about dialog.
void setWebsite(string website = null) nothrowSets the URL to use for the website link.
void setWebsiteLabel(string websiteLabel) nothrowSets the label to be used for the website link.
void setWrapLicense(bool wrapLicense) nothrowSets whether the license text in the about dialog should be automatically wrapped.
gulong connectActivateLink(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == bool) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] == string))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : gtk.about_dialog.AboutDialog))) && Parameters!T.length < 3) nothrowConnect to `ActivateLink` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new [gtk.about_dialog.AboutDialog]. Returns: a newly created [gtk.about_dialog.AboutDialog]

Fluent builder implementation template for gtk.about_dialog.AboutDialog

Methods
T comments(string propval) nothrowSet `comments` property. Params: propval = Comments about the program.
T copyright(string propval) nothrowSet `copyright` property. Params: propval = Copyright information for the program. Returns: Builder instance for fluent chaining
T license(string propval) nothrowSet `license` property. Params: propval = The license of the program, as free-form text.
T licenseType(gtk.types.License propval) nothrowSet `licenseType` property. Params: propval = The license of the program.
T logo(gdk.paintable.Paintable propval) nothrowSet `logo` property. Params: propval = A logo for the about box.
T logoIconName(string propval) nothrowSet `logoIconName` property. Params: propval = A named icon to use as the logo for the about box.
T programName(string propval) nothrowSet `programName` property. Params: propval = The name of the program.
T systemInformation(string propval) nothrowSet `systemInformation` property. Params: propval = Information about the system on which the program is running.
T translatorCredits(string propval) nothrowSet `translatorCredits` property. Params: propval = Credits to the translators.
T version_(string propval) nothrowSet `version_` property. Params: propval = The version of the program. Returns: Builder instance for fluent chaining
T website(string propval) nothrowSet `website` property. Params: propval = The URL for the link to the website of the program.
T websiteLabel(string propval) nothrowSet `websiteLabel` property. Params: propval = The label for the link to the website of the program. Returns: Builder instance for fluent chaining
T wrapLicense(bool propval) nothrowSet `wrapLicense` property. Params: propval = Whether to wrap the text in the license dialog. Returns: Builder instance for fluent chaining

Fluent builder for gtk.about_dialog.AboutDialog

Methods
AboutDialog build() nothrowCreate object from builder. Returns: New object