/** * @file XTPTaskPanelVisualStudio2012Theme.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 */ #ifndef XTPTaskPanelVisualStudio2012Theme_h__ # define XTPTaskPanelVisualStudio2012Theme_h__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * CXTPTaskPanelVisualStudio2012Theme represents a VS.NET 2012 style theme. * @see * CXTPTaskPanel::SetTheme */ class _XTP_EXT_CLASS CXTPTaskPanelVisualStudio2012Theme : public CXTPTaskPanelVisualStudio2005Theme { protected: void Triangle(CDC* pDC, POINT* pPoints, COLORREF clr, BOOL bFilled); public: /** * @brief * Constructs a CXTPTaskPanelVisualStudio2012Theme object. * @param bLight TRUE to draw light theme, FALSE otherwise. */ CXTPTaskPanelVisualStudio2012Theme(BOOL bLight = TRUE); /** * @brief * Destroys a CXTPTaskPanelVisualStudio2012Theme object, * handles cleanup and deallocation. */ virtual ~CXTPTaskPanelVisualStudio2012Theme(); /** * @brief * Draws the group caption background of a specified group. * @param pDC Pointer to a valid device context. * @param pGroup Pointer to the group to draw the group caption background of. * @param rc Bounding rectangle of the group caption. * @return * The bounding rectangle of the text within the group caption. */ CRect DrawGroupCaptionBackground(CDC* pDC, CXTPTaskPanelGroup* pGroup, CRect rc); /** * @brief * Draws the client face of a specified group. * @param pDC Pointer to a valid device context. * @param pGroup Pointer to the group to draw the client face of. * @param rc Rectangle of the group to draw the client face of. */ void DrawGroupClientFace(CDC* pDC, CXTPTaskPanelGroup* pGroup, CRect rc); /** * @brief * Draws a rectangle around a group item when it is * selected, pressed or highlighted. * @param pDC Pointer to a valid device context. * @param pItem Pointer to the group item. * @param rc Rectangle to be drawn. */ virtual void DrawGroupItemFrame(CDC* pDC, CXTPTaskPanelGroupItem* pItem, CRect rc); /** * @brief * Fills the client face of a specified group. * @param pDC Pointer to a valid device context. * @param pGroup Pointer to the group to fill the client face of. * @param rc Rectangle of the group to fill the client face of. * @see * DrawGroupClientFace */ void FillGroupClientFace(CDC* pDC, CXTPTaskPanelGroup* pGroup, CRect rc); /** * @brief * Fills the background of a specified task panel. * @param pDC Pointer to a valid device context. * @param pTaskPanel Pointer to the task panel to fill. */ void FillTaskPanel(CDC* pDC, CXTPTaskPanel* pTaskPanel); /** * @brief * Draws the text caption of a specified item. * @param pDC Pointer to a valid device context. * @param pItem Pointer to the item to draw the text caption of. * @param rcText Rectangle of the item to draw the text caption of. * @param nFormat Specifies the method of formatting the text. * @details * DrawGroupCaption uses this method to draw the group caption with * nFormat = DT_SINGLELINE | DT_LEFT | DT_END_ELLIPSIS | DT_VCENTER | DT_NOPREFIX * * DrawGroupItemImageWithText and DrawGroupItemImageWithTextBelow both use * this method to draw the group item caption. */ virtual void DrawItemCaption(CDC* pDC, CXTPTaskPanelItem* pItem, CRect rcText, UINT nFormat); /** * @brief * Refreshes the visual metrics of the task panel. */ virtual void RefreshMetrics(); protected: virtual CXTPPaintManagerColor GetTriangleColorAndState(CXTPTaskPanelGroup* pGroup, BOOL& bFilled); virtual CRect DrawExpandButton(CDC* pDC, CXTPTaskPanelGroup* pGroup, CRect rc); protected: CXTPPaintManagerColor m_clrSelectedWithoutFocus; /**< Color of the selected item when the Task Panel does not have focus. */ CXTPPaintManagerColor m_clrText; /**< Normal text color. */ CXTPPaintManagerColor m_clrSelectedText; /**< Text color of the selected item. */ CXTPPaintManagerColor m_clrSelectedTextWithoutFocus; /**< Text color of the selected item when the Task Panel does not have focus. */ CXTPPaintManagerColor m_clrTriangle; CXTPPaintManagerColor m_clrTriangleFocused; CXTPPaintManagerColor m_clrTriangleHot; BOOL m_bLight; }; /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif // XTPTaskPanelVisualStudio2012Theme_h__ /** @endcond */