ui/motif/container.h

changeset 61
7ee124a58fe3
parent 60
7cd1b8890302
child 62
70d2aee84432
--- a/ui/motif/container.h	Thu Jan 01 14:13:37 2015 +0100
+++ b/ui/motif/container.h	Thu Jan 01 17:22:55 2015 +0100
@@ -42,11 +42,12 @@
 typedef struct MotifTabbedPane MotifTabbedPane;
 typedef struct UiTab           UiTab;
 typedef struct UiBoxContainer  UiBoxContainer;
+typedef struct UiLayout        UiLayout;
 
 typedef Widget (*ui_container_add_f)(UiContainer*, Arg*, int*, UiBool);
 
-typedef struct UiLayout UiLayout;
-typedef enum UiLayoutBool UiLayoutBool;
+typedef enum UiLayoutBool     UiLayoutBool;
+typedef enum UiBoxOrientation UiBoxOrientation;
 
 
 enum UiLayoutBool {
@@ -55,6 +56,11 @@
     UI_LAYOUT_FALSE,
 };
 
+enum UiBoxOrientation {
+    UI_BOX_VERTICAL = 0,
+    UI_BOX_HORIZONTAL
+};
+
 struct UiLayout {
     UiLayoutBool fill;
 };
@@ -69,9 +75,8 @@
 struct UiBoxContainer {
     UiContainer container;
     Widget prev_widget;
-    Widget filled_widget;
-    UiBool cur_fill;
     UiBool has_fill;
+    UiBoxOrientation orientation;
 };
 
 struct MotifTabbedPane {
@@ -92,9 +97,9 @@
 Widget ui_frame_container_prepare(UiContainer *ct, Arg *args, int *n, UiBool fill);
 void ui_frame_container_add(UiContainer *ct, Widget widget);
 
-UiContainer* ui_vbox_container(UiObject *obj, Widget box);
-Widget ui_vbox_container_prepare(UiContainer *ct, Arg *args, int *n, UiBool fill);
-void ui_vbox_container_add(UiContainer *ct, Widget widget);
+UiContainer* ui_box_container(UiObject *obj, Widget box, UiBoxOrientation orientation);
+Widget ui_box_container_prepare(UiContainer *ct, Arg *args, int *n, UiBool fill);
+void ui_box_container_add(UiContainer *ct, Widget widget);
 
 void ui_tab_button_callback(Widget widget, UiTab *tab, XtPointer d);
 void ui_change_tab(MotifTabbedPane *pane, UiTab *tab);

mercurial