FontSelection


Object Hierarchy:

Gtk.FontSelection Gtk.FontSelection Gtk.FontSelection Gtk.Box Gtk.Box Gtk.Box->Gtk.FontSelection Gtk.Container Gtk.Container Gtk.Container->Gtk.Box Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.Container GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Atk.Implementor Atk.Implementor Atk.Implementor->Gtk.FontSelection Atk.Implementor->Gtk.Box Atk.Implementor->Gtk.Container Atk.Implementor->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.FontSelection Gtk.Buildable->Gtk.Box Gtk.Buildable->Gtk.Container Gtk.Buildable->Gtk.Widget Gtk.Orientable Gtk.Orientable Gtk.Orientable->Gtk.FontSelection Gtk.Orientable->Gtk.Box

Description:

[ CCode ( type_id = "gtk_font_selection_get_type ()" ) ]
[ Version ( deprecated = true , deprecated_since = "3.2" , replacement = "FontChooserWidget" ) ]
public class FontSelection : Box, Implementor, Buildable, Orientable

Warning: FontSelection is deprecated since 3.2. Use FontChooserWidget.

Example: FontSelection:

public class Application : Gtk.Window {
public Application () {
// Prepare Gtk.Window:
this.title = "My Gtk.FontSelection";
this.window_position = Gtk.WindowPosition.CENTER;
this.destroy.connect (Gtk.main_quit);
this.set_default_size (350, 70);

// A VBox:
Gtk.Box box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
this.add (box);

// The FontSelection:
Gtk.FontSelection selection = new Gtk.FontSelection ();
box.add (selection);

// A Button:
Gtk.Button button = new Gtk.Button.with_label ("Select");
box.add (button);

button.clicked.connect (() => {
// Emitted when a font has been chosen:
string name = selection.get_font_name ();
print ("Selected font: %s\n", name);
});
}

public static int main (string[] args) {
Gtk.init (ref args);

Application app = new Application ();
app.show_all ();
Gtk.main ();
return 0;
}
}

valac --pkg gtk+-3.0 Gtk.FontSelection.vala


Namespace: Gtk
Package: gtk+-3.0

Content:

Properties:

Creation methods:

Methods:

Inherited Members:

All known members inherited from class Gtk.Widget
All known members inherited from interface Atk.Implementor
All known members inherited from interface Gtk.Orientable