40 #define ui_reset_layout(layout) memset(&(layout), 0, sizeof(UiLayout)) |
40 #define ui_reset_layout(layout) memset(&(layout), 0, sizeof(UiLayout)) |
41 |
41 |
42 typedef struct MotifTabbedPane MotifTabbedPane; |
42 typedef struct MotifTabbedPane MotifTabbedPane; |
43 typedef struct UiTab UiTab; |
43 typedef struct UiTab UiTab; |
44 typedef struct UiBoxContainer UiBoxContainer; |
44 typedef struct UiBoxContainer UiBoxContainer; |
|
45 typedef struct UiLayout UiLayout; |
45 |
46 |
46 typedef Widget (*ui_container_add_f)(UiContainer*, Arg*, int*, UiBool); |
47 typedef Widget (*ui_container_add_f)(UiContainer*, Arg*, int*, UiBool); |
47 |
48 |
48 typedef struct UiLayout UiLayout; |
49 typedef enum UiLayoutBool UiLayoutBool; |
49 typedef enum UiLayoutBool UiLayoutBool; |
50 typedef enum UiBoxOrientation UiBoxOrientation; |
50 |
51 |
51 |
52 |
52 enum UiLayoutBool { |
53 enum UiLayoutBool { |
53 UI_LAYOUT_UNDEFINED = 0, |
54 UI_LAYOUT_UNDEFINED = 0, |
54 UI_LAYOUT_TRUE, |
55 UI_LAYOUT_TRUE, |
55 UI_LAYOUT_FALSE, |
56 UI_LAYOUT_FALSE, |
|
57 }; |
|
58 |
|
59 enum UiBoxOrientation { |
|
60 UI_BOX_VERTICAL = 0, |
|
61 UI_BOX_HORIZONTAL |
56 }; |
62 }; |
57 |
63 |
58 struct UiLayout { |
64 struct UiLayout { |
59 UiLayoutBool fill; |
65 UiLayoutBool fill; |
60 }; |
66 }; |
90 |
95 |
91 UiContainer* ui_frame_container(UiObject *obj, Widget frame); |
96 UiContainer* ui_frame_container(UiObject *obj, Widget frame); |
92 Widget ui_frame_container_prepare(UiContainer *ct, Arg *args, int *n, UiBool fill); |
97 Widget ui_frame_container_prepare(UiContainer *ct, Arg *args, int *n, UiBool fill); |
93 void ui_frame_container_add(UiContainer *ct, Widget widget); |
98 void ui_frame_container_add(UiContainer *ct, Widget widget); |
94 |
99 |
95 UiContainer* ui_vbox_container(UiObject *obj, Widget box); |
100 UiContainer* ui_box_container(UiObject *obj, Widget box, UiBoxOrientation orientation); |
96 Widget ui_vbox_container_prepare(UiContainer *ct, Arg *args, int *n, UiBool fill); |
101 Widget ui_box_container_prepare(UiContainer *ct, Arg *args, int *n, UiBool fill); |
97 void ui_vbox_container_add(UiContainer *ct, Widget widget); |
102 void ui_box_container_add(UiContainer *ct, Widget widget); |
98 |
103 |
99 void ui_tab_button_callback(Widget widget, UiTab *tab, XtPointer d); |
104 void ui_tab_button_callback(Widget widget, UiTab *tab, XtPointer d); |
100 void ui_change_tab(MotifTabbedPane *pane, UiTab *tab); |
105 void ui_change_tab(MotifTabbedPane *pane, UiTab *tab); |
101 |
106 |
102 void ui_tab_set_document(UiContext *ctx, void *document); |
107 void ui_tab_set_document(UiContext *ctx, void *document); |