Gtk.Font_Chooser_Widget

Entities

Tagged Types

Access Types

Constants

Subprograms

Generic Instantiations

Description

The Gtk.Font_Chooser_Widget.Gtk_Font_Chooser_Widget widget lists the available fonts, styles and sizes, allowing the user to select a font. It is used in the Gtk.Font_Chooser_Dialog.Gtk_Font_Chooser_Dialog widget to provide a dialog box for selecting fonts.

To set the font which is initially selected, use Gtk.Font_Chooser.Set_Font or Gtk.Font_Chooser.Set_Font_Desc.

To get the selected font use Gtk.Font_Chooser.Get_Font or Gtk.Font_Chooser.Get_Font_Desc.

To change the text which is shown in the preview area, use Gtk.Font_Chooser.Set_Preview_Text.

# CSS nodes

GtkFontChooserWidget has a single CSS node with name fontchooser.

"+"

function "+"
  (Widget : access Gtk_Font_Chooser_Widget_Record'Class)
return Gtk.Buildable.Gtk_Buildable
Parameters
Widget
Return Value

"+"

function "+"
  (Widget : access Gtk_Font_Chooser_Widget_Record'Class)
return Gtk.Font_Chooser.Gtk_Font_Chooser
Parameters
Widget
Return Value

"+"

function "+"
  (Widget : access Gtk_Font_Chooser_Widget_Record'Class)
return Gtk.Orientable.Gtk_Orientable
Parameters
Widget
Return Value

"-"

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

"-"

function "-"
  (Interf : Gtk.Font_Chooser.Gtk_Font_Chooser)
return Gtk_Font_Chooser_Widget
Parameters
Interf
Return Value

"-"

function "-"
  (Interf : Gtk.Orientable.Gtk_Orientable)
return Gtk_Font_Chooser_Widget
Parameters
Interf
Return Value

Get_Font

function Get_Font
   (Self : not null access Gtk_Font_Chooser_Widget_Record)
    return UTF8_String
Parameters
Self
Return Value

Get_Font_Desc

function Get_Font_Desc
   (Self : not null access Gtk_Font_Chooser_Widget_Record)
    return Pango.Font.Pango_Font_Description
Parameters
Self
Return Value

Get_Font_Face

function Get_Font_Face
   (Self : not null access Gtk_Font_Chooser_Widget_Record)
    return Pango.Font_Face.Pango_Font_Face
Parameters
Self
Return Value

Get_Font_Family

function Get_Font_Family
   (Self : not null access Gtk_Font_Chooser_Widget_Record)
    return Pango.Font_Family.Pango_Font_Family
Parameters
Self
Return Value

Get_Font_Features

function Get_Font_Features
   (Self : not null access Gtk_Font_Chooser_Widget_Record)
    return UTF8_String
Parameters
Self
Return Value

Get_Font_Map

function Get_Font_Map
   (Self : not null access Gtk_Font_Chooser_Widget_Record)
    return Pango.Font_Map.Pango_Font_Map
Parameters
Self
Return Value

Get_Font_Size

function Get_Font_Size
   (Self : not null access Gtk_Font_Chooser_Widget_Record)
    return Glib.Gint
Parameters
Self
Return Value

Get_Language

function Get_Language
   (Self : not null access Gtk_Font_Chooser_Widget_Record)
    return UTF8_String
Parameters
Self
Return Value

Get_Level

function Get_Level
   (Self : not null access Gtk_Font_Chooser_Widget_Record)
    return Gtk.Font_Chooser.Gtk_Font_Chooser_Level
Parameters
Self
Return Value

Get_Orientation

function Get_Orientation
   (Self : not null access Gtk_Font_Chooser_Widget_Record)
    return Gtk.Enums.Gtk_Orientation
Parameters
Self
Return Value

Get_Preview_Text

function Get_Preview_Text
   (Self : not null access Gtk_Font_Chooser_Widget_Record)
    return UTF8_String
Parameters
Self
Return Value

Get_Show_Preview_Entry

function Get_Show_Preview_Entry
   (Self : not null access Gtk_Font_Chooser_Widget_Record) return Boolean
Parameters
Self
Return Value

Get_Type

function Get_Type return Glib.GType
Return Value

Gtk_Font_Chooser_Widget

type Gtk_Font_Chooser_Widget is access all Gtk_Font_Chooser_Widget_Record'Class;

Gtk_Font_Chooser_Widget_New

function Gtk_Font_Chooser_Widget_New return Gtk_Font_Chooser_Widget

Creates a new Gtk.Font_Chooser_Widget.Gtk_Font_Chooser_Widget. Since: gtk+ 3.2

Return Value

Gtk_Font_Chooser_Widget_Record

type Gtk_Font_Chooser_Widget_Record is new Gtk_Box_Record with null record;

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.

Parameters
Family

a Pango.Font_Family.Pango_Font_Family

Face

a Pango.Font_Face.Pango_Font_Face belonging to Family

Return Value

True if the font should be displayed

Gtk_New

procedure Gtk_New (Self : out Gtk_Font_Chooser_Widget)

Creates a new Gtk.Font_Chooser_Widget.Gtk_Font_Chooser_Widget. Since: gtk+ 3.2 Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Self

Implements_Gtk_Buildable

package Implements_Gtk_Buildable is new Glib.Types.Implements
  (Gtk.Buildable.Gtk_Buildable, Gtk_Font_Chooser_Widget_Record, Gtk_Font_Chooser_Widget);

Implements_Gtk_Font_Chooser

package Implements_Gtk_Font_Chooser is new Glib.Types.Implements
  (Gtk.Font_Chooser.Gtk_Font_Chooser, Gtk_Font_Chooser_Widget_Record, Gtk_Font_Chooser_Widget);

Implements_Gtk_Orientable

package Implements_Gtk_Orientable is new Glib.Types.Implements
  (Gtk.Orientable.Gtk_Orientable, Gtk_Font_Chooser_Widget_Record, Gtk_Font_Chooser_Widget);

Initialize

procedure Initialize
   (Self : not null access Gtk_Font_Chooser_Widget_Record'Class)

Creates a new Gtk.Font_Chooser_Widget.Gtk_Font_Chooser_Widget. Since: gtk+ 3.2 Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Self

Set_Filter_Func

procedure Set_Filter_Func
   (Self   : not null access Gtk_Font_Chooser_Widget_Record;
    Filter : Gtk_Font_Filter_Func)

Adds a filter function that decides which fonts to display in the font chooser. Since: gtk+ 3.2

Parameters
Self
Filter

a Gtk_Font_Filter_Func, or null

Set_Font

procedure Set_Font
   (Self     : not null access Gtk_Font_Chooser_Widget_Record;
    Fontname : UTF8_String)
Parameters
Self
Fontname

Set_Font_Desc

procedure Set_Font_Desc
   (Self      : not null access Gtk_Font_Chooser_Widget_Record;
    Font_Desc : Pango.Font.Pango_Font_Description)
Parameters
Self
Font_Desc

Set_Font_Map

procedure Set_Font_Map
   (Self    : not null access Gtk_Font_Chooser_Widget_Record;
    Fontmap : access Pango.Font_Map.Pango_Font_Map_Record'Class)
Parameters
Self
Fontmap

Set_Language

procedure Set_Language
   (Self     : not null access Gtk_Font_Chooser_Widget_Record;
    Language : UTF8_String)
Parameters
Self
Language

Set_Level

procedure Set_Level
   (Self  : not null access Gtk_Font_Chooser_Widget_Record;
    Level : Gtk.Font_Chooser.Gtk_Font_Chooser_Level)
Parameters
Self
Level

Set_Orientation

procedure Set_Orientation
   (Self        : not null access Gtk_Font_Chooser_Widget_Record;
    Orientation : Gtk.Enums.Gtk_Orientation)
Parameters
Self
Orientation

Set_Preview_Text

procedure Set_Preview_Text
   (Self : not null access Gtk_Font_Chooser_Widget_Record;
    Text : UTF8_String)
Parameters
Self
Text

Set_Show_Preview_Entry

procedure Set_Show_Preview_Entry
   (Self               : not null access Gtk_Font_Chooser_Widget_Record;
    Show_Preview_Entry : Boolean)
Parameters
Self
Show_Preview_Entry

Tweak_Action_Property

Tweak_Action_Property : constant Glib.Properties.Property_Object;

Type: Gtk.Action.Gtk_Action A toggle action that can be used to switch to the tweak page of the font chooser widget, which lets the user tweak the OpenType features and variation axes of the selected font.

The action will be enabled or disabled depending on whether the selected font has any features or axes.