/** * @file XTPDatePickerPaintManager.h * * @copyright * (c) 1998-2025 Codejock Software, All Rights Reserved. * * This source file is the property of Codejock Software and must not be * redistributed by any means without the explicit written permission of * Codejock Software. * * The use of this source code is governed by the terms and conditions specified * in the Toolkit Pro license agreement. Codejock Software grants you, as a * single software developer, the limited right to use this software on one * computer only. * * Contact Information: * support@codejock.com * http://www.codejock.com * */ #if !defined(_XTPDATEPICKERPAINTMANAGER_H__) # define _XTPDATEPICKERPAINTMANAGER_H__ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPDatePickerControl; class CXTPDatePickerItemMonth; class CXTPDatePickerItemDay; class CXTPWinThemeWrapper; /** * @brief * Class CXTPDatePickerPaintManager handles most of the drawing * activities for the DatePicker control. * * @details Utility class, handles most of the drawing activities. It stores * all settings needed by the control to perform drawing operations: * fonts, colors, styles for all others classes of control. It also * implements all functions for drawing typical graphical primitives, * functions that directly work with the device context. Can be * -overridden to provide another look and feel for the control. * Thus, you have an easy way to change the "skin" of your control. * Provide your own implementation of CXTPDatePickerPaintManager and do * not change the functionality all other classes of the control.
* Create a DatePickerPaintManager by calling its constructor. * Furthermore, call the "get" and "set" functions to change the * settings as needed. */ class _XTP_EXT_CLASS CXTPDatePickerPaintManager : public CXTPCmdTarget { friend class CXTPDatePickerControl; public: /** * @brief * Default paint manager constructor. * * @details Handles initial initialization. * * @see RefreshMetrics() */ CXTPDatePickerPaintManager(); /** * @brief * Default paint manager destructor. * * @details Handles member item deallocation. */ virtual ~CXTPDatePickerPaintManager(); /** * @brief * This member function performs initialization for the Paint * Manager. * * @details Initializes all drawing defaults (fonts, colors, etc.). Most of * defaults are system defaults. */ virtual void RefreshMetrics(); /** * @brief * This member function is called to fill the control's background. * * @param pDC Pointer to a valid device context. * @param rcClient A CRect that contains the control's client area rectangle * coordinates. */ virtual void DrawBackground(CDC* pDC, CRect rcClient); /** * @brief * This member function draws a border around the control. * * @param pDC Pointer to a valid device context. * @param pControl Pointer to a CXTPDatePickerControl object. * @param rcClient A CRect that contains the control's client area rectangle * coordinates. * @param bDraw TRUE to draw else Adjust client rectangle. */ virtual void DrawBorder(CDC* pDC, const CXTPDatePickerControl* pControl, CRect& rcClient, BOOL bDraw); /** * @brief * This member function draws scrolling triangles on the highest * bounded month headers. * * @param pDC Pointer to a valid device context. * @param rcSpot A CRect object that contains the coordinates of the triangle spot area. * @param bLeftDirection A BOOL that is used to determine the triangle direction. TRUE * the left scrolling triangle is drawn.FALSE the right * scrolling triangle is drawn. * @param clrColor The triangle color * @param bYears BOOL flag to show or hide arrow to scroll by years */ virtual void DrawScrollTriangle(CDC* pDC, CRect rcSpot, BOOL bLeftDirection, COLORREF clrColor = 0, BOOL bYears = FALSE); /** * @brief * This member function is used to obtain the control's background color. * * @return The color used to fill the control's client rectangle. */ virtual COLORREF GetControlBackColor(); /** * @brief * This member function is used to obtain the background color of the * standard day item. * * @return A COLORREF object that contains the background color of the * standard day item. */ virtual COLORREF GetDayBackColor(); /** * @brief * This member function is used to obtain the color of the standard * day item. * * @return A COLORREF object that contains the color of the standard day * item. */ virtual COLORREF GetDayTextColor(); /** * @brief * This member function is used to obtain a pointer to the font for * the standard day item. * * Example: ** // Get the font and extract a LOGGFONT structure. * LOGFONT lf; * GetDayTextFont()-\>GetLogFont(&lf); * // Create new italic font. * lf.lfItalic = 1; * CFont fontItalic; * Italic.CreateFontIndirect(&lf); ** * @return A pointer to a CFont object that contains the standard day item * font. */ virtual CFont* GetDayTextFont(); /** * @brief * This member function is used to obtain a pointer to the font for * the bolded day item. * * @return A pointer to a CFont object that contains the bold day item font. */ virtual CFont* GetDayTextFontBold(); /** * @brief * This member function is used to obtain the background color of the * non-month day item. * * @return A COLORREF object that contains the background color of the non * month day item. */ virtual COLORREF GetNonMonthDayBackColor(); /** * @brief * This member function is used to obtain the color of the non-month * day item. * * @return A COLORREF object that contains the color of the non-month day * item. */ virtual COLORREF GetNonMonthDayTextColor(); /** * @brief * This member function is used to obtain the font of the non-month * day item. * * Example: *
* // Get the font and extract a LOGGFONT structure. * LOGFONT lf; * GetNonMonthDayTextFont-\>GetLogFont(&lf); * // Create new old font * lf.lfWeight = FW_BOLD; * CFont fontBold; * fntBold.CreateFontIndirect(&lf); ** * @return Pointer to a CFont object that contains the font of the non-month * day item. */ CFont* GetNonMonthDayTextFont(); /** * @brief * This member function is used to obtain the background color of the * selected day item. * * @return A COLORREF object that contains the background color of the * selected day item. */ virtual COLORREF GetSelectedDayBackColor(); /** * @brief * This member function obtains the color of the selected day item. * * @return A COLORREF object that contains the color of the selected day * item. */ virtual COLORREF GetSelectedDayTextColor(); /** * @brief * This member function obtains the background color of the month * header area. * * @return A COLORREF object containing the background color of the month * header area. */ virtual COLORREF GetMonthHeaderBackColor(); /** * @brief * This member function obtains the text color of the month header * area. * * @return A COLORREF object containing the text color of the month header * area. */ virtual COLORREF GetMonthHeaderTextColor(); /** * @brief * This member function obtains the font of the month header area * text. * * @return A CFont object that contains the font of the month header area * text. */ CFont* GetHeaderTextFont(); /** * @brief * This member function returns the background color of the days of * weeks area. * * @return A COLORREF object containing the background color of the days of * weeks area. */ virtual COLORREF GetDaysOfWeekBackColor(); /** * @brief * This member function obtains the text color of the days of weeks area. * * @return A COLORREF object containing the text color of the days of weeks * area. */ virtual COLORREF GetDaysOfWeekTextColor(); /** * @brief * This member function obtains the font of the days of weeks area * text. * * @return A pointer to a CFont object that contains the font of the days of * weeks area text. */ CFont* GetDaysOfWeekTextFont(); /** * @brief * This member function obtains the background color of the week * numbers area. * * @return A COLORREF object that contains the background color of the week * numbers area. */ virtual COLORREF GetWeekNumbersBackColor(); /** * @brief * This member function obtains the text color of the week numbers * items. * * @return A COLORREF object that contains the text color of the week numbers * items. */ virtual COLORREF GetWeekNumbersTextColor(); /** * @brief * This member function obtains the font of the week numbers items. * * @return A pointer to a CFont object that contains the font of the week * numbers items. */ CFont* GetWeekNumbersTextFont(); /** * @brief * This member function obtains the background color of the pop-up * month list control. * * @return A COLORREF object that contains the background color of the pop-up * month list control. */ virtual COLORREF GetListControlBackColor(); /** * @brief * This member function obtains the text color of the pop-up month * list control. * * @return A COLORREF object that contains the text color of the pop-up month * list control. */ virtual COLORREF GetListControlTextColor(); /** * @brief * This member function obtains the font of the pop-up month list * control. * * @return A pointer to a CFont object that contains the font of the pop-up * month list control. */ CFont* GetListControlTextFont(); /** * @brief * This member function obtains the highlighting color of the "Today" * item. * * @return A COLORREF object that contains the highlighting color of the * "Today" item. */ virtual COLORREF GetHighlightTodayColor(); /** * @brief * This member function sets the button's font. * * @param fontButton A CFont pointer to the button's font object. * * @details Call this function to set the new button's font from the provided * CFont object. * * @see SetButtonFontIndirect(LOGFONT*) * @see GetButtonFont() */ void SetButtonFont(CFont* fontButton); /** * @brief * This member function sets the button's font using a LOGFONT * structure. * * @param lFont Pointer to the LOGFONT structure. * * @details This member function creates and sets the new button's font * from the given LOGFONT structure. * * @see SetButtonFont(CFont*) * @see GetButtonFont() */ void SetButtonFontIndirect(LOGFONT* lFont); /** * @brief * This member function is used to obtain the button's font object. * * @return A pointer to the button's CFont object. * * @see SetButtonFontIndirect(LOGFONT* lFont) * @see SetButtonFont(CFont* fontButton) */ CFont* GetButtonFont(); /** * @brief * This member function is used to set the control's default font * using a LOGFONT structure. * * @param lFont Pointer to the LOGFONT structure. * * @details This member function creates and sets the control's new default * font from the given LOGFONT structure. */ void SetFontIndirect(LOGFONT* lFont); /** * @brief * This member function is used to draw the control's buttons. * * @param pDC Pointer to a valid device context. * @param rcButton A CRect that contains the button area bounding * rectangle coordinates. * @param strButton A CString that contains the string of the button's * text. * @param bIsDown A BOOL that determines if the button is down or up. * @param bIsHighLight A BOOL that determines if the button is highlighted. * * @details Use this member function to draw buttons in the appropriate state. * The state depends on the bIsDown parameter, the button may be * drawn pressed or released. Furthermore, depending on the * bIsHighLight, the button may be drawn with highlighted borders. * * Example: *
* for (int i = 0; i \< GetButtonCount(); i++)
* {
* CXTPDatePickerButton* pButton = GetButton(i);
* if (pButton-\>m_bVisible)
* DrawButton(pDC, pButton-\>m_rcButton, pButton-\>m_strCaption,
* pButton-\>m_bPressed, pButton-\>m_bHighlight);
* }
*
*/
virtual void DrawButton(CDC* pDC, const CRect& rcButton, const CString& strButton, BOOL bIsDown,
BOOL bIsHighLight);
/**
* @brief
* Call this member function to draw a single month day in the month
* area.
*
* @param pDC Pointer to a valid device context.
* @param pDay Pointer to day object.
*
* @return TRUE if the drawing is successful, FALSE else.
*
* @details It is called from the CXTPDatePickerItemDay implementation.
* You can override it to customize drawing.
*/
virtual BOOL DrawDay(CDC* pDC, CXTPDatePickerItemDay* pDay);
/**
* @brief
* Call this member function to draw the month header in the month
* area.
*
* @param pDC Pointer to a valid device context.
* @param pMonth Pointer to month object.
*
* @details It is called from the CXTPDatePickerItemMonth implementation.
* You can override it to customize drawing.
*/
virtual void DrawMonthHeader(CDC* pDC, CXTPDatePickerItemMonth* pMonth);
/**
* @brief
* Call this member function to draw the week numbers in the month
* area.
*
* @param pDC Pointer to a valid device context.
* @param pMonth Pointer to month object.
*
* @details It is called from the CXTPDatePickerItemMonth implementation.
* You can override it to customize drawing.
*/
virtual void DrawWeekNumbers(CDC* pDC, CXTPDatePickerItemMonth* pMonth);
/**
* @brief
* Call this member function to draw the days of the week in the
* month header.
*
* @param pDC Pointer to a valid device context.
* @param pMonth Pointer to month object.
*
* @details It is called from the CXTPDatePickerItemMonth implementation.
* You can override it to customize drawing.
*/
virtual void DrawDaysOfWeek(CDC* pDC, CXTPDatePickerItemMonth* pMonth);
/**
* @brief
* This member function is used to calculate the day's bounding
* rectangle coordinates.
*
* @param pDC Pointer to a valid device context.
*
* @details This member function calculates the day's bounding rectangle
* coordinates for the given device context current day's font.
*
* @return A CSize object containing the day's bounding rectangle
* coordinates.
*/
virtual CSize CalcDayRect(CDC* pDC);
/**
* @brief
* This member function calculates the month's header bounding
* rectangle coordinates.
*
* @param pDC Pointer to a valid device context.
*
* @details This member function calculates the month's header bounding
* rectangle coordinates for the given device context's current
* header font.
*
* @return A CSize object containing the month's header bounding rectangle
* coordinates.
*/
virtual CSize CalcMonthHeaderRect(CDC* pDC);
/**
* @brief
* This member function calculates the "day of week names" bounding
* rectangle coordinates.
*
* @param pDC Pointer to a valid device context.
*
* @details Calculates the "day of week names" bounding rectangle coordinates
* for the given device context's current header font.
*
* @return A CSize object that contains the "day of week names" rectangle
* coordinates.
*/
virtual CSize CalcDayOfWeekRect(CDC* pDC);
/**
* @brief
* This member function calculates the "week numbers" bounding
* rectangle coordinates.
*
* @param pDC Pointer to a valid device context.
*
* @details Calculates the "week numbers" bounding rectangle coordinates for
* the given device context's current header font.
*
* @return A CSize object that contains the "week numbers" bounding rectangle
* coordinates.
*/
virtual CSize CalcWeekNumbersRect(CDC* pDC);
/**
* @brief
* This member function calculates the month's bounding rectangle
* coordinates.
*
* @param pDC Pointer to a valid device context.
*
* @details Calculates the Month's bounding rectangle coordinates for the
* given device context's current header font.
*
* @return A CSize object that contains the month's bounding rectangle
* coordinates.
*/
virtual CSize CalcMonthRect(CDC* pDC);
/**
* @brief
* This member function is used to switch "Themes".
*
* @param bEnableTheme A BOOL that is used as a flag to indicate if themes are enabled.
* Set to TRUE if themes are enabled, FALSE if themes are not enabled.
*/
virtual void EnableTheme(BOOL bEnableTheme);
/**
* @brief
* This member function is used to obtain the back cursor used for
* weeks selection.
*
* @return A handle of the loaded cursor.
*/
virtual HCURSOR GetCursorBack();
protected:
/**
* @brief
* This member function is used to draw a black triangle.
*
* @param pDC Pointer to a valid device context.
* @param pt0 Apex coordinate.
* @param pt1 Apex coordinate.
* @param pt2 Apex coordinate.
* @param clrColor The triangle color.
*/
virtual void Triangle(CDC* pDC, CPoint pt0, CPoint pt1, CPoint pt2, COLORREF clrColor = 0);
/**
* @brief
* This member function is used to obtain current paint theme.
*
* @return A paint theme ID from enum XTPCalendarTheme.
*/
XTPCalendarTheme GetPaintTheme() const;
protected:
/**
* @brief
* This member function is used to set current paint theme.
*
* @param ePaintTheme A paint theme ID from enum XTPCalendarTheme.
*/
// void SetPaintTheme(XTPCalendarTheme ePaintTheme);
public:
CSize m_szDayMargin;
CSize m_szHdrMargin;
CSize m_szDoWMargin;
CXTPPaintManagerColor m_clrControlBack; /**<
* This member variable is a COLORREF object that is
* used as the background color of the control.
*/
CXTPPaintManagerColor m_clrHighlightToday; /**<
* This member variable is a COLORREF object that is
* used as the color for highlighting the "Today"
* item.
*/
CXTPPaintManagerColor m_clrSelectedDayBack; /**<
* This member variable is a COLORREF object that
* is used as the background color of the selected
* day item.
*/
CXTPPaintManagerColor m_clrMonthHeaderBack; /**<
* This member variable is a COLORREF object that
* is used as the background color of the month
* header area.
*/
CXTPPaintManagerColor m_clrMonthHeaderText; /**<
* This member variable is a COLORREF object that
* is used as the text color of the month header
* area.
*/
CXTPPaintManagerColor m_clrSelectedDayText; /**<
* This member variable is a COLORREF object that
* is used as the color of the selected day item.
*/
CXTPPaintManagerColor m_clrMonthBorder; /**<
* This member variable is a COLORREF object that is
* used as the color of the border between day of month
* and week numbers or days of week.
*/
CXTPPaintManagerColor m_clrMonthHeaderButton; /**<
* This member variable is a COLORREF object that
* is used as the color for the scroll's triangle
* button.
*/
CXTPPaintManagerColor m_clrDayBack; /**<
* This member variable is a COLORREF object that is used
* as the background color of the normal day item.
*/
CXTPPaintManagerColor m_clrDayText; /**<
* This member variable is a COLORREF object that is used
* as the color of the usual day item.
*/
CXTPPaintManagerColor m_clrNonMonthDayBack; /**<
* This member variable is a COLORREF object that
* is used as the background color of the non-month
* day item.
*/
CXTPPaintManagerColor m_clrNonMonthDayText; /**<
* This member variable is a COLORREF object that
* is used as the color of the non-month day item.
*/
CXTPPaintManagerColor m_clrDaysOfWeekBack; /**<
* This member variable is a COLORREF object that is
* used for the background color of the days of weeks
* area.
*/
CXTPPaintManagerColor m_clrDaysOfWeekText; /**<
* This member variable is a COLORFEF object that is
* used as the text color of the days of weeks area.
*/
CXTPPaintManagerColor m_clrWeekNumbersBack; /**<
* This member variable is a COLORREF object that
* is used as the background color of the week
* numbers area.
*/
CXTPPaintManagerColor m_clrWeekNumbersText; /**<
* This member variable is a COLORREF object that
* is used as the text color of the week numbers
* items.
*/
CXTPPaintManagerColor m_clrButtonText; /**<
* This member variable is a COLORREF object that is
* used as the color for the button text.
*/
CXTPPaintManagerColor m_clrButtonFace; /**<
* This member variable is a COLORREF object that is
* used as the basic color for buttons.
*/
CXTPPaintManagerColor m_clrListControlBack; /**<
* This member variable is a COLORREF object that
* is used as the background color of the pop-up
* month list control.
*/
CXTPPaintManagerColor m_clrListControlText; /**<
* This member variable is a COLORREF object that
* is used as the text color of the pop-up month
* list control.
*/
protected:
COLORREF m_clrStaticBorder; /**< Static border color */
COLORREF m_clr3DShadow; /**<
* This member variable is a COLORREF object that is used to specify
* the color for shadow areas.
*/
COLORREF m_clr3DLight; /**<
* This member variable is a COLORREF object that is used to specify
* the color for light areas
*/
COLORREF m_clr3DFace; /**<
* This member variable is a COL ORREF object that is used as the
* color for the button text.
*/
COLORREF m_clr3DText; /**<
* This member variable is a COLORREF object that is used as the basic
* color for buttons.
*/
CXTPFont m_xtpFontDay; /**<
* This member variable is a CXTPFont object that is used for the font
* -of the usual day item.
*/
CXTPFont m_xtpFontDayBold; /**<
* This member variable is a CXTPFont object that is used for the
* font -of the bold day item.
*/
CXTPFont m_xtpFontNonMonthDay; /**<
* This member variable is a CXTPFont object that is used as the
* font for the non-month day item.
*/
CXTPFont m_xtpFontHeader; /**<
* This member variable is a CXTPFont object that is used as the font
* for the header text.
*/
CXTPFont m_xtpFontDaysOfWeek; /**<
* This member variable is a CXTPFont object that is used as the
* font for the days of weeks text.
*/
CXTPFont m_xtpFontWeekNumbers; /**<
* This member variable is a CXTPFont object that is used as the
* font for the week number items text.
*/
CXTPFont m_xtpFontListControl; /**<
* This member variable is a CXTPFont object that is used as the
* font for the pop-up month list control.
*/
CXTPFont m_xtpFontButton; /**<
* This member variable is a CXTPFont object that is used as the font
* for the button text.
*/
XTP_SUBSTITUTE_GDI_MEMBER_WITH_CACHED(CFont, m_fontDay, m_xtpFontDay, GetDayFontHandle);
XTP_SUBSTITUTE_GDI_MEMBER_WITH_CACHED(CFont, m_fontDayBold, m_xtpFontDayBold,
GetDayBoldFontHandle);
XTP_SUBSTITUTE_GDI_MEMBER_WITH_CACHED(CFont, m_fontNonMonthDay, m_xtpFontNonMonthDay,
GetNonMonthDayFontHandle);
XTP_SUBSTITUTE_GDI_MEMBER_WITH_CACHED(CFont, m_fontHeader, m_xtpFontHeader,
GetHeaderFontHandle);
XTP_SUBSTITUTE_GDI_MEMBER_WITH_CACHED(CFont, m_fontDaysOfWeek, m_xtpFontDaysOfWeek,
GetDaysOfWeekFontHandle);
XTP_SUBSTITUTE_GDI_MEMBER_WITH_CACHED(CFont, m_fontWeekNumbers, m_xtpFontWeekNumbers,
GetWeekNumbersFontHandle);
XTP_SUBSTITUTE_GDI_MEMBER_WITH_CACHED(CFont, m_fontListControl, m_xtpFontListControl,
GetListControlFontHandle);
XTP_SUBSTITUTE_GDI_MEMBER_WITH_CACHED(CFont, m_fontButton, m_xtpFontButton,
GetButtonFontHandle);
BOOL m_bEnableTheme; /**<
* This member variable is a BOOL that is used to indicate if Luna
* colors are enabled. The valid values are TRUE to enable Luna
* colors, otherwise FALSE.
*/
CXTPWinThemeWrapper* m_themeButton; /**<
* This member variable is a CXTPWinThemeWrapper object
* that is used as the theme wrapper for the Paint Manager.
*/
HCURSOR m_hCursorBack; /**< Back cursor for week selection*/
XTPCalendarTheme m_nPaintTheme; /**< Store the Paint Theme;*/
protected:
friend class CXTPDatePickerControl;
# ifdef _XTP_ACTIVEX
DECLARE_DISPATCH_MAP()
DECLARE_INTERFACE_MAP()
DECLARE_OLETYPELIB_EX(CXTPDatePickerPaintManager)
# define DECLARE_PROPERTY_UN(theProperty, theType) \
afx_msg theType OleGet##theProperty(); \
afx_msg void OleSet##theProperty(theType);
DECLARE_PROPERTY_UN(ControlBackColor, COLORREF);
DECLARE_PROPERTY_UN(HighlightTodayColor, COLORREF);
DECLARE_PROPERTY_UN(SelectedDayBackColor, COLORREF);
DECLARE_PROPERTY_UN(MonthHeaderBackColor, COLORREF);
DECLARE_PROPERTY_UN(MonthHeaderTextColor, COLORREF);
DECLARE_PROPERTY_UN(SelectedDayTextColor, COLORREF);
DECLARE_PROPERTY_UN(MonthBorderColor, COLORREF);
DECLARE_PROPERTY_UN(MonthHeaderButtonColor, COLORREF);
DECLARE_PROPERTY_UN(DayBackColor, COLORREF);
DECLARE_PROPERTY_UN(DayTextColor, COLORREF);
DECLARE_PROPERTY_UN(NonMonthDayBackColor, COLORREF);
DECLARE_PROPERTY_UN(NonMonthDayTextColor, COLORREF);
DECLARE_PROPERTY_UN(DaysOfWeekBackColor, COLORREF);
DECLARE_PROPERTY_UN(DaysOfWeekTextColor, COLORREF);
DECLARE_PROPERTY_UN(WeekNumbersBackColor, COLORREF);
DECLARE_PROPERTY_UN(WeekNumbersTextColor, COLORREF);
DECLARE_PROPERTY_UN(ButtonTextColor, COLORREF);
DECLARE_PROPERTY_UN(ButtonFaceColor, COLORREF);
DECLARE_PROPERTY_UN(ListControlBackColor, COLORREF);
DECLARE_PROPERTY_UN(ListControlTextColor, COLORREF);
# endif
};
AFX_INLINE COLORREF CXTPDatePickerPaintManager::GetControlBackColor()
{
return m_clrControlBack;
}
AFX_INLINE COLORREF CXTPDatePickerPaintManager::GetDayBackColor()
{
return m_clrDayBack;
}
AFX_INLINE COLORREF CXTPDatePickerPaintManager::GetDayTextColor()
{
return m_clrDayText;
}
AFX_INLINE CFont* CXTPDatePickerPaintManager::GetDayTextFont()
{
return &m_xtpFontDay;
}
AFX_INLINE CFont* CXTPDatePickerPaintManager::GetDayTextFontBold()
{
return &m_xtpFontDayBold;
}
AFX_INLINE COLORREF CXTPDatePickerPaintManager::GetNonMonthDayBackColor()
{
return m_clrNonMonthDayBack;
}
AFX_INLINE COLORREF CXTPDatePickerPaintManager::GetNonMonthDayTextColor()
{
return m_clrNonMonthDayText;
}
AFX_INLINE CFont* CXTPDatePickerPaintManager::GetNonMonthDayTextFont()
{
return &m_xtpFontNonMonthDay;
}
AFX_INLINE COLORREF CXTPDatePickerPaintManager::GetSelectedDayBackColor()
{
return m_clrSelectedDayBack;
}
AFX_INLINE COLORREF CXTPDatePickerPaintManager::GetSelectedDayTextColor()
{
return m_clrSelectedDayText;
}
AFX_INLINE COLORREF CXTPDatePickerPaintManager::GetMonthHeaderBackColor()
{
return m_clrMonthHeaderBack;
}
AFX_INLINE COLORREF CXTPDatePickerPaintManager::GetMonthHeaderTextColor()
{
return m_clrMonthHeaderText;
}
AFX_INLINE CFont* CXTPDatePickerPaintManager::GetHeaderTextFont()
{
return &m_xtpFontHeader;
}
AFX_INLINE COLORREF CXTPDatePickerPaintManager::GetDaysOfWeekBackColor()
{
return m_clrDaysOfWeekBack;
}
AFX_INLINE COLORREF CXTPDatePickerPaintManager::GetDaysOfWeekTextColor()
{
return m_clrDaysOfWeekText;
}
AFX_INLINE CFont* CXTPDatePickerPaintManager::GetDaysOfWeekTextFont()
{
return &m_xtpFontDaysOfWeek;
}
AFX_INLINE COLORREF CXTPDatePickerPaintManager::GetWeekNumbersBackColor()
{
return m_clrWeekNumbersBack;
}
AFX_INLINE COLORREF CXTPDatePickerPaintManager::GetWeekNumbersTextColor()
{
return m_clrWeekNumbersText;
}
AFX_INLINE CFont* CXTPDatePickerPaintManager::GetWeekNumbersTextFont()
{
return &m_xtpFontWeekNumbers;
}
AFX_INLINE COLORREF CXTPDatePickerPaintManager::GetListControlBackColor()
{
return m_clrListControlBack;
}
AFX_INLINE COLORREF CXTPDatePickerPaintManager::GetListControlTextColor()
{
return m_clrListControlText;
}
AFX_INLINE CFont* CXTPDatePickerPaintManager::GetListControlTextFont()
{
return &m_xtpFontListControl;
}
AFX_INLINE COLORREF CXTPDatePickerPaintManager::GetHighlightTodayColor()
{
return m_clrHighlightToday;
}
AFX_INLINE CFont* CXTPDatePickerPaintManager::GetButtonFont()
{
return &m_xtpFontButton;
}
AFX_INLINE void CXTPDatePickerPaintManager::EnableTheme(BOOL bEnableTheme)
{
m_bEnableTheme = bEnableTheme;
RefreshMetrics();
}
AFX_INLINE HCURSOR CXTPDatePickerPaintManager::GetCursorBack()
{
return m_hCursorBack;
}
AFX_INLINE XTPCalendarTheme CXTPDatePickerPaintManager::GetPaintTheme() const
{
return m_nPaintTheme;
}
# include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h"
#endif // !defined(_XTPDATEPICKERPAINTMANAGER_H__)