summaryrefslogtreecommitdiff
path: root/src/Gtk/Widgets.icl
diff options
context:
space:
mode:
Diffstat (limited to 'src/Gtk/Widgets.icl')
-rw-r--r--src/Gtk/Widgets.icl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Gtk/Widgets.icl b/src/Gtk/Widgets.icl
index de07c4f..80dad7a 100644
--- a/src/Gtk/Widgets.icl
+++ b/src/Gtk/Widgets.icl
@@ -94,6 +94,12 @@ runDialog dialog =
let (GtkDialog d) = gtkDialog dialog in
fromInt <$> toStateR (gtk_dialog_run d)
+addButton :: !String !GtkResponse !d -> GtkM GtkButton | gtkDialog d
+addButton text response dialog =
+ let (GtkDialog d) = gtkDialog dialog in
+ toStateR (gtk_dialog_add_button d text (toInt response)) >>= \b ->
+ pure (GtkButton b)
+
getContentArea :: !d -> GtkBox | gtkDialog d
getContentArea dialog =
let (GtkDialog d) = gtkDialog dialog in