diff options
| author | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2020-10-01 15:26:49 +0200 |
|---|---|---|
| committer | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2020-10-01 18:17:40 +0200 |
| commit | fdb780a69d47d6438c0116a208afad2e94476e95 (patch) | |
| tree | d0c77bd94ea06be4daca07fc2298a7149e1c50e1 /alf/alf.h | |
| parent | c8a5d9cc2dedf3a8573659fa70b14f86e899bac4 (diff) | |
custom button rework
Diffstat (limited to 'alf/alf.h')
| -rw-r--r-- | alf/alf.h | 22 |
1 files changed, 16 insertions, 6 deletions
@@ -601,15 +601,25 @@ ALF_AddRadioButton(HWND parent, WORD id, int x, int y, const TCHAR *text); HWND ALF_AddGroupBox(HWND parent, WORD id, int x, int y, const TCHAR *text); -// native buttons -HWND -ALF_AddNativeButton(HWND win, WORD id, int x, int y, const TCHAR *text); +// custom button -HWND -ALF_AddNativeCheckbox(HWND parent, WORD id, int x, int y, const TCHAR *text); +typedef SIZE (*ALFCustomButtonMeasureFunc)(HWND /*btn*/, void * /*closure*/, int /*dpi*/, HDC, HANDLE /*theme*/, int /*themePartId*/, int /*themeStateId*/); +typedef void (*ALFCustomButtonPaintFunc)(HWND /*btn*/, void * /*closure*/, int /*dpi*/, UINT /*itemState = ODS_* */, HDC, RECT * /*rcContent*/, HANDLE /*theme*/, int /*themePartId*/, int /*themeStateId*/); HWND -ALF_AddNativeRadioButton(HWND parent, WORD id, int x, int y, const TCHAR *text); +ALF_AddCustomButton(HWND win, WORD id, int x, int y, const TCHAR *text, ALFCustomButtonMeasureFunc measureFunc, ALFCustomButtonPaintFunc paintFunc, void *closure); + +SIZE +ALF_CustomButtonMeasureText(HWND btn, void *closure, int dpi, HDC hdc, HANDLE theme, int themePartId, int themeState); + +void +ALF_CustomButtonPaintText(HWND btn, void *closure, int dpi, UINT itemState, HDC hdc, RECT *rcContent, HANDLE theme, int themePartId, int themeStateId); + +SIZE +ALF_CustomButtonMeasureIcon(HWND btn, void *closure, int dpi, HDC hdc, HANDLE theme, int themePartId, int themeState); + +void +ALF_CustomButtonPaintIcon(HWND btn, void *closure, int dpi, UINT itemState, HDC hdc, RECT *rcContent, HANDLE theme, int themePartId, int themeStateId); // icons and icon widget HWND |
