summaryrefslogtreecommitdiff
path: root/new/ui_windows.h
diff options
context:
space:
mode:
Diffstat (limited to 'new/ui_windows.h')
-rw-r--r--new/ui_windows.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/new/ui_windows.h b/new/ui_windows.h
index 675f45b..c2a21b4 100644
--- a/new/ui_windows.h
+++ b/new/ui_windows.h
@@ -19,12 +19,17 @@ struct uiWindowsNewControlParams {
// These are called when the control sends a WM_COMMAND or WM_NOTIFY (respectively) to its parent.
// ui redirects the message back and calls these functions.
- // Store the result in the LRESULT pointer and return TRUE to return the given result; return FALSE to pass the notification up to your window procedure.
+ // Store the result in *lResult and return TRUE to return the given result; return FALSE to pass the notification up to your window procedure.
// Note that these are only issued if they come from the uiControl itself; notifications from children of the uiControl (such as a header control) will be received normally.
- BOOL (*onWM_COMMAND)(uiControl *, WPARAM, LPARAM, void *, LRESULT *);
- BOOL (*onWM_NOTIFY)(uiControl *, WPARAM, LPARAM, void *, LRESULT *);
- // This is the void * parameter to both of the above.
+ BOOL (*onWM_COMMAND)(uiControl *c, WPARAM wParam, LPARAM lParam, void *data, LRESULT *lResult);
+ BOOL (*onWM_NOTIFY)(uiControl *c, WPARAM wParam, LPARAM lParam, void *data, LRESULT *lResult);
+ // This is the data parameter to both of the above.
void *onCommandNotifyData;
+
+ // This function is called when ui needs to know how to rearrange controls in a window.
+ // baseX and baseY are the base units used to convert between dialog units and pixels.
+ // internalLeading is the internal leading of the control font.
+ void (*preferredSize)(uiControl *c, int baseX, int baseY, LONG internalLeading, intmax_t *width, intmax_t *height);
};
uiControl *uiWindowsNewControl(uiWindowsNewControlParams *);