Dialog


Object Hierarchy:

Object hierarchy for Dialog

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