/** * @file XTPShortcutBarResourceTheme.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(__XTPSHORTCUTBARRESOURCETHEME_H__) # define __XTPSHORTCUTBARRESOURCETHEME_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * CXTPShortcutBarResourceTheme is a CXTPShortcutBarOffice2003Theme * derived class that represents the Office 2007, 2010 and 2012 shortcut bar themes. */ class _XTP_EXT_CLASS CXTPShortcutBarResourceTheme : public CXTPShortcutBarOffice2003Theme { public: /** * @brief * Constructs a CXTPShortcutBarResourceTheme object. */ CXTPShortcutBarResourceTheme(); public: /** * @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 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 flat style, 9 pixels otherwise). */ 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 the client area of the shortcut bar control. * @param pDC Pointer to the client device context. * @param pShortcutBar Pointer to the shortcut bar control. */ void FillShortcutBar(CDC* pDC, CXTPShortcutBar* pShortcutBar); /** * @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 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). */ virtual int DrawPaneCaption(CDC* pDC, CXTPShortcutBarPane* pPane, 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); /** * @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 DrawPaneCaptionMinimizeButton(CDC* pDC, CXTPShortcutBarPane* pPane); public: BOOL m_bFlatStyle; }; typedef CXTPShortcutBarResourceTheme CXTPShortcutBarOffice2007Theme; typedef CXTPShortcutBarResourceTheme CXTPShortcutBarOffice2010Theme; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPSHORTCUTBARRESOURCETHEME_H__) /** @endcond */