From f0319406c56cdaf6b91e35ef657c6570c1ebdf23 Mon Sep 17 00:00:00 2001 From: Jonas Kümmerlin Date: Mon, 1 Jun 2020 10:56:58 +0200 Subject: layout code reorganization and renaming s/Widget/Control/ throughout the code. Only the widget factory gets to keep its name for now. --- alf/alflayout.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'alf/alflayout.h') diff --git a/alf/alflayout.h b/alf/alflayout.h index 8bcc592..b290956 100644 --- a/alf/alflayout.h +++ b/alf/alflayout.h @@ -14,7 +14,7 @@ typedef struct { int yspan; DWORD flags; SIZE calculatedSize; -} ALFWidgetPriv; +} ALFControlPriv; typedef struct { HWND hwnd; @@ -23,7 +23,7 @@ typedef struct { int width; int height; DWORD flags; -} ALFAddWidgetParams; +} ALFAddControlParams; typedef struct { // properties set by user @@ -45,7 +45,7 @@ typedef struct { #define ALF_LAYOUT_NEED_RECALC_CONTAINER ((DWORD)4) typedef struct tagALFLayout { - ALFListHeader widgets; + ALFListHeader controls; ALFLayoutRowOrColumn *columns; ALFLayoutRowOrColumn *rows; int nColumns; @@ -62,10 +62,10 @@ typedef struct tagALFLayout { ALFColor bgcolor; RECT containerMargins; // may be written to by the following functions void (*beginCalcSizes)(struct tagALFLayout *layout, HWND hwnd); - void (*handleContainerWidgetSize)(struct tagALFLayout *layout, HWND hwnd, HWND hwndContainerWidget, SIZE *s); + void (*handleContainerControlSize)(struct tagALFLayout *layout, HWND hwnd, HWND hwndContainerControl, SIZE *s); void (*endCalcSizes)(struct tagALFLayout *layout, HWND hwnd, SIZE *minSize); - RECT allocatedWidgetRect; - void (*preApplyLayoutToContainerWidget)(struct tagALFLayout *layout, HWND hwnd, HWND hwndContainerWidget, RECT *pos); // should modify pos + RECT allocatedControlRect; + void (*preApplyLayoutToContainerControl)(struct tagALFLayout *layout, HWND hwnd, HWND hwndContainerControl, RECT *pos); // should modify pos } ALFLayout; void @@ -81,16 +81,16 @@ void ALF_Layout_Apply(ALFLayout *layout, HWND window); void -ALF_Layout_AddWidget(ALFLayout *layout, HWND window, const ALFAddWidgetParams *params); +ALF_Layout_AddControl(ALFLayout *layout, HWND window, const ALFAddControlParams *params); BOOL -ALF_Layout_RemoveWidget(ALFLayout *layout, HWND window, HWND widget, BOOL destroy); +ALF_Layout_RemoveControl(ALFLayout *layout, HWND window, HWND control, BOOL destroy); BOOL ALF_Layout_HandleMessage(ALFLayout *layout, HWND window, UINT msg, WPARAM wparam, LPARAM lparam, LRESULT *ret); HWND -ALF_Layout_WidgetAtPos(ALFLayout *layout, int x, int y); +ALF_Layout_ControlAtPosPriv(ALFLayout *layout, int x, int y); void ALF_Layout_Invalidate(ALFLayout *layout, HWND window); -- cgit v1.2.3