1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 #ifndef CONTAINER_H
30
31 #include "../ui/container.h"
32
33 #define CONTAINER_H
34
35 #define UI_APPLY_LAYOUT(layout, args) \
36 layout.fill = args->fill; \
37 layout.hexpand = args->hexpand; \
38 layout.vexpand = args->vexpand; \
39 layout.hfill = args->hfill; \
40 layout.vfill = args->vfill; \
41 layout.override_defaults = args->override_defaults; \
42 layout.colspan = args->colspan; \
43 layout.rowspan = args->rowspan
44
45 typedef struct UiLayout UiLayout;
46
47 struct UiLayout {
48 UiBool fill;
49 UiBool newline;
50 char *label;
51 UiBool hexpand;
52 UiBool vexpand;
53 UiBool hfill;
54 UiBool vfill;
55 UiBool override_defaults;
56 int width;
57 int colspan;
58 int rowspan;
59 };
60
61 enum UiBoxOrientation {
62 UI_BOX_VERTICAL =
0,
63 UI_BOX_HORIZONTAL
64 };
65 typedef enum UiBoxOrientation UiBoxOrientation;
66
67 enum UiContainerType {
68 UI_CONTAINER_GENERIC =
0,
69 UI_CONTAINER_TABVIEW
70 };
71 typedef enum UiContainerType UiContainerType;
72
73 typedef struct UiContainerPrivate UiContainerPrivate;
74
75 typedef struct UiRect {
76 int x;
77 int y;
78 int width;
79 int height;
80 } UiRect;
81
82
83 struct UiContainerPrivate {
84 UiContainerX container;
85 void (*prepare)(UiContainerPrivate*, UiRect*);
86 void (*add)(UiContainerPrivate*, UiRect*, W32Widget*);
87 UiContainerType type;
88 UiLayout layout;
89 };
90
91 #endif
92