/** * @file XTPTabColorSetOffice2003.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(__XTPTABCOLORSETOFFICE2003_H__) # define __XTPTABCOLORSETOFFICE2003_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * CXTPTabColorSetOffice2003 implements an Office 2003 tab color set. * @details * To use the Office 2003 color set, SetColor is used to apply * the xtpTabColorOffice2003 XTPTabColorStyle. * @see * XTPTabColorStyle, XTPTabAppearanceStyle, SetAppearance, GetAppearance, * GetAppearanceSet, SetColor, GetColor, GetColorSet, SetColorSet, SetAppearanceSet */ class _XTP_EXT_CLASS CXTPTabColorSetOffice2003 : public CXTPTabColorSetDefault { public: /** * @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. * A different color set will be used for each luna color if used. */ virtual void RefreshMetrics(); /** * @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. * * Tab buttons use CXTPTabPaintManagerColorSet::GradientFill to * fill themselves. The gradient will use the color of the tab item * blended with RGB(255, 255, 255) to produce a "light color". * The gradient will start with the "light color" and fill to the * normal color of the tab item. * @see * FillStateButton */ virtual COLORREF FillPropertyButton(CDC* pDC, CRect rcItem, CXTPTabManagerItem* pItem); /** * @brief * Fills a specified tab navigation 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. * @see * CXTPTabManager::GetNavigateButton, CXTPTabManagerNavigateButton, Rectangle */ virtual void FillNavigateButton(CDC* pDC, CXTPTabManagerNavigateButton* pButton, CRect& rc); /** * @brief * Draws a rectangle with a border. * @param pDC Pointer to a valid device context. * @param rc Specifies the rectangle in logical units. * @param nPen Specifies the color used to paint the rectangle. * @param nBrush Specifies the color used to fill the rectangle. * @details * This method is called by FillNavigateButton to fill the * tab navigation buttons when luna colors are disabled. * @see * FillNavigateButton */ void Rectangle(CDC* pDC, CRect rc, int nPen, int nBrush); protected: CXTPPaintManagerColor m_clrNavigateButtonBorder; /**< Border color of tab navigation buttons on mouse over. */ BOOL m_bLunaTheme; /**< TRUE if the current system theme is xtpSystemThemeSilver, xtpSystemThemeOlive or xtpSystemThemeOlive, otherwise FALSE. */ }; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPTABCOLORSETOFFICE2003_H__) /** @endcond */