| 1 /* |
1 /* |
| 2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
| 3 * |
3 * |
| 4 * Copyright 2025 Olaf Wintermann. All rights reserved. |
4 * Copyright 2025 Olaf Wintermann. All rights reserved. |
| 5 * |
5 * |
| 6 * Redistribution and use in source and binary forms, with or without |
6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions are met: |
7 * modification, are permitted provided that the following conditions are met: |
| 63 struct UiContainerPrivate { |
65 struct UiContainerPrivate { |
| 64 UiContainerX container; |
66 UiContainerX container; |
| 65 HWND (*parent)(UiContainerPrivate*); |
67 HWND (*parent)(UiContainerPrivate*); |
| 66 void (*add)(UiContainerPrivate*, W32Widget*, UiLayout*); |
68 void (*add)(UiContainerPrivate*, W32Widget*, UiLayout*); |
| 67 UiContainerType type; |
69 UiContainerType type; |
| 68 UiLayout layout; |
70 HWND hwnd; |
| 69 }; |
71 }; |
| 70 |
72 |
| 71 struct UiGridLayoutContainer { |
73 struct UiGridLayoutContainer { |
| 72 UiContainerPrivate container; |
74 UiContainerPrivate container; |
| 73 UiGridLayout layout; |
75 UiGridLayout layout; |
| 74 int x; |
76 int x; |
| 75 int y; |
77 int y; |
| 76 }; |
78 }; |
| 77 |
79 |
| |
80 UiContainerPrivate* ui_obj_container(UiObject *obj); |
| |
81 HWND ui_container_get_parent(UiContainerPrivate *ctn); |
| |
82 void ui_container_add(UiContainerPrivate *ctn, W32Widget *widget, UiLayout *layout); |
| |
83 |
| |
84 UiContainerX* ui_grid_container_create(UiObject *obj, HWND hwnd, short padding_top, short padding_bottom, short padding_left, short padding_right); |
| |
85 void ui_grid_container_add(UiContainerPrivate *ctn, W32Widget *widget, UiLayout *layout); |
| |
86 |
| 78 #ifdef __cplusplus |
87 #ifdef __cplusplus |
| 79 } |
88 } |
| 80 #endif |
89 #endif |
| 81 |
90 |
| 82 #endif //CONTAINER_H |
91 #endif //CONTAINER_H |