Dialog


Object Hierarchy:

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

Description:


public class Dialog : Dialog

Granite.Dialog is a styled Gtk.Dialog that uses an empty title area and action widgets in the bottom/end position.

Example

  var header = new Granite.HeaderLabel ("Header");
var entry = new Gtk.Entry ();
var gtk_switch = new Gtk.Switch () {
halign = Gtk.Align.START
};

var layout = new Gtk.Grid () {
row_spacing = 12
};
layout.attach (header, 0, 1);
layout.attach (entry, 0, 2);
layout.attach (gtk_switch, 0, 3);

var dialog = new Granite.Dialog () {
transient_for = window
};
dialog.content_area.add (layout);
dialog.add_button ("Cancel", Gtk.ResponseType.CANCEL);

var suggested_button = dialog.add_button ("Suggested Action", Gtk.ResponseType.ACCEPT);
suggested_button.get_style_context ().add_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION);

dialog.show_all ();
dialog.response.connect ((response_id) => {
if (response_id == Gtk.ResponseType.ACCEPT) {
// Do Something
}

dialog.destroy ();
});

All known sub-classes:

Namespace: Granite
Package: granite

Content:

Creation methods:

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