/** * @file XTPShortcutBarOffice2000Theme.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(__XTPSHORTCUTBAROFFICE2000THEME_H__) # define __XTPSHORTCUTBAROFFICE2000THEME_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * CXTPShortcutBarOffice2000Theme is a CXTPShortcutBarPaintManager * derived class that represents an Office 2000 shortcut bar theme. */ class _XTP_EXT_CLASS CXTPShortcutBarOffice2000Theme : public CXTPShortcutBarPaintManager { 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. */ 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. 5 pixels for Office 2000 theme). */ int DrawGripper(CDC* pDC, CXTPShortcutBar* pShortcutBar, BOOL bDraw); /** * @brief * Draws the rectangle to be used to draw the shortcut bar items. * @param pDC Pointer to a valid device context. * @param rc Specifies the rectangle in logical units. * @param nPen Specifies the color used to paint the rectangle. * @param nBrush Specifies the color used to fill the rectangle. * @details * Rectangle is used to draw the rectangle of the shortcut bar items * in the Office XP theme. This will draw the normal, pressed, and * hot versions of the items. */ void Rectangle(CDC* pDC, CRect rc, int nPen, int nBrush); /** * @brief * Draws the "gripper" lines in the gripper. * @param pDC Pointer to the client device context. * @param x0 Specifies the logical x- coordinate of the start position of the line. * @param y0 Specifies the logical y- coordinate of the start position of the line. * @param x1 Specifies the logical x- coordinate of the end position of the line. * @param y1 Specifies the logical y- coordinate of the end position of the line. * @param nPen Specifies the color used to paint the line. */ void Line(CDC* pDC, int x0, int y0, int x1, int y1, int nPen); /** * @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); }; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPSHORTCUTBAROFFICE2000THEME_H__) /** @endcond */