ui/win32/container.h

changeset 813
6d9066951cdb
parent 670
d676b2c5e93b
child 814
bcb3c7d486f3
--- a/ui/win32/container.h	Wed Oct 08 07:53:57 2025 +0200
+++ b/ui/win32/container.h	Wed Oct 08 09:46:23 2025 +0200
@@ -27,36 +27,16 @@
  */
 
 #ifndef CONTAINER_H
-
-#include "../ui/container.h"
-
 #define CONTAINER_H
 
-#define UI_APPLY_LAYOUT(layout, args) \
-    layout.fill = args->fill; \
-    layout.hexpand = args->hexpand; \
-    layout.vexpand = args->vexpand; \
-    layout.hfill = args->hfill; \
-    layout.vfill = args->vfill; \
-    layout.override_defaults = args->override_defaults; \
-    layout.colspan = args->colspan; \
-    layout.rowspan = args->rowspan
-
-typedef struct UiLayout UiLayout;
+#include "../ui/container.h"
+#include "grid.h"
 
-struct UiLayout {
-    UiBool       fill;
-    UiBool       newline;
-    char         *label;
-    UiBool       hexpand;
-    UiBool       vexpand;
-    UiBool       hfill;
-    UiBool       vfill;
-    UiBool       override_defaults;
-    int          width;
-    int          colspan;
-    int          rowspan;
-};
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 
 enum UiBoxOrientation {
     UI_BOX_VERTICAL = 0,
@@ -82,10 +62,21 @@
 
 struct UiContainerPrivate {
     UiContainerX    container;
-    void            (*prepare)(UiContainerPrivate*, UiRect*);
-    void            (*add)(UiContainerPrivate*, UiRect*, W32Widget*);
+    HWND            (*parent)(UiContainerPrivate*);
+    void            (*add)(UiContainerPrivate*, W32Widget*, UiLayout*);
     UiContainerType type;
     UiLayout        layout;
 };
 
+struct UiGridLayoutContainer {
+    UiContainerPrivate container;
+    UiGridLayout layout;
+    int x;
+    int y;
+};
+
+#ifdef __cplusplus
+}
+#endif
+
 #endif //CONTAINER_H

mercurial