summaryrefslogtreecommitdiff
path: root/alf/alflayout.h
diff options
context:
space:
mode:
authorJonas Kümmerlin <jonas@kuemmerlin.eu>2020-04-30 22:11:34 +0200
committerJonas Kümmerlin <jonas@kuemmerlin.eu>2020-04-30 22:11:34 +0200
commit5a3b46ee43fc601121a85d910d044033d891748f (patch)
tree661fafdc6c4c6a99a360e8b101adfa1c1c6ed949 /alf/alflayout.h
parentd28cd7fb71a6fe56a04d4e21f2b95907a1ec105c (diff)
panel: support edge (like delphi)
mainly to force me to implement layout margins
Diffstat (limited to 'alf/alflayout.h')
-rw-r--r--alf/alflayout.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/alf/alflayout.h b/alf/alflayout.h
index bd966cc..9170db7 100644
--- a/alf/alflayout.h
+++ b/alf/alflayout.h
@@ -37,10 +37,11 @@ typedef struct {
int allocatedPosition;
} ALFLayoutRowOrColumn;
-#define ALF_LAYOUT_NEED_RECALC ((DWORD)1)
-#define ALF_LAYOUT_NEED_REAPPLY ((DWORD)2)
+#define ALF_LAYOUT_NEED_RECALC ((DWORD)1)
+#define ALF_LAYOUT_NEED_REAPPLY ((DWORD)2)
+#define ALF_LAYOUT_NEED_RECALC_CONTAINER ((DWORD)4)
-typedef struct {
+typedef struct tagALFLayout {
ALFListHeader widgets;
ALFLayoutRowOrColumn *columns;
ALFLayoutRowOrColumn *rows;
@@ -56,6 +57,9 @@ typedef struct {
int dpi;
HFONT font;
ALFColor bgcolor;
+ RECT containerMargins;
+ void (*calculateContainerMetrics)(struct tagALFLayout *layout, HWND hwnd, RECT *margins, SIZE *minSize);
+ RECT allocatedWidgetRect;
} ALFLayout;
void