diff options
Diffstat (limited to 'alf/alflayout.h')
| -rw-r--r-- | alf/alflayout.h | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/alf/alflayout.h b/alf/alflayout.h index e326490..10fa09d 100644 --- a/alf/alflayout.h +++ b/alf/alflayout.h @@ -6,22 +6,35 @@ typedef struct { ALFListHeader list; HWND hwnd; - UINT x; - UINT y; - UINT cptWidth; - UINT cptHeight; - UINT cptMarginTop; - UINT cptMarginRight; - UINT cptMarginBottom; - UINT cptMarginLeft; + int x; + int y; + int width; + int height; DWORD flags; } ALFWidgetPriv; typedef struct { - int minWidth; + HWND hwnd; + int x; + int y; + int width; + int height; + DWORD flags; +} ALFAddWidgetParams; + +typedef struct { + // properties set by user + int requestedMinWidth; + int requestedExpandNumerator; + int requestedFlags; + + // calculated properties + int calculatedMinWidth; + int calculatedExpandNumerator; + + // allocated size for layout application int allocatedWidth; int allocatedPosition; - int expand : 1; } ALFLayoutRowOrColumn; #define ALF_LAYOUT_NEED_RECALC ((DWORD)1) @@ -35,8 +48,10 @@ typedef struct { int nRows; int totalMinWidth; int totalMinHeight; - int expandoColumnCount; - int expandoRowCount; + int columnExpandDenominator; + int rowExpandDenominator; + int biggestColumnNo; + int biggestRowNo; DWORD layoutValididityFlags; } ALFLayout; @@ -53,22 +68,16 @@ void ALF_Layout_Apply(ALFLayout *layout, HWND window); void -ALF_Layout_AddWidget(ALFLayout *layout, HWND window, const ALFWidgetLayoutParams *params); +ALF_Layout_AddWidget(ALFLayout *layout, HWND window, const ALFAddWidgetParams *params); BOOL ALF_Layout_RemoveWidget(ALFLayout *layout, HWND window, HWND widget, BOOL destroy); BOOL -ALF_Layout_SetWidgetParams(ALFLayout *layout, HWND window, const ALFWidgetLayoutParams *params, HWND widget); - -BOOL -ALF_Layout_GetWidgetParams(ALFLayout *layout, ALFWidgetLayoutParams *params, HWND widget); - -BOOL ALF_Layout_HandleMessage(ALFLayout *layout, HWND window, UINT msg, WPARAM wparam, LPARAM lparam, LRESULT *ret); HWND -ALF_Layout_WidgetAtPos(ALFLayout *layout, UINT x, UINT y); +ALF_Layout_WidgetAtPos(ALFLayout *layout, int x, int y); void ALF_Layout_Invalidate(ALFLayout *layout, HWND window); |
