/**
* @file XTPTabColorSetVisualStudio2010.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(__XTPTABCOLORSETVISUALSTUDIO2010_H__)
# define __XTPTABCOLORSETVISUALSTUDIO2010_H__
/** @endcond */
# if _MSC_VER > 1000
# pragma once
# endif // _MSC_VER > 1000
# include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h"
/**
* @brief
* CXTPTabColorSetVisualStudio2010 implements a Visual Studio 2010 tab color set.
* @details
* To use the Visual Studio 2010 color set, SetColor is used to apply
* the xtpTabColorVisualStudio2010 XTPTabColorStyle.
*
* The following appearances (XTPTabAppearanceStyle) support CColorSetVisualStudio2010:
* xtpTabAppearancePropertyPage2003: Office 2003 appearance.
* xtpTabAppearanceStateButtons: State Button appearance.
* @see
* XTPTabColorStyle, XTPTabAppearanceStyle, SetAppearance, GetAppearance,
* GetAppearanceSet, SetColor, GetColor, GetColorSet, SetColorSet, SetAppearanceSet
*/
class _XTP_EXT_CLASS CXTPTabColorSetVisualStudio2010 : public CXTPTabColorSetVisualStudio2008
{
public:
/**
* @brief
* Constructs a CXTPTabColorSetVisualStudio2010 object.
* @param bPaneColor TRUE if color represents a pane color, FALSE otherwise.
*/
CXTPTabColorSetVisualStudio2010(BOOL bPaneColor = FALSE);
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.
*/
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.
* @see
* m_bGradientButton
*/
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.
*
* This method must be overridden.
* @see
* CXTPTabManager::GetNavigateButton, CXTPTabManagerNavigateButton
*/
void FillNavigateButton(CDC* pDC, CXTPTabManagerNavigateButton* pButton, CRect& rc);
/**
* @brief
* Sets the text color for a specified tab.
* @param pDC Pointer to a valid device context.
* @param pItem Pointer to the tab with the text color to be set.
*/
void SetTextColor(CDC* pDC, CXTPTabManagerItem* pItem);
/**
* @brief
* Fills the header of the tab client of a specified tab manager.
* @param pDC Pointer to a valid device context.
* @param rc Bounding rectangle of the tab header.
* @param pTabManager Pointer to the tab manager with the header to fill.
* @details
* The tab client header is the bounding rectangle containing the tab buttons.
* The bounding rectangle can be retrieved by using the
* CXTPTabPaintManagerTheme::GetHeaderRect and
* CXTPTabManager::GetHeaderRect methods.
* @see
* CXTPTabPaintManagerTheme::GetHeaderRect, CXTPTabManager::GetHeaderRect
*/
virtual void FillHeader(CDC* pDC, CRect rc, CXTPTabManager* pTabManager);
protected:
BOOL m_bGradientButton; /**< TRUE if luna colors are enabled. This will be TRUE when using
Windows XP and the current system theme is xtpSystemThemeSilver,
xtpSystemThemeOlive or xtpSystemThemeOlive, otherwise FALSE. */
BOOL m_bPaneColor;
CXTPBrush m_xtpBrushHeader;
XTP_SUBSTITUTE_GDI_MEMBER_WITH_CACHED(CBrush, m_brushHeader, m_xtpBrushHeader,
GetHeaderBrushHandle);
};
# define CColorSetVisualStudio2010 CXTPTabColorSetVisualStudio2010
# include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h"
/** @cond */
#endif // !defined(__XTPTABCOLORSETVISUALSTUDIO2010_H__)
/** @endcond */