ui/gtk/container.c

changeset 62
70d2aee84432
parent 59
eb6611be50c7
child 65
4697592e24ba
--- a/ui/gtk/container.c	Thu Jan 01 17:22:55 2015 +0100
+++ b/ui/gtk/container.c	Sun Jan 04 22:12:07 2015 +0100
@@ -105,6 +105,32 @@
     ui_reset_layout(ct->layout);
 }
 
+UIWIDGET ui_vbox(UiObject *obj) {
+    UiContainer *ct = uic_get_current_container(obj);
+    
+    GtkWidget *vbox = ui_gtk_vbox_new();
+    ct->add(ct, vbox, TRUE);
+    
+    UiObject *newobj = uic_object_new(obj, vbox);
+    newobj->container = ui_box_container(obj, vbox);
+    uic_obj_add(obj, newobj);
+    
+    return vbox;
+}
+
+UIWIDGET ui_hbox(UiObject *obj) {
+    UiContainer *ct = uic_get_current_container(obj);
+    
+    GtkWidget *hbox = ui_gtk_hbox_new();
+    ct->add(ct, hbox, TRUE);
+    
+    UiObject *newobj = uic_object_new(obj, hbox);
+    newobj->container = ui_box_container(obj, hbox);
+    uic_obj_add(obj, newobj);
+    
+    return hbox;
+}
+
 
 /* -------------------- Sidebar -------------------- */
 UIWIDGET ui_sidebar(UiObject *obj) {

mercurial