summaryrefslogtreecommitdiff
path: root/alf/alflayout.h
diff options
context:
space:
mode:
authorJonas Kümmerlin <jonas@kuemmerlin.eu>2020-04-16 13:12:32 +0200
committerJonas Kümmerlin <jonas@kuemmerlin.eu>2020-04-16 13:12:32 +0200
commit5cbb664bd49cd2b9c035ccfc3024aa436d28c36c (patch)
treee7f83c28b89b8597d38a6b5664ba2ff0afee852e /alf/alflayout.h
parentfc7b721e12b6a07cb2b6566c196b9a6c4265c2af (diff)
layout: invalidate and recalculate, automatically
Diffstat (limited to 'alf/alflayout.h')
-rw-r--r--alf/alflayout.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/alf/alflayout.h b/alf/alflayout.h
index c279afa..e326490 100644
--- a/alf/alflayout.h
+++ b/alf/alflayout.h
@@ -24,6 +24,9 @@ typedef struct {
int expand : 1;
} ALFLayoutRowOrColumn;
+#define ALF_LAYOUT_NEED_RECALC ((DWORD)1)
+#define ALF_LAYOUT_NEED_REAPPLY ((DWORD)2)
+
typedef struct {
ALFListHeader widgets;
ALFLayoutRowOrColumn *columns;
@@ -34,6 +37,7 @@ typedef struct {
int totalMinHeight;
int expandoColumnCount;
int expandoRowCount;
+ DWORD layoutValididityFlags;
} ALFLayout;
void
@@ -43,7 +47,7 @@ void
ALF_Layout_Clear(ALFLayout *layout);
void
-ALF_Layout_CalcSizes(ALFLayout *layout, HWND window);
+ALF_Layout_GetMinSize(ALFLayout *layout, HWND window, SIZE *size);
void
ALF_Layout_Apply(ALFLayout *layout, HWND window);
@@ -55,7 +59,7 @@ BOOL
ALF_Layout_RemoveWidget(ALFLayout *layout, HWND window, HWND widget, BOOL destroy);
BOOL
-ALF_Layout_SetWidgetParams(ALFLayout *layout, const ALFWidgetLayoutParams *params, HWND widget);
+ALF_Layout_SetWidgetParams(ALFLayout *layout, HWND window, const ALFWidgetLayoutParams *params, HWND widget);
BOOL
ALF_Layout_GetWidgetParams(ALFLayout *layout, ALFWidgetLayoutParams *params, HWND widget);
@@ -65,3 +69,9 @@ ALF_Layout_HandleMessage(ALFLayout *layout, HWND window, UINT msg, WPARAM wparam
HWND
ALF_Layout_WidgetAtPos(ALFLayout *layout, UINT x, UINT y);
+
+void
+ALF_Layout_Invalidate(ALFLayout *layout, HWND window);
+
+BOOL
+ALF_Layout_Validate(ALFLayout *layout, HWND window);