Gtk.Font_Selection_Dialog

Entities

Tagged Types

Access Types

Subprograms

Generic Instantiations

Description

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
Parameters
Widget
Return Value

"-"

function "-"
  (Interf : Gtk.Buildable.Gtk_Buildable)
return Gtk_Font_Selection_Dialog
Parameters
Interf
Return Value

Get_Cancel_Button

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

Parameters
Dialog
Return Value

the Gtk.Widget.Gtk_Widget used in the dialog for the "Cancel" button.

Get_Font_Name

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

Parameters
Dialog
Return Value

A string with the name of the current font, or null if no font is selected. You must free this string with g_free.

Get_Font_Selection

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

Parameters
Dialog
Return Value

the embedded Gtk.Font_Selection.Gtk_Font_Selection

Get_Ok_Button

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

Parameters
Dialog
Return Value

the Gtk.Widget.Gtk_Widget used in the dialog for the "OK" button.

Get_Preview_Text

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

Parameters
Dialog
Return Value

the text displayed in the preview area. This string is owned by the widget and should not be modified or freed

Get_Type

function Get_Type return Glib.GType
Return Value

Gtk_Font_Selection_Dialog

type Gtk_Font_Selection_Dialog is access all Gtk_Font_Selection_Dialog_Record'Class;

Gtk_Font_Selection_Dialog_New

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.

Parameters
Title

the title of the dialog window

Return Value

Gtk_Font_Selection_Dialog_Record

type Gtk_Font_Selection_Dialog_Record is new Gtk_Dialog_Record with null record;

Gtk_New

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.

Parameters
Dialog
Title

the title of the dialog window

Implements_Gtk_Buildable

package Implements_Gtk_Buildable is new Glib.Types.Implements
  (Gtk.Buildable.Gtk_Buildable, Gtk_Font_Selection_Dialog_Record, Gtk_Font_Selection_Dialog);

Initialize

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.

Parameters
Dialog
Title

the title of the dialog window

Set_Font_Name

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

Parameters
Dialog
Fontname

a font name like "Helvetica 12" or "Times Bold 18"

Return Value

True if the font selected in Fsd is now the Fontname specified, False otherwise.

Set_Preview_Text

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

Parameters
Dialog
Text

the text to display in the preview area