| 26 * POSSIBILITY OF SUCH DAMAGE. |
26 * POSSIBILITY OF SUCH DAMAGE. |
| 27 */ |
27 */ |
| 28 #ifndef GRID_H |
28 #ifndef GRID_H |
| 29 #define GRID_H |
29 #define GRID_H |
| 30 |
30 |
| 31 #include "container.h" |
31 #include "../ui/win32.h" |
| 32 #include <stdbool.h> |
32 #include <stdbool.h> |
| 33 #include <cx/array_list.h> |
33 #include <cx/array_list.h> |
| 34 |
|
| 35 typedef struct GridElm { |
|
| 36 W32Widget *widget; |
|
| 37 short x; |
|
| 38 short y; |
|
| 39 GridLayoutInfo layout; |
|
| 40 } GridElm; |
|
| 41 |
34 |
| 42 typedef struct GridLayoutInfo { |
35 typedef struct GridLayoutInfo { |
| 43 short margin_left; |
36 short margin_left; |
| 44 short margin_right; |
37 short margin_right; |
| 45 short margin_top; |
38 short margin_top; |
| 46 short margin_bottom; |
39 short margin_bottom; |
| 47 short colspan; |
40 short colspan; |
| 48 short rowspan; |
41 short rowspan; |
| 49 short preferred_width; |
42 int preferred_width; |
| 50 short preferred_height; |
43 int preferred_height; |
| 51 bool hexpand; |
44 bool hexpand; |
| 52 bool vexpand; |
45 bool vexpand; |
| 53 bool hfill; |
46 bool hfill; |
| 54 bool vfill; |
47 bool vfill; |
| 55 } GridLayoutInfo; |
48 } GridLayoutInfo; |
| |
49 |
| |
50 typedef struct GridElm { |
| |
51 W32Widget *widget; |
| |
52 int posx; |
| |
53 int posy; |
| |
54 int width; |
| |
55 int height; |
| |
56 short gridx; |
| |
57 short gridy; |
| |
58 GridLayoutInfo layout; |
| |
59 } GridElm; |
| 56 |
60 |
| 57 typedef struct UiGridLayout { |
61 typedef struct UiGridLayout { |
| 58 HWND hwnd; |
62 HWND hwnd; |
| 59 |
63 |
| 60 short padding; |
64 short padding; |