FontChooserDialog


Object Hierarchy:

Gtk.FontChooserDialog Gtk.FontChooserDialog Gtk.FontChooserDialog Gtk.Dialog Gtk.Dialog Gtk.Dialog->Gtk.FontChooserDialog Gtk.Window Gtk.Window Gtk.Window->Gtk.Dialog Gtk.Bin Gtk.Bin Gtk.Bin->Gtk.Window Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin 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.FontChooserDialog Atk.Implementor->Gtk.Dialog Atk.Implementor->Gtk.Window Atk.Implementor->Gtk.Bin Atk.Implementor->Gtk.Container Atk.Implementor->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.FontChooserDialog Gtk.Buildable->Gtk.Dialog Gtk.Buildable->Gtk.Window Gtk.Buildable->Gtk.Bin Gtk.Buildable->Gtk.Container Gtk.Buildable->Gtk.Widget Gtk.FontChooser Gtk.FontChooser Gtk.FontChooser->Gtk.FontChooserDialog

Description:

[ CCode ( type_id = "gtk_font_chooser_dialog_get_type ()" ) ]
[ Version ( since = "3.2" ) ]
public class FontChooserDialog : Dialog, Implementor, Buildable, FontChooser

The FontChooserDialog widget is a dialog for selecting a font.

It implements the FontChooser interface.

GtkFontChooserDialog as GtkBuildable

The GtkFontChooserDialog implementation of the Buildable interface exposes the buttons with the names “select_button” and “cancel_button”.

GtkFontChooserDialog

Example: FontChooserDialog:

public class Application : Gtk.Window {

public Application () {
// Prepare Gtk.Window:
this.title = "My Gtk.FontChooserDialog";
this.window_position = Gtk.WindowPosition.CENTER;
this.destroy.connect (Gtk.main_quit);

// The button:
Gtk.FontChooserDialog dialog = new Gtk.FontChooserDialog ("Pick your favourite font", this);
if (dialog.run () == Gtk.ResponseType.OK) {
print (" font: %s\n", dialog.get_font ().to_string ());
print (" desc: %s\n", dialog.get_font_desc ().to_string ());
print (" face: %s\n", dialog.get_font_face ().get_face_name ());
print (" size: %d\n", dialog.get_font_size ());
print (" family: %s\n", dialog.get_font_family ().get_name ());
print (" monospace: %s\n", dialog.get_font_family ().is_monospace ().to_string ());
}

// Close the FontChooserDialog
dialog.close ();
}

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.FontChooserDialog.vala


Namespace: Gtk
Package: gtk+-3.0

Content:

Creation methods:

Inherited Members:

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