_
SelectionThis widget provides a nice way for the user of your application to select fonts. It first searches on your system for the list of fonts available, and displays a set of boxes to select them based on their name, their weight, their size, etc. This widget is provided in two forms, one widget that can be embedded in any container, a Gtk_Font_Selection, whereas the other one comes directly in its own separate window (to be popped up as a dialog).
Some filters can be applied to the widget, when you want the user to select only a font only among a specific subset (like bitmap or true-type fonts for instance). There are two kinds of filters: a base filter, set in your application and that the user can not change; a user filter that can be modified interactively by the user.
Widget Hierarchy |
---|
GObject (see section Package Glib.Object) Gtk_Object (see section Package Gtk.Object) \___ Gtk_Widget (see section Package Gtk.Widget) \___ Gtk_Container (see section Package Gtk.Container) \___ Gtk_Bin (see section Package Gtk.Bin) \___ Gtk_Window (see section Package Gtk.Window) \___ Gtk_Dialog (see section Package Gtk.Dialog) \___ Gtk_Font_Selection_Dialog (see section Package Gtk.Font_Selection_Dialog) |
Subprograms |
---|
Font_Selection functions | ||
procedure Gtk_New (Widget : out Gtk_Font_Selection); | ||
Create a new font selection widget. | ||
function Get_Type return Gtk.Gtk_Type; | ||
Return the internal value associated with a Gtk_Font_Selection.
| ||
function Get_Font_Name (Fontsel : access Gtk_Font_Selection_Record) return String; | ||
Return the name of the font selected by the user. | ||
function Set_Font_Name (Fontsel : access Gtk_Font_Selection_Record; Fontname : String) return Boolean; | ||
Set the name and attributes of the selected font in Fontsel. | ||
function Get_Preview_Text (Fontsel : access Gtk_Font_Selection_Record) return UTF8_String; | ||
Return the string used to preview the selected font in the dialog.
| ||
procedure Set_Preview_Text (Fontsel : access Gtk_Font_Selection_Record; Text : UTF8_String); | ||
Set the string to use to preview the selected font.
| ||
Font_Selection_Dialog functions | ||
procedure Gtk_New (Widget : out Gtk_Font_Selection_Dialog; Title : UTF8_String); | ||
Create a new dialog to select a font. | ||
function Dialog_Get_Type return Gtk.Gtk_Type; | ||
Return the internal value associated with a Gtk_Font_Selection_Dialog.
| ||
function Get_Font_Name (Fsd : access Gtk_Font_Selection_Dialog_Record) return String; | ||
Return the name of the font selected by the user. | ||
function Set_Font_Name (Fsd : access Gtk_Font_Selection_Dialog_Record; Fontname : String) return Boolean; | ||
Set the name and attributes of the selected font in Fontsel. | ||
function Get_Preview_Text (Fsd : access Gtk_Font_Selection_Dialog_Record) return UTF8_String; | ||
Return the string used to preview the selected font in the dialog.
| ||
procedure Set_Preview_Text (Fsd : access Gtk_Font_Selection_Dialog_Record; Text : UTF8_String); | ||
Set the string to use to preview the selected font.
| ||
function Get_Cancel_Button (Fsd : access Gtk_Font_Selection_Dialog_Record) return Gtk.Button.Gtk_Button; | ||
Return the Id of the cancel button of the dialog. | ||
function Get_OK_Button (Fsd : access Gtk_Font_Selection_Dialog_Record) return Gtk.Button.Gtk_Button; | ||
Return the Id of the Ok button. | ||
function Get_Apply_Button (Fsd : access Gtk_Font_Selection_Dialog_Record) return Gtk.Button.Gtk_Button; | ||
Return the Id of the Apply button. |