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 UiGridContainer UiGridContainer; |
45 typedef struct UiLayout UiLayout; |
46 typedef struct UiLayout UiLayout; |
46 |
47 |
47 typedef Widget (*ui_container_add_f)(UiContainer*, Arg*, int*, UiBool); |
48 typedef Widget (*ui_container_add_f)(UiContainer*, Arg*, int*, UiBool); |
48 |
49 |
49 typedef enum UiLayoutBool UiLayoutBool; |
50 typedef enum UiLayoutBool UiLayoutBool; |
75 struct UiBoxContainer { |
77 struct UiBoxContainer { |
76 UiContainer container; |
78 UiContainer container; |
77 Widget prev_widget; |
79 Widget prev_widget; |
78 UiBool has_fill; |
80 UiBool has_fill; |
79 UiBoxOrientation orientation; |
81 UiBoxOrientation orientation; |
|
82 }; |
|
83 |
|
84 struct UiGridContainer { |
|
85 UiContainer container; |
|
86 UcxList *lines; |
|
87 UcxList *current; |
80 }; |
88 }; |
81 |
89 |
82 struct MotifTabbedPane { |
90 struct MotifTabbedPane { |
83 UiTabbedPane view; |
91 UiTabbedPane view; |
84 Widget tabbar; |
92 Widget tabbar; |
99 |
107 |
100 UiContainer* ui_box_container(UiObject *obj, Widget box, UiBoxOrientation orientation); |
108 UiContainer* ui_box_container(UiObject *obj, Widget box, UiBoxOrientation orientation); |
101 Widget ui_box_container_prepare(UiContainer *ct, Arg *args, int *n, UiBool fill); |
109 Widget ui_box_container_prepare(UiContainer *ct, Arg *args, int *n, UiBool fill); |
102 void ui_box_container_add(UiContainer *ct, Widget widget); |
110 void ui_box_container_add(UiContainer *ct, Widget widget); |
103 |
111 |
|
112 UiContainer* ui_grid_container(UiObject *obj, Widget rowcolumn); |
|
113 Widget ui_grid_container_prepare(UiContainer *ct, Arg *args, int *n, UiBool fill); |
|
114 void ui_grid_container_add(UiContainer *ct, Widget widget); |
|
115 |
104 void ui_tab_button_callback(Widget widget, UiTab *tab, XtPointer d); |
116 void ui_tab_button_callback(Widget widget, UiTab *tab, XtPointer d); |
105 void ui_change_tab(MotifTabbedPane *pane, UiTab *tab); |
117 void ui_change_tab(MotifTabbedPane *pane, UiTab *tab); |
106 |
118 |
107 void ui_tab_set_document(UiContext *ctx, void *document); |
119 void ui_tab_set_document(UiContext *ctx, void *document); |
108 void ui_tab_detach_document(UiContext *ctx, void *document); |
120 void ui_tab_detach_document(UiContext *ctx, void *document); |