14#ifndef __SWNDSTYLE__H__
15#define __SWNDSTYLE__H__
17#include "res.mgr/SDpiAwareFont.h"
36 Align_Center = 0x100U,
47 VAlign_Middle = 0x1000U,
48 VAlign_Bottom = 0x2000U,
49 Align_MaskY = 0x3000U,
125 void SetScale(
int nScale);
131 int GetScale()
const;
137 void SetAlign(UINT uAlign);
143 void SetVAlign(UINT uAlign);
221 ATTR_ENUM_BEGIN(L
"align", UINT, TRUE)
222 ATTR_ENUM_VALUE(L
"left", Align_Left)
223 ATTR_ENUM_VALUE(L
"center", Align_Center)
224 ATTR_ENUM_VALUE(L
"right", Align_Right)
225 ATTR_ENUM_END(m_uAlign)
226 ATTR_ENUM_BEGIN(L
"valign", UINT, TRUE)
227 ATTR_ENUM_VALUE(L
"top", VAlign_Top)
228 ATTR_ENUM_VALUE(L
"middle", VAlign_Middle)
229 ATTR_ENUM_VALUE(L
"bottom", VAlign_Bottom)
232 ATTR_COLOR(L
"colorBkgnd",
m_crBg, TRUE)
235 ATTR_FONT(L
"font",
m_ftText[0], TRUE)
236 ATTR_FONT(L
"fontHover",
m_ftText[1], TRUE)
237 ATTR_FONT(L
"fontPush",
m_ftText[2], TRUE)
238 ATTR_FONT(L
"fontDisable",
m_ftText[3], TRUE)
240 ATTR_COLOR(L
"colorText",
m_crText[0], TRUE)
241 ATTR_COLOR(L
"colorTextHover",
m_crText[1], TRUE)
242 ATTR_COLOR(L
"colorTextPush",
m_crText[2], TRUE)
243 ATTR_COLOR(L
"colorTextDisable",
m_crText[3], TRUE)
250 ATTR_LAYOUTSIZE(L
"padding_left",
m_rcInset[0], TRUE)
251 ATTR_LAYOUTSIZE(L
"padding_top",
m_rcInset[1], TRUE)
252 ATTR_LAYOUTSIZE(L
"padding_right",
m_rcInset[2], TRUE)
253 ATTR_LAYOUTSIZE(L
"padding_bottom",
m_rcInset[3], TRUE)
Class for managing DPI-aware fonts. This class provides functionality to handle font scaling based on...
A class representing an ASCII string.
UINT GetTextAlign() const
Retrieves the text alignment.
SDpiAwareFont m_ftText[4]
UINT GetAlign() const
Retrieves the alignment (horizontal and vertical).
IFontPtr GetTextFont(int iState)
Retrieves the text font for a specific state.
BOOL GetMultiLines() const
Retrieves the multi-line flag.
void _ParseLayoutSize4(const SStringW &strValue, SLayoutSize layoutSizes[])
Parses a string into an array of layout sizes.
void SetMultiLines(BOOL bMultiLines)
Sets the multi-line flag.
HRESULT OnAttrPadding(const SStringW &strValue, BOOL bLoading)
Handles the 'padding' attribute.
HRESULT OnAttrMarginX(const SStringW &strValue, BOOL bLoading)
Handles the 'margin-x' attribute.
SLayoutSize m_rcMargin[4]
HRESULT OnAttrMarginY(const SStringW &strValue, BOOL bLoading)
Handles the 'margin-y' attribute.
HRESULT OnAttrMargin(const SStringW &strValue, BOOL bLoading)
Handles the 'margin' attribute.
int GetStates()
Retrieves the number of states.
COLORREF GetTextColor(int iState)
Retrieves the text color for a specific state.
void SetTextColor(int iState, COLORREF cr)
Sets the text color for a specific state.
CRect GetMargin() const
Retrieves the margin rectangle.
CRect GetPadding() const
Retrieves the padding rectangle.