/** * @file XTPTabThemeVisio.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(__XTPTABTHEMEVISIO_H__) # define __XTPTABTHEMEVISIO_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * CAppearanceSetVisio implements a Visio tab appearance. * @details * To use the Visio appearance, SetAppearance is used to apply * the xtpTabAppearanceVisio XTPTabAppearanceStyle. * * CAppearanceSetVisio supports the following XTPTabColorStyle: * xtpTabColorDefault: Default color style. * xtpTabColorOffice2003: Office 2003 color style. * @see * XTPTabColorStyle, XTPTabAppearanceStyle, SetAppearance, GetAppearance, * GetAppearanceSet, SetColor, GetColor, GetColorSet, SetColorSet, SetAppearanceSet */ class _XTP_EXT_CLASS CAppearanceSetVisio : public CXTPTabPaintManagerTheme { public: /** * @brief * Adjusts the tab client rectangle. * @param pTabManager Pointer to the tab manager to adjust the tab client rectangle. * @param rcClient [out] Reference to a CRect object to receive * the new tab client rectangle with margins included. * @details * Both CXTPTabPaintManager::AdjustClientRect and * CXTPTabPaintManager::RepositionTabControl are called when the * window is resized. When CXTPTabPaintManager::DrawTabControl * is called, the changes will be used when drawing the tab control. * * This method will adjust the tab client rectangle based on * the currently set XTPTabClientFrame. * * CXTPTabPaintManager::AdjustClientRect calls this method if * there is one or more tabs in the tab manager. * @see * CXTPTabPaintManager::AdjustClientRect */ void AdjustClientRect(CXTPTabManager* pTabManager, CRect& rcClient); /** * @brief * Moves the tab buttons of the tab control to their correct positions. * @param pTabManager Pointer to the tab manager that the tab buttons are on. * @param pDC Pointer to a valid device context. * @param rcClient Bounding rectangle of the tab client area. * @details * Both CXTPTabPaintManager::AdjustClientRect and * CXTPTabPaintManager::RepositionTabControl are called when the * window is resized. When CXTPTabPaintManager::DrawTabControl * is called, the changes will be used when drawing the tab control. * * This method is called during CXTPTabPaintManager::RepositionTabControl. */ void RepositionTabControl(CXTPTabManager* pTabManager, CDC* pDC, CRect rcClient); /** * @brief * Gets the bounding rectangle of the tab header area. * @param rcControl Bounding rectangle of the tab header. * See CXTPTabManager::GetControlRect. * @param pTabManager Pointer to a CXTPTabManager object. * @return * The bounding rectangle of the tab header area. * @see * GetClientRect, CXTPTabManager::GetControlRect, * CXTPTabManager::CXTPTabPaintManagerTheme::GetHeaderMargin, * CXTPTabManager::CXTPTabPaintManagerTheme::GetClientMargin */ CRect GetHeaderRect(CRect rcControl, CXTPTabManager* pTabManager); /** * @brief * Gets the bounding rectangle of the tab client area. * @param rcControl Bounding rectangle of the tab control. * @param pTabManager Pointer to a CXTPTabManager object. * @return * The bounding rectangle of the tab client area. * @see * GetClientRect, CXTPTabManager::GetControlRect */ CRect GetClientRect(CRect rcControl, CXTPTabManager* pTabManager); /** * @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 */ void DrawSingleButton(CDC* pDC, CXTPTabManagerItem* pItem); /** * @brief * Draws the tab control. * @param pTabManager Pointer to the tab manager to draw. * @param pDC Pointer to a valid device context. * @param rcControl Bounding rectangle of the client area. * @details * This method is called during various Draw and Paint functions. * * This method is called by CXTPTabPaintManager::DrawTabControl * when the tab control must be drawn. */ void DrawTabControl(CXTPTabManager* pTabManager, CDC* pDC, CRect rcControl); }; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPTABTHEMEVISIO_H__) /** @endcond */