/** * @file XTPTabThemeExcel2003.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(__XTPTABTHEMEEXCEL2003_H__) # define __XTPTABTHEMEEXCEL2003_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * CXTPTabThemeExcel2003 implements an Excel tab appearance. * @details * To use the Excel appearance, SetAppearance is used to apply * the xtpTabAppearanceExcel2003 XTPTabAppearanceStyle. * * CXTPTabThemeExcel2003 supports the following XTPTabColorStyle: * xtpTabColorDefault: Default color style. * xtpTabColorVisualStudio2003: Visual Studio color style. * xtpTabColorOffice2003: Office 2003 color style. * @see * XTPTabColorStyle, XTPTabAppearanceStyle, SetAppearance, GetAppearance, * GetAppearanceSet, SetColor, GetColor, GetColorSet, SetColorSet, SetAppearanceSet */ class _XTP_EXT_CLASS CXTPTabThemeExcel2003 : public CXTPTabThemeFlat { public: /** * @brief * Constructs a CXTPTabThemeExcel2003 object. */ CXTPTabThemeExcel2003() { m_rcHeaderMargin.SetRect(2, 3, 2, 0); } /** * @brief * Gets the top, left, right, and bottom margins of the tab header. * @return * The top, left, right, and bottom margins of the tab header. * @details * The margins of the tab header are the space placed around * the tab buttons inside the tab header. * @see * CXTPTabPaintManager::GetHeaderRect */ virtual CRect GetHeaderMargin() { return CRect(m_rcHeaderMargin.left + m_nButtonHeight / 2, m_rcHeaderMargin.top, m_rcHeaderMargin.right + m_nButtonHeight / 2, m_rcHeaderMargin.bottom); } /** * @brief * Draws a single tab button in the tab client header area. * @param pDC Pointer to a valid device context. * @param pItem Pointer to the tab button to draw. * @details * This method is only used to draw the tab button. This method does not * draw the button's icon or text. * * DrawSingleButton calls CXTPTabPaintManager::DrawSingleButtonIconAndText * after the button is drawn to draw the button's icon and text. * @see * CXTPTabPaintManager::DrawTabControlEx, * CXTPTabPaintManager::DrawSingleButtonIconAndText */ virtual void DrawSingleButton(CDC* pDC, CXTPTabManagerItem* pItem); /** * @brief * Retrieves the bounding rectangle of a specified drawing item. * @param pItem Pointer to the drawing item with * the bounding rectangle to retrieve. * @return * The bounding rectangle of the specified drawing item. * @see * CXTPTabManagerItem::GetRect */ virtual CRect GetButtonDrawRect(const CXTPTabManagerItem* pItem); }; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPTABTHEMEEXCEL2003_H__) /** @endcond */