/** * @file XTPTabColorSetVisualStudio2015.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(__XTPTABCOLORSETVISUALSTUDIO2015_H__) # define __XTPTABCOLORSETVISUALSTUDIO2015_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * CXTPTabColorSetVisualStudio2015 implements a Visual Studio 2015 tab color set. */ class _XTP_EXT_CLASS CXTPTabColorSetVisualStudio2015 : public CXTPTabPaintManagerColorSet { public: CXTPTabColorSetVisualStudio2015(); /** * @brief * Refreshes the visual metrics of the tabs. * Override this method to change the colors of the color members. * @details * All of the color members are refreshed when this method is called. */ virtual void RefreshMetrics(); /** * @brief * Retrieves the color of a specified tab. * @param pItem Pointer to the tab with the color to retrieve. * @return * The color of the tab. * @details * This method is used within many of * CXTPTabPaintManagerColorSet's "fill" methods. * @see * CXTPTabManager::GetItemColor, XTPTabColorStyle, * SetColor, GetColorSet, SetColorSet */ virtual COLORREF GetItemColor(CXTPTabManagerItem* pItem); virtual COLORREF GetItemBorderColor(CXTPTabManagerItem* pItem); virtual CRect GetItemBorderRect(CXTPTabManagerItem* pItem); /** * @brief * Sets the text color for the tab. * @param pDC Pointer to a valid device context. * @param pItem Pointer to the tab to set the text color of. */ virtual void SetTextColor(CDC* pDC, CXTPTabManagerItem* pItem); /** * @brief * Obtains client background color. * @param pTabManager Pointer to the tab manager with the tab client area to fill. * @return * Client area background color value. */ virtual COLORREF GetClientColor(CXTPTabManager* pTabManager); /** * @brief * Fills a specified tab button. * @param pDC Pointer to a valid device context. * @param rcItem Bounding rectangle of the tab button to fill. * @param pItem Pointer to the tab button to fill. * @return * The color of the specified tab button. * @details * This method is used to fill all tab buttons except when * XTPTabAppearanceStyle is set to xtpTabAppearanceStateButtons. * xtpTabAppearanceStateButtons requires the FillStateButton member. * @see * FillStateButton */ virtual COLORREF FillPropertyButton(CDC* pDC, CRect rcItem, CXTPTabManagerItem* pItem); /** * @brief * Fills a specified tab naGroupOuterMarginvigation button. * @param pDC Pointer to a valid device context. * @param pButton Pointer to the tab navigation button to fill. * @param rc Reference to the bounding rectangle of the tab navigation button. * @details * This method is used to fill the tab navigation buttons in the header of * the tab client and is overridden by XTPTabColorStyle and * CXTPTabPaintManagerColorSet to perform actions such as painting * the highlighted, pressed, and normal versions of tab navigation buttons. * * This method must be overridden. * @see * CXTPTabManager::GetNavigateButton, CXTPTabManagerNavigateButton */ virtual void FillNavigateButton(CDC* pDC, CXTPTabManagerNavigateButton* pButton, CRect& rc); protected: struct NAVIGATE_BUTTON_COLOR { CXTPPaintManagerColor clrBack; CXTPPaintManagerColor clrBorder; CXTPPaintManagerColor clrText; }; struct NAVIGATE_BUTTON { NAVIGATE_BUTTON_COLOR Normal; NAVIGATE_BUTTON_COLOR Highlighted; NAVIGATE_BUTTON_COLOR Pressed; }; struct TAB_BUTTON { struct State { CXTPPaintManagerColor clrBack; CXTPPaintManagerColor clrBorder; CXTPPaintManagerColor clrText; CRect rcBorder; NAVIGATE_BUTTON Navigate; }; State Normal; State Highlighted; State Selected; }; CXTPPaintManagerColor m_clrActiveClientBack; CXTPPaintManagerColor m_clrInactiveClientBack; NAVIGATE_BUTTON m_NavigationButton; TAB_BUTTON m_ActiveTabButton; TAB_BUTTON m_InactiveTabButton; void FillNavigateButton(CDC* pDC, CXTPTabManagerNavigateButton* pButton, CRect& rc, NAVIGATE_BUTTON_COLOR clr); }; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPTABCOLORSETVISUALSTUDIO2015_H__) /** @endcond */