summaryrefslogtreecommitdiff
path: root/alf/alf.h
diff options
context:
space:
mode:
authorJonas Kümmerlin <jonas@kuemmerlin.eu>2020-04-16 11:24:43 +0200
committerJonas Kümmerlin <jonas@kuemmerlin.eu>2020-04-16 11:24:43 +0200
commitd56bd75ee5bc28daddb429b1fb850854970bc5f5 (patch)
treecb1061c483d50b3627d375062ad5195aefa9ed19 /alf/alf.h
parent090203fff7a05929816b49b19ea24959e2f518e5 (diff)
font handling change: allow controls to inherit fonts
also do it automatically when adding widget to layout, no more calling applyfonts manually
Diffstat (limited to 'alf/alf.h')
-rw-r--r--alf/alf.h19
1 files changed, 2 insertions, 17 deletions
diff --git a/alf/alf.h b/alf/alf.h
index e30d360..d98dfef 100644
--- a/alf/alf.h
+++ b/alf/alf.h
@@ -18,7 +18,6 @@ typedef struct {
void (*destroy)(void * /*closure*/, HWND /*window*/);
BOOL (*close)(void * /*closure*/, HWND /*window*/);
void (*postdestroy)(void * /*closure*/);
- void (*applyfonts)(void * /*closure*/, HWND /*window*/, const ALFWindowFonts *fonts);
LRESULT (*message)(void * /*closure*/, HWND, UINT, WPARAM, LPARAM);
LRESULT (*command)(void * /*closure*/, HWND /*window*/, WORD /*notificationcode*/, WORD /*sourceid*/, HWND /*control*/);
LRESULT (*notify)(void * /*closure*/, HWND /*window*/, WPARAM /*sourceid*/, NMHDR *);
@@ -30,11 +29,7 @@ typedef struct {
#define ALF_APPLYSIZE 0x02
#define ALF_HEXPAND 0x04
#define ALF_VEXPAND 0x08
-#define ALF_MESSAGEFONT 0x10
-#define ALF_STATUSFONT 0x20
-#define ALF_ICONTITLEFONT 0x40
-// sends a ALF_WM_APPLYFONTS message to the widget with ALFWindowFonts* lparam
-#define ALF_SENDAPPLYFONTS 0x80
+#define ALF_INHERITFONT 0x10
// label style flags
#define ALF_LABEL_ALIGN_LEFT 0
@@ -65,8 +60,7 @@ typedef struct {
#define ALF_WM_GETLAYOUTPARAMS (ALF_WM__BASE + 13)
#define ALF_WM_SETLAYOUTPARAMS (ALF_WM__BASE + 14)
#define ALF_WM_GETWIDGETATPOS (ALF_WM__BASE + 15)
-#define ALF_WM_APPLYFONTS (ALF_WM__BASE + 16)
-#define ALF_WM_PRETRANSLATEMSG (ALF_WM__BASE + 17)
+#define ALF_WM_PRETRANSLATEMSG (ALF_WM__BASE + 16)
#define ALF_WM_LBL_GETSTYLE (ALF_WM__BASE + 201)
#define ALF_WM_LBL_SETSTYLE (ALF_WM__BASE + 202)
@@ -173,15 +167,6 @@ ALF_RecalculateLayout(HWND win);
void
ALF_UpdateFonts(HWND win);
-// Applies window fonts to all children (depending on their layout flags).
-// also calls the applyfonts() virtual function.
-//
-// Call this after you have added new child widgets.
-// Since widget sizes depend on the assigned font, you should probably
-// call ALF_RecalculateLayout() afterwards.
-void
-ALF_ApplyFonts(HWND win);
-
void
ALF_ResizeWindow(HWND win, int cptWidth, int cptHeight);