From 5a3b46ee43fc601121a85d910d044033d891748f Mon Sep 17 00:00:00 2001 From: Jonas Kümmerlin Date: Thu, 30 Apr 2020 22:11:34 +0200 Subject: panel: support edge (like delphi) mainly to force me to implement layout margins --- alf/alflayout.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'alf/alflayout.h') 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 -- cgit v1.2.3