/**
* @file XTPControlTheme.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
*
*/
/** @cond */
#if !defined(__XTPCONTROLSTHEME_H__)
# define __XTPCONTROLSTHEME_H__
/** @endcond */
# if _MSC_VER > 1000
# pragma once
# endif // _MSC_VER > 1000
# include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h"
class CXTPResourceImages;
/**
* @brief
* Enumeration used to determine the active theme style.
* @details
* The XTPControlTheme enumeration type defines the constants that
* indicate the theme for a particular window or application.
*/
enum XTPControlTheme
{
xtpControlThemeDefault, /**< Default Windows classic theme. */
xtpControlThemeFlat, /**< Flat appearance style. */
xtpControlThemeUltraFlat, /**< Ultra flat appearance style. */
xtpControlThemeOffice2000, /**< Office 2000 style theme. */
xtpControlThemeOfficeXP, /**< Office XP style theme. */
xtpControlThemeOffice2003, /**< Office 2003 style theme. */
xtpControlThemeNativeWinXP, /**< Windows XP and later native theme support. */
xtpControlThemeResource, /**< Office 2007/Office 2010/Windows7 external resource .DLL. */
xtpControlThemeVisualStudio2005, /**< Visual Studio 2005 style theme. */
xtpControlThemeVisualStudio2008, /**< Visual Studio 2008 style theme. */
xtpControlThemeVisualStudio2010, /**< Visual Studio 2010 style theme. */
xtpControlThemeCustom, /**< User defined custom theme. */
xtpControlThemeOffice2013, /**< Office 2013 control theme. */
xtpControlThemeOffice2016 = xtpControlThemeOffice2013, /**< Office 2016 control theme. */
xtpControlThemeVisualStudio2012, /**< VS 2012 style theme. */
xtpControlThemeVisualStudio2012Light, /**< VS 2012 Light style theme. */
xtpControlThemeVisualStudio2012Dark, /**< VS 2012 Dark style theme. */
xtpControlThemeVisualStudio2015, /**< VS 2015 style theme. */
xtpControlThemeNativeWindows10, /**< Native Windows 10 theme support. */
xtpControlThemeVisualStudio2017, /**< VS 2017 style theme. */
xtpControlThemeVisualStudio2019, /**< VS 2019 style theme. */
xtpControlThemeVisualStudio2022, /**< VS 2022 style theme. */
xtpControlThemeNativeWindows11, /**< Native Windows 11 theme support. */
};
/**
* @brief
* Enumeration used to determine the display state for a themed
* window.
* @details
* The XTPControlDrawState enumeration type defines the constants that
* indicate the display state for a particular window.
*/
enum XTPControlDrawState
{
xtpControlDrawStateNormal = 0x0000, /**< The window should be drawn normal. */
xtpControlDrawStateDisabled = 0x0001, /**< The window should be drawn disabled. */
xtpControlDrawStateHotLight = 0x0002, /**< The window has the mouse cursor hovering. */
xtpControlDrawStateHotButton = 0x0004, /**< The window has the mouse cursor hovering over a drop
button. */
xtpControlDrawStateSelected = 0x0008, /**< The window has an item selected. */
xtpControlDrawStatePushed = 0x0010, /**< The window has an item selected and the left mouse
button is pressed. */
xtpControlDrawStateFocus = 0x0020, /**< The window has keyboard focus. */
};
/**
* @brief
* CXTPControlTheme can be used as a base class for user defined themes.
*/
class _XTP_EXT_CLASS CXTPControlTheme : public CXTPCmdTarget
{
public:
/**
* @brief
* Constructs a new CXTPControlTheme object and handles initialization.
*/
CXTPControlTheme();
/**
* @brief
* Call this member function to get the style for the theme.
* @return
* An XTPControlTheme enumerator index value representing the theme style.
*/
XTPControlTheme GetThemeStyle() const;
/**
* @brief
* Static member posts the specified message to all immediate children
* of the specified HWND object. If bDeep is TRUE, then the message is
* additionally sent to all other descendant windows.
* @param hWnd HWND to the top level window, usually CMainFrame or CDialog.
* @param nTheme New visual theme. Can be any of the values listed in the
* Remarks section.
* @details
* nTheme can be one of the following values:
* xtpControlThemeDefault: Default theme (either Windows classic
* or Windows Visual Style).
* xtpControlThemeFlat: Flat appearance style.
* xtpControlThemeUltraFlat: Ultra flat appearance style.
* xtpControlThemeOffice2000: Office 2000 style theme.
* xtpControlThemeOfficeXP: Office XP style theme.
* xtpControlThemeOffice2003: Office 2003 style theme.
* xtpControlThemeVisualStudio2005: Visual Studio 2005 style theme.
* xtpControlThemeVisualStudio2008: Visual Studio 2008 style theme.
* xtpControlThemeVisualStudio2010: Visual Studio 2010 style theme.
* xtpControlThemeResource: Office 2007 / Office 2010 /
* Windows 7 external resource .DLL.
* @return
*/
static void AFX_CDECL SetTheme(HWND hWnd, XTPControlTheme nTheme);
protected:
XTPControlTheme m_nTheme; /**< Currently selected theme style index. */
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
# include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h"
/** @cond */
#endif // !defined(__XTPCONTROLSTHEME_H__)
/** @endcond */