/** * @file XTPShortcutBarOffice2003Theme.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(__XTPSHORTCUTBAROFFICE2003THEME_H__) # define __XTPSHORTCUTBAROFFICE2003THEME_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * CXTPShortcutBarOffice2003Theme is a CXTPShortcutBarPaintManager * derived class that represents an Office 2003 shortcut bar theme. */ class _XTP_EXT_CLASS CXTPShortcutBarOffice2003Theme : public CXTPShortcutBarPaintManager { public: /** * @brief * Constructs a CXTPShortcutBarOffice2003Theme object. */ CXTPShortcutBarOffice2003Theme(); public: /** * @brief * Fills the client area of the shortcut bar control. * @param pDC Pointer to the client device context. * @param pShortcutBar Pointer to the shortcut bar control. */ virtual void FillShortcutBar(CDC* pDC, CXTPShortcutBar* pShortcutBar); /** * @brief * Draws the frame for the shortcut bar control. * @param pDC Pointer to the client device context. * @param pShortcutBar Pointer to the shortcut bar control. * @details * The frame is the border drawn around the entire shortcut bar. */ void DrawShortcutBarFrame(CDC* pDC, CXTPShortcutBar* pShortcutBar); /** * @brief * Fills a specified item for the shortcut bar control. * @param pDC Pointer to the client device context. * @param pItem Pointer to the CXTPShortcutBarItem object to be filled. */ void FillShortcutItemEntry(CDC* pDC, CXTPShortcutBarItem* pItem); /** * @brief * Draws the gripper for the shortcut bar control. * @param pDC Pointer to the client device context. * @param pShortcutBar Pointer to the shortcut bar control. * @param bDraw TRUE to draw the gripper, FALSE to only * retrieve the size of the gripper. * @return * The size of the gripper (i.e. 7 pixels for Office 2003 theme). */ int DrawGripper(CDC* pDC, CXTPShortcutBar* pShortcutBar, BOOL bDraw); /** * @brief * Draws the caption for a specified shortcut bar pane. * @param pDC Pointer to the client device context. * @param pPane Pointer to the CXTPShortcutBarPane object to be drawn. * @param bDraw TRUE to draw the shortcut bar pane caption, FALSE to only * retrieve the size of the shortcut bar pane caption. * @details * Panes of the shortcut bar are displayed in the shortcut bar's * client area. Each pane consists of a caption and one or more * sub-panes. Each sub-pane has its own caption and is drawn by * the DrawPaneItemCaption method. * * The caption of the shortcut bar pane is the bar on the top the pane. * The caption of the shortcut bar pane is set when the * pane is created by the CXTPShortcutBarPane::Create method. * * The caption of the shortcut bar pane can be retrieved by using * the CXTPShortcutBarPane::GetCaption method. * * Shortcut bar panes have sub-items which also have captions that * are drawn by the DrawPaneItemCaption method. * @return * The size of the shortcut pane caption (i.e. 24 pixels). */ int DrawPaneCaption(CDC* pDC, CXTPShortcutBarPane* pPane, BOOL bDraw); /** * @brief * Draws the caption for a specified shortcut bar pane item. * @param pDC Pointer to the client device context. * @param pItem Pointer to the CXTPShortcutBarPaneItem object to be drawn. * @param bDraw TRUE to draw the shortcut bar pane item caption, FALSE to only * retrieve the size of the shortcut bar pane item caption. * @details * Panes of the shortcut bar are displayed in the shortcut bar's * client area. Each pane consists of a caption and one or more * sub-panes. Each sub-pane has its own caption and is drawn by * the DrawPaneItemCaption method. * * The caption of the shortcut bar pane item is set when the * pane item is created by the CXTPShortcutBarPane::AddItem method. * * The sub-items of a shortcut bar pane can be retrieved by using * the CXTPShortcutBarPane::GetItem method. * @return * The size of the shortcut pane item caption. */ int DrawPaneItemCaption(CDC* pDC, CXTPShortcutBarPaneItem* pItem, BOOL bDraw); /** * @brief * Refreshes the visual metrics of the shortcut bar paint manager. * @details * This method refreshes all of the visual metrics of the shortcut bar * (pane caption color, pane font, pane caption height, etc.). * * If luna colors are enabled, then the shortcut bar will be colored * to match the current system theme if the XTPCurrentSystemTheme is * xtpSystemThemeBlue, xtpSystemThemeSilver, or xtpSystemThemeOlive. */ void RefreshMetrics(); /** * @brief * Draws the image of a shortcut bar item. * @param pDC Pointer to the client device context. * @param pt Location at which to draw the image * within the specified device context. * @param sz Size of the image. * @param pImage Pointer to a CXTPImageManagerIcon object. * @param bSelected TRUE if the shortcut bar item is selected/has focus * (i.e. when the user clicks on the item). * @param bPressed TRUE if the shortcut bar item is currently pressed * (i.e. when the user is clicking on the item). * @param bChecked TRUE if the shortcut bar item is checked * (i.e. toggle buttons). * @param bEnabled TRUE to draw the item as enabled, * FALSE to draw the item as disabled. * @details * The DrawShortcutItem method uses this method to draw shortcut bar images. */ void DrawImage(CDC* pDC, CPoint pt, CSize sz, CXTPImageManagerIcon* pImage, BOOL bSelected, BOOL bPressed, BOOL bChecked, BOOL bEnabled); /** * @brief * Fills a specified navigation item for the minimized shortcut bar control. * @param pDC Pointer to the client device context. * @param pItem Pointer to the CXTPShortcutBarItem object to be filled. */ void FillNavigationItemEntry(CDC* pDC, CXTPShortcutBarItem* pItem); public: CXTPPaintManagerColorGradient m_grcCaption; /**< Caption color. */ CXTPPaintManagerColorGradient m_grcItemCaption; /**< Items color. */ CXTPPaintManagerColorGradient m_grcItemHotCaption; /**< Items color. */ CXTPPaintManagerColor m_clrItemCaptionShadow; /**< Color of sub-caption shadow. */ CXTPPaintManagerColor m_clrItemCaptionTop; /**< Color under sub-caption rectangle. */ CXTPPaintManagerColor m_clrCaptionText; /**< Color of items text. */ CXTPPaintManagerColor m_clrItemCaptionText; /**< Color of sub-caption text. */ BOOL m_bShowTopLeftCaptionShadow; /**< TRUE to draw rectangle around items. */ BOOL m_bLunaColorDisabled; }; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPSHORTCUTBAROFFICE2003THEME_H__) /** @endcond */