28 |
28 |
29 #ifndef CONTAINER_H |
29 #ifndef CONTAINER_H |
30 #define CONTAINER_H |
30 #define CONTAINER_H |
31 |
31 |
32 #include "../ui/toolkit.h" |
32 #include "../ui/toolkit.h" |
|
33 #include <ucx/list.h> |
33 |
34 |
34 #ifdef __cplusplus |
35 #ifdef __cplusplus |
35 extern "C" { |
36 extern "C" { |
36 #endif |
37 #endif |
|
38 |
|
39 typedef struct MotifTabbedPane MotifTabbedPane; |
|
40 typedef struct UiTab UiTab; |
37 |
41 |
38 typedef Widget (*ui_container_add_f)(UiContainer*, Arg*, int*); |
42 typedef Widget (*ui_container_add_f)(UiContainer*, Arg*, int*); |
39 |
43 |
40 struct UiContainer { |
44 struct UiContainer { |
41 Widget widget; |
45 Widget widget; |
42 Widget (*add)(UiContainer*, Arg *, int*); |
46 Widget (*add)(UiContainer*, Arg *, int*); |
43 }; |
47 }; |
|
48 |
|
49 struct MotifTabbedPane { |
|
50 UiTabbedPane view; |
|
51 Widget tabbar; |
|
52 UcxList *tabs; |
|
53 UiTab *current; |
|
54 }; |
|
55 |
|
56 struct UiTab { |
|
57 MotifTabbedPane *tabbedpane; |
|
58 UiObject *content; |
|
59 Widget tab_button; |
|
60 }; |
44 |
61 |
45 |
62 |
46 UiContainer* ui_frame_container(UiObject *obj, Widget frame); |
63 UiContainer* ui_frame_container(UiObject *obj, Widget frame); |
47 Widget ui_frame_container_add(UiContainer *ct, Arg *args, int *n); |
64 Widget ui_frame_container_add(UiContainer *ct, Arg *args, int *n); |
|
65 void ui_tab_button_callback(Widget widget, UiTab *tab, XtPointer d); |
|
66 void ui_change_tab(MotifTabbedPane *pane, UiTab *tab); |
48 |
67 |
|
68 void ui_tab_set_document(UiContext *ctx, void *document); |
|
69 void ui_tab_detach_document(UiContext *ctx, void *document); |
49 |
70 |
50 |
71 |
51 #ifdef __cplusplus |
72 #ifdef __cplusplus |
52 } |
73 } |
53 #endif |
74 #endif |