diff options
| author | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2020-06-06 11:32:19 +0200 |
|---|---|---|
| committer | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2020-06-06 11:32:19 +0200 |
| commit | d607540dbaf8a0b2a24dceb27ebddddb420ffd0f (patch) | |
| tree | 910ff59ef51d6366c4c4ee2ef5f9e8a68b412dc6 /alf/alf.h | |
| parent | db6974eda1dc1fada95af97ea53c369db58fda41 (diff) | |
redintroduce update fonts vfunc, hopefully more useful now
Diffstat (limited to 'alf/alf.h')
| -rw-r--r-- | alf/alf.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -18,6 +18,7 @@ typedef struct { BOOL (*pretranslatemessage)(void * /*closure*/, HWND /*window*/, MSG * /*message*/); void (*paint)(void * /*closure*/, HWND, HDC, RECT *); void (*windowposchanged)(void * /*closure*/, HWND, WINDOWPOS *); + void (*updatefontsdpi)(void * /*closure*/, HWND); // override this to reload fonts, icons and other settings or dpi dependent resources. Note: need to set a font or call ALF_Toplevel_SetDefaultFont() } ALFToplevelVTable; typedef struct { @@ -72,7 +73,6 @@ typedef struct { // messages #define ALF_WM__BASE 0x2800 #define ALF_WM_QUERYSIZE (ALF_WM__BASE + 1) -#define ALF_WM_UPDATEFONTS (ALF_WM__BASE + 3) #define ALF_WM_ADDCONTROL (ALF_WM__BASE + 4) #define ALF_WM_CONTROLBYID (ALF_WM__BASE + 5) #define ALF_WM_REMOVECONTROL (ALF_WM__BASE + 6) @@ -126,6 +126,8 @@ typedef struct { #define ALF_WM_NTBK_GETSELINDEX (ALF_WM__BASE + 206) #define ALF_WM_NTBK_GETPNLINDEX (ALF_WM__BASE + 207) +#define ALF_WM_TPLVL_SETDEFFONT (ALF_WM__BASE + 201) + #define ALF_WM_USER (ALF_WM__BASE + 300) typedef DWORD ALFColor; @@ -180,11 +182,6 @@ ALF_ControlHwndById(HWND win, WORD id); void ALF_InvalidateBackground(HWND win); -// Recalculates the window's fonts and applies them to child controls. -// ALF does this automatically on a DPI or settings change so you shouldn't have -// to call ALF_UpdateFonts(). -void -ALF_UpdateFonts(HWND win); // Sets the background color of the given window // Also, if the window is a child window, disables the ALF_LAYOUT_INHERITBGCOLOR flag @@ -473,6 +470,9 @@ ALF_Toplevel_EnsureBigEnough(HWND toplevel); void ALF_Toplevel_SetDefaultButton(HWND win, WORD id); +void +ALF_Toplevel_SetDefaultFont(HWND toplevel); + // label HWND |
