/** * @file XTPShortcutBarOffice2013Theme.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(__XTPSHORTCUTBAROFFICE2013THEME_H__) # define __XTPSHORTCUTBAROFFICE2013THEME_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * CXTPShortcutBarOffice2013Theme is a CXTPShortcutBarResourceTheme * derived class that represents an Office 2013 shortcut bar theme. */ class _XTP_EXT_CLASS CXTPShortcutBarOffice2013Theme : public CXTPShortcutBarResourceTheme { public: /** * @brief * Constructs a CXTPShortcutBarOffice2013Theme object. */ CXTPShortcutBarOffice2013Theme(); /** * @brief * Destroys a CXTPShortcutBarOffice2013Theme object, * handles cleanup and deallocation. */ virtual ~CXTPShortcutBarOffice2013Theme(); /** * @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.). */ virtual void RefreshMetrics(); /** * @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. */ virtual int DrawPaneItemCaption(CDC* pDC, CXTPShortcutBarPaneItem* pItem, BOOL bDraw); /** * @brief * Draws the expand button. * @param pDC Pointer to the client device context. * @param rc Client rectangle of the expand button. */ virtual void DrawExpandButton(CDC* pDC, CRect rc); virtual void DrawPaneCaptionMinimizeButton(CDC* pDC, CXTPShortcutBarPane* pPane); /** * @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 2013 theme). */ virtual int DrawGripper(CDC* pDC, CXTPShortcutBar* pShortcutBar, BOOL bDraw); /** * @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 * 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. */ virtual void FillNavigationItemEntry(CDC* pDC, CXTPShortcutBarItem* pItem); virtual void FillPopupBack(CDC* pDC, CRect rc, CSize szGap); /** * @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); protected: CXTPPaintManagerColor m_clrBack; CXTPPaintManagerColor m_clrBackHilite; CXTPPaintManagerColor m_clrBackPushed; CXTPPaintManagerColor m_clrBackPushedDark; CXTPPaintManagerColor m_clrBackSelected; CXTPPaintManagerColor m_clrGlyph; /**< Normal glyph color. */ CXTPPaintManagerColor m_clrGlyphFill; /**< Expanded glyph fill color. */ CXTPPaintManagerColor m_clrGlyphExpanded; /**< Expanded glyph border color. */ CXTPPaintManagerColor m_clrGlyphPushed; /**< Pushed glyph color. */ }; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPSHORTCUTBAROFFICE2013THEME_H__) /** @endcond */