--- a/ui/win32/grid.h Wed Oct 08 07:53:57 2025 +0200 +++ b/ui/win32/grid.h Wed Oct 08 09:46:23 2025 +0200 @@ -28,17 +28,10 @@ #ifndef GRID_H #define GRID_H -#include "container.h" +#include "../ui/win32.h" #include <stdbool.h> #include <cx/array_list.h> -typedef struct GridElm { - W32Widget *widget; - short x; - short y; - GridLayoutInfo layout; -} GridElm; - typedef struct GridLayoutInfo { short margin_left; short margin_right; @@ -46,14 +39,25 @@ short margin_bottom; short colspan; short rowspan; - short preferred_width; - short preferred_height; + int preferred_width; + int preferred_height; bool hexpand; bool vexpand; bool hfill; bool vfill; } GridLayoutInfo; +typedef struct GridElm { + W32Widget *widget; + int posx; + int posy; + int width; + int height; + short gridx; + short gridy; + GridLayoutInfo layout; +} GridElm; + typedef struct UiGridLayout { HWND hwnd; @@ -68,7 +72,7 @@ } UiGridLayout; -UiGridLayout* ui_grid_container(UiObject *obj, HWND control, short padding, short columnspacing, short rowspacing); +UiGridLayout* ui_grid_container(const CxAllocator *a, HWND control, short padding, short columnspacing, short rowspacing); void ui_grid_add_widget( UiGridLayout *grid,