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.icl11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Gtk/Widgets.icl b/src/Gtk/Widgets.icl
index b7deab5..b630549 100644
--- a/src/Gtk/Widgets.icl
+++ b/src/Gtk/Widgets.icl
@@ -44,6 +44,17 @@ packBox widget box direction expand =
toState (if direction=:StartToEnd 'I'.gtk_box_pack_start 'I'.gtk_box_pack_end
box (gtkWidget widget) expand=:Expand True 0)
+:: GtkFrame :== Pointer
+
+instance gtkWidget GtkFrame where gtkWidget f = f
+instance gtkContainer GtkFrame where gtkContainer f = f
+
+newFrame :: !GtkLabel !w -> State GtkState GtkFrame | gtkWidget w
+newFrame label widget =
+ toStateR ('I'.gtk_frame_new (case label of Label l -> Just l; _ -> Nothing)) >>= \frame ->
+ addToContainer widget frame >>|
+ show frame
+
:: GtkPaned :== Pointer
instance gtkWidget GtkPaned where gtkWidget p = p