This widget provides a dialog for selecting a font. See also Gtk.Font_Selection.
<screenshot>gtk-fontsel</screenshot> <group>Selectors</group> <testgtk>create_font_selection.adb</testgtk>
function "+"
(Widget : access Gtk_Font_Selection_Dialog_Record'Class)
return Gtk.Buildable.Gtk_Buildable
function "-"
(Interf : Gtk.Buildable.Gtk_Buildable)
return Gtk_Font_Selection_Dialog
function Get_Cancel_Button
(Dialog : not null access Gtk_Font_Selection_Dialog_Record)
return Gtk.Widget.Gtk_Widget
Gets the "Cancel" button. Since: gtk+ 2.14 Deprecated since 3.2, 1
the Gtk.Widget.Gtk_Widget used in the dialog for the "Cancel" button.
function Get_Font_Name
(Dialog : not null access Gtk_Font_Selection_Dialog_Record)
return UTF8_String
Gets the currently-selected font name. Note that this can be a different string than what you set with Gtk.Font_Selection_Dialog.Set_Font_Name, as the font selection widget may normalize font names and thus return a string with a different structure. For example, "Helvetica Italic Bold 12" could be normalized to "Helvetica Bold Italic 12". Use Pango.Font.Equal if you want to compare two font descriptions. Deprecated since 3.2, 1
A string with the name of the current font, or null if no font is selected. You must free this string with g_free.
function Get_Font_Selection
(Dialog : not null access Gtk_Font_Selection_Dialog_Record)
return Gtk.Widget.Gtk_Widget
Retrieves the Gtk.Font_Selection.Gtk_Font_Selection widget embedded in the dialog. Since: gtk+ 2.22 Deprecated since 3.2, 1
the embedded Gtk.Font_Selection.Gtk_Font_Selection
function Get_Ok_Button
(Dialog : not null access Gtk_Font_Selection_Dialog_Record)
return Gtk.Widget.Gtk_Widget
Gets the "OK" button. Since: gtk+ 2.14 Deprecated since 3.2, 1
the Gtk.Widget.Gtk_Widget used in the dialog for the "OK" button.
function Get_Preview_Text
(Dialog : not null access Gtk_Font_Selection_Dialog_Record)
return UTF8_String
Gets the text displayed in the preview area. Deprecated since 3.2, 1
the text displayed in the preview area. This string is owned by the widget and should not be modified or freed
function Get_Type return Glib.GType
type Gtk_Font_Selection_Dialog is access all Gtk_Font_Selection_Dialog_Record'Class;
function Gtk_Font_Selection_Dialog_New
(Title : UTF8_String) return Gtk_Font_Selection_Dialog
Creates a new Gtk.Font_Selection_Dialog.Gtk_Font_Selection_Dialog.
the title of the dialog window
type Gtk_Font_Selection_Dialog_Record is new Gtk_Dialog_Record with null record;
procedure Gtk_New
(Dialog : out Gtk_Font_Selection_Dialog;
Title : UTF8_String)
Creates a new Gtk.Font_Selection_Dialog.Gtk_Font_Selection_Dialog. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
the title of the dialog window
package Implements_Gtk_Buildable is new Glib.Types.Implements
(Gtk.Buildable.Gtk_Buildable, Gtk_Font_Selection_Dialog_Record, Gtk_Font_Selection_Dialog);
procedure Initialize
(Dialog : not null access Gtk_Font_Selection_Dialog_Record'Class;
Title : UTF8_String)
Creates a new Gtk.Font_Selection_Dialog.Gtk_Font_Selection_Dialog. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
the title of the dialog window
function Set_Font_Name
(Dialog : not null access Gtk_Font_Selection_Dialog_Record;
Fontname : UTF8_String) return Boolean
Sets the currently selected font. Deprecated since 3.2, 1
a font name like "Helvetica 12" or "Times Bold 18"
True if the font selected in Fsd is now the Fontname specified, False otherwise.
procedure Set_Preview_Text
(Dialog : not null access Gtk_Font_Selection_Dialog_Record;
Text : UTF8_String)
Sets the text displayed in the preview area. Deprecated since 3.2, 1
the text to display in the preview area