| 29 #include "grid.h" |
29 #include "grid.h" |
| 30 |
30 |
| 31 #include "../../ucx/cx/array_list.h" |
31 #include "../../ucx/cx/array_list.h" |
| 32 #include "../common/context.h" |
32 #include "../common/context.h" |
| 33 |
33 |
| 34 UiGridLayout* ui_grid_container(UiObject *obj, HWND control, short padding, short columnspacing, short rowspacing) { |
34 UiGridLayout* ui_grid_container(const CxAllocator *a, HWND control, short padding, short columnspacing, short rowspacing) { |
| 35 UiGridLayout *grid = cxZalloc(obj->ctx->allocator, sizeof(UiGridLayout)); |
35 UiGridLayout *grid = cxZalloc(a, sizeof(UiGridLayout)); |
| 36 grid->hwnd = control; |
36 grid->hwnd = control; |
| 37 grid->widgets = cxArrayListCreate(obj->ctx->allocator, NULL, sizeof(GridElm), 32); |
37 grid->widgets = cxArrayListCreate(a, NULL, sizeof(GridElm), 32); |
| 38 grid->padding = padding; |
38 grid->padding = padding; |
| 39 grid->columnspacing = columnspacing; |
39 grid->columnspacing = columnspacing; |
| 40 grid->rowspacing = rowspacing; |
40 grid->rowspacing = rowspacing; |
| 41 return grid; |
41 return grid; |
| 42 } |
42 } |