package Gtk_License_Properties is new Generic_Internal_Discrete_Property (Gtk_License);
package Implements_Gtk_Buildable is new Glib.Types.Implements (Gtk.Buildable.Gtk_Buildable, Gtk_About_Dialog_Record, Gtk_About_Dialog);
type Gtk_About_Dialog_Record is new Gtk_Dialog_Record with null record;
type Gtk_About_Dialog is access all Gtk_About_Dialog_Record'Class;
type Gtk_License is ( License_Unknown, License_Custom, License_Gpl_2_0, License_Gpl_3_0, License_Lgpl_2_1, License_Lgpl_3_0, License_Bsd, License_Mit_X11, License_Artistic);
type Property_Gtk_License is new Gtk_License_Properties.Property;
type Cb_Gtk_About_Dialog_UTF8_String_Boolean is not null access function (Self : access Gtk_About_Dialog_Record'Class; URI : UTF8_String) return Boolean;
type Cb_GObject_UTF8_String_Boolean is not null access function (Self : access Glib.Object.GObject_Record'Class; URI : UTF8_String) return Boolean;
Artists_Property : constant Glib.Properties.Property_String := Glib.Properties.Build ("artists");
Authors_Property : constant Glib.Properties.Property_String := Glib.Properties.Build ("authors");
Documenters_Property : constant Glib.Properties.Property_String := Glib.Properties.Build ("documenters");
Comments_Property : constant Glib.Properties.Property_String;
Copyright_Property : constant Glib.Properties.Property_String;
License_Property : constant Glib.Properties.Property_String;
License_Type_Property : constant Gtk.About_Dialog.Property_Gtk_License;
Logo_Property : constant Glib.Properties.Property_Object;
Logo_Icon_Name_Property : constant Glib.Properties.Property_String;
Program_Name_Property : constant Glib.Properties.Property_String;
Translator_Credits_Property : constant Glib.Properties.Property_String;
Version_Property : constant Glib.Properties.Property_String;
Website_Property : constant Glib.Properties.Property_String;
Website_Label_Property : constant Glib.Properties.Property_String;
Wrap_License_Property : constant Glib.Properties.Property_Boolean;
Signal_Activate_Link : constant Glib.Signal_Name := "activate-link";
procedure Gtk_New
( | About | : out Gtk_About_Dialog); |
procedure Initialize
( | About | : not null access Gtk_About_Dialog_Record'Class); |
function Gtk_About_Dialog_New return Gtk_About_Dialog;
function Get_Type return Glib.GType;
procedure Add_Credit_Section
( | About | : not null access Gtk_About_Dialog_Record; |
Section_Name | : UTF8_String; | |
People | : GNAT.Strings.String_List); |
function Get_Artists
( | About | : not null access Gtk_About_Dialog_Record) return GNAT.Strings.String_List; |
procedure Set_Artists
( | About | : not null access Gtk_About_Dialog_Record; |
Artists | : GNAT.Strings.String_List); |
function Get_Authors
( | About | : not null access Gtk_About_Dialog_Record) return GNAT.Strings.String_List; |
procedure Set_Authors
( | About | : not null access Gtk_About_Dialog_Record; |
Authors | : GNAT.Strings.String_List); |
function Get_Comments
( | About | : not null access Gtk_About_Dialog_Record) return UTF8_String; |
procedure Set_Comments
( | About | : not null access Gtk_About_Dialog_Record; |
Comments | : UTF8_String := ""); |
function Get_Copyright
( | About | : not null access Gtk_About_Dialog_Record) return UTF8_String; |
procedure Set_Copyright
( | About | : not null access Gtk_About_Dialog_Record; |
Copyright | : UTF8_String := ""); |
function Get_Documenters
( | About | : not null access Gtk_About_Dialog_Record) return GNAT.Strings.String_List; |
procedure Set_Documenters
( | About | : not null access Gtk_About_Dialog_Record; |
Documenters | : GNAT.Strings.String_List); |
function Get_License
( | About | : not null access Gtk_About_Dialog_Record) return UTF8_String; |
procedure Set_License
( | About | : not null access Gtk_About_Dialog_Record; |
License | : UTF8_String := ""); |
function Get_License_Type
( | About | : not null access Gtk_About_Dialog_Record) return Gtk_License; |
procedure Set_License_Type
( | About | : not null access Gtk_About_Dialog_Record; |
License_Type | : Gtk_License); |
function Get_Logo
( | About | : not null access Gtk_About_Dialog_Record) return Gdk.Pixbuf.Gdk_Pixbuf; |
procedure Set_Logo
( | About | : not null access Gtk_About_Dialog_Record; |
Logo | : access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class); |
function Get_Logo_Icon_Name
( | About | : not null access Gtk_About_Dialog_Record) return UTF8_String; |
procedure Set_Logo_Icon_Name
( | About | : not null access Gtk_About_Dialog_Record; |
Icon_Name | : UTF8_String := ""); |
function Get_Program_Name
( | About | : not null access Gtk_About_Dialog_Record) return UTF8_String; |
procedure Set_Program_Name
( | About | : not null access Gtk_About_Dialog_Record; |
Name | : UTF8_String); |
function Get_Translator_Credits
( | About | : not null access Gtk_About_Dialog_Record) return UTF8_String; |
procedure Set_Translator_Credits
( | About | : not null access Gtk_About_Dialog_Record; |
Translator_Credits | : UTF8_String := ""); |
function Get_Version
( | About | : not null access Gtk_About_Dialog_Record) return UTF8_String; |
procedure Set_Version
( | About | : not null access Gtk_About_Dialog_Record; |
Version | : UTF8_String := ""); |
function Get_Website
( | About | : not null access Gtk_About_Dialog_Record) return UTF8_String; |
procedure Set_Website
( | About | : not null access Gtk_About_Dialog_Record; |
Website | : UTF8_String := ""); |
function Get_Website_Label
( | About | : not null access Gtk_About_Dialog_Record) return UTF8_String; |
procedure Set_Website_Label
( | About | : not null access Gtk_About_Dialog_Record; |
Website_Label | : UTF8_String); |
function Get_Wrap_License
( | About | : not null access Gtk_About_Dialog_Record) return Boolean; |
procedure Set_Wrap_License
( | About | : not null access Gtk_About_Dialog_Record; |
Wrap_License | : Boolean); |
procedure On_Activate_Link
( | Self | : not null access Gtk_About_Dialog_Record; |
Call | : Cb_Gtk_About_Dialog_UTF8_String_Boolean; | |
After | : Boolean := False); |
procedure On_Activate_Link
( | Self | : not null access Gtk_About_Dialog_Record; |
Call | : Cb_GObject_UTF8_String_Boolean; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
function "+"
( | Widget | : access Gtk_About_Dialog_Record'Class) return Gtk.Buildable.Gtk_Buildable renames Implements_Gtk_Buildable.To_Interface; |
function "-"
( | Interf | : Gtk.Buildable.Gtk_Buildable) return Gtk_About_Dialog renames Implements_Gtk_Buildable.To_Object; |
The GtkAboutDialog 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 dialog often contain links and email addresses. GtkAboutDialog displays these as clickable links. By default, it calls gtk_show_uri() when a user clicks one. The behaviour can be overridden with the Gtk.About_Dialog.Gtk_About_Dialog::activate-link signal.
To make constructing a GtkAboutDialog as convenient as possible, you can use the function 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 GtkAboutDialog, as shown in the following example: gtk_show_about_dialog (NULL, "program-name", "ExampleCode", "logo", example_logo, "title" _("About ExampleCode"), NULL); It is also possible to show a Gtk.About_Dialog.Gtk_About_Dialog like any other Gtk.Dialog.Gtk_Dialog, e.g. using Gtk.Dialog.Run. In this case, you might need to know that the 'Close' button returns the GTK_RESPONSE_CANCEL response id.