diff options
author | Camil Staps | 2019-10-28 11:02:26 +0100 |
---|---|---|
committer | Camil Staps | 2019-10-28 11:04:05 +0100 |
commit | 27d2121e752f33a56ad2a4b4d0d84ff080171b76 (patch) | |
tree | 8033d22d7e4f8bfab5043cb22cbaeaeca439f52f /src/Gtk/Widgets.icl | |
parent | Remove ptr class (diff) |
Add addButton for GtkDialog
Diffstat (limited to 'src/Gtk/Widgets.icl')
-rw-r--r-- | src/Gtk/Widgets.icl | 6 |
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 |