Index

Package: Font_Chooser

Description

package Gtk.Font_Chooser is
Gtk.Font_Chooser.Gtk_Font_Chooser is an interface that can be implemented by widgets displaying the list of fonts. In GTK+, the main objects that implement this interface are Gtk.Font_Chooser_Widget.Gtk_Font_Chooser_Widget, Gtk.Font_Chooser_Dialog.Gtk_Font_Chooser_Dialog and Gtk.Font_Button.Gtk_Font_Button.

Packages

Set_Filter_Func_User_Data (generic)

Types

Gtk_Font_Chooser

type Gtk_Font_Chooser is new Glib.Types.GType_Interface;

Gtk_Font_Filter_Func

type Gtk_Font_Filter_Func is access function
     (Family : not null access Pango.Font_Family.Pango_Font_Family_Record'Class;
      Face   : not null access Pango.Font_Face.Pango_Font_Face_Record'Class)
   return Boolean;
The type of function that is used for deciding what fonts get shown in a Gtk.Font_Chooser.Gtk_Font_Chooser. See Gtk.Font_Chooser.Set_Filter_Func. "family": a Pango.Font_Family.Pango_Font_Family "face": a Pango.Font_Face.Pango_Font_Face belonging to Family

Cb_Gtk_Font_Chooser_UTF8_String_Void

type Cb_Gtk_Font_Chooser_UTF8_String_Void is not null access procedure
     (Self     : Gtk_Font_Chooser;
      Fontname : UTF8_String);

Cb_GObject_UTF8_String_Void

type Cb_GObject_UTF8_String_Void is not null access procedure
     (Self     : access Glib.Object.GObject_Record'Class;
      Fontname : UTF8_String);

Constants & Global variables

Null_Gtk_Font_Chooser (Gtk_Font_Chooser)

Null_Gtk_Font_Chooser : constant Gtk_Font_Chooser;

Font_Property (Glib.Properties.Property_String)

Font_Property : constant Glib.Properties.Property_String;
The font description as a string, e.g. "Sans Italic 12".

Preview_Text_Property (Glib.Properties.Property_String)

Preview_Text_Property : constant Glib.Properties.Property_String;
The string with which to preview the font.

Show_Preview_Entry_Property (Glib.Properties.Property_Boolean)

Show_Preview_Entry_Property : constant Glib.Properties.Property_Boolean;
Whether to show an entry to change the preview text.

Signal_Font_Activated (Glib.Signal_Name)

Signal_Font_Activated : constant Glib.Signal_Name := "font-activated";

Subprograms & Entries

Get_Type

function Get_Type return Glib.GType;

Get_Font

function Get_Font 
(Self: Gtk_Font_Chooser) return UTF8_String;
Gets the currently-selected font name. Note that this can be a different string than what you set with Gtk.Font_Chooser.Set_Font, as the font chooser 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. Since: gtk+ 3.2

Set_Font

procedure Set_Font 
(Self: Gtk_Font_Chooser;
Fontname: UTF8_String);
Sets the currently-selected font. Since: gtk+ 3.2 "fontname": a font name like "Helvetica 12" or "Times Bold 18"

Get_Font_Desc

function Get_Font_Desc 
(Self: Gtk_Font_Chooser) return Pango.Font.Pango_Font_Description;

Set_Font_Desc

procedure Set_Font_Desc 
(Self: Gtk_Font_Chooser;
Font_Desc: Pango.Font.Pango_Font_Description);

Get_Font_Face

function Get_Font_Face 
(Self: Gtk_Font_Chooser) return Pango.Font_Face.Pango_Font_Face;
Gets the Pango.Font_Face.Pango_Font_Face representing the selected font group details (i.e. family, slant, weight, width, etc). If the selected font is not installed, returns null. Since: gtk+ 3.2

Get_Font_Family

function Get_Font_Family 
(Self: Gtk_Font_Chooser) return Pango.Font_Family.Pango_Font_Family;
Gets the Pango.Font_Family.Pango_Font_Family representing the selected font family. Font families are a collection of font faces. If the selected font is not installed, returns null. Since: gtk+ 3.2

Get_Font_Size

function Get_Font_Size 
(Self: Gtk_Font_Chooser) return Gint;

Get_Preview_Text

function Get_Preview_Text 
(Self: Gtk_Font_Chooser) return UTF8_String;
Gets the text displayed in the preview area. Since: gtk+ 3.2

Set_Preview_Text

procedure Set_Preview_Text 
(Self: Gtk_Font_Chooser;
Text: UTF8_String);
Sets the text displayed in the preview area. The Text is used to show how the selected font looks. Since: gtk+ 3.2 "text": the text to display in the preview area

Get_Show_Preview_Entry

function Get_Show_Preview_Entry 
(Self: Gtk_Font_Chooser) return Boolean;
Returns whether the preview entry is shown or not. Since: gtk+ 3.2

Set_Show_Preview_Entry

procedure Set_Show_Preview_Entry 
(Self: Gtk_Font_Chooser;
Show_Preview_Entry: Boolean);
Shows or hides the editable preview entry. Since: gtk+ 3.2 "show_preview_entry": whether to show the editable preview entry or not

Set_Filter_Func

procedure Set_Filter_Func 
(Self: Gtk_Font_Chooser;
Filter: Gtk_Font_Filter_Func);
Adds a filter function that decides which fonts to display in the font chooser. Since: gtk+ 3.2 "filter": a Gtk_Font_Filter_Func, or null

On_Font_Activated

procedure On_Font_Activated 
(Self: Gtk_Font_Chooser;
Call: Cb_Gtk_Font_Chooser_UTF8_String_Void;
After: Boolean := False);

On_Font_Activated

procedure On_Font_Activated 
(Self: Gtk_Font_Chooser;
Call: Cb_GObject_UTF8_String_Void;
Slot: not null access Glib.Object.GObject_Record'Class;
After: Boolean := False);
Emitted when a font is activated. This usually happens when the user double clicks an item, or an item is selected and the user presses one of the keys Space, Shift+Space, Return or Enter.