/** * @file XTPRibbonMarkupFrameTheme.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(__XTPRIBBONMARKUPFRAMETHEME_H__) # define __XTPRIBBONMARKUPFRAMETHEME_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPMarkupThemePart; /** * @brief * The CXTPRibbonMarkupFrameTheme class is used to enable a * system style theme for Command Bars. * @see * CXTPPaintManager::SetTheme */ class _XTP_EXT_CLASS CXTPRibbonMarkupFrameTheme : public CXTPFramePaintManager { DECLARE_DYNAMIC(CXTPRibbonMarkupFrameTheme); protected: /** * @brief * Defines border parts. */ enum XTPBorderPart { xtpBorderPartTop, /**< Specifies a top border part. */ xtpBorderPartLeft, /**< Specifies a left border part. */ xtpBorderPartLeftCaption, /**< Specifies a left caption border part. */ xtpBorderPartRight, /**< Specifies a right border part. */ xtpBorderPartRightCaption, /**< Specifies a right caption border part. */ xtpBorderPartBottom, /**< Specifies a bottom border part. */ xtpBorderPartCount /**< The number of border parts. */ }; public: /** * @brief * Constructs a CXTPRibbonMarkupFrameTheme object. * @param pPaintManager Pointer to a CXTPPaintManager object. */ CXTPRibbonMarkupFrameTheme(CXTPPaintManager* pPaintManager); /** * @brief * Destroys a CXTPRibbonMarkupFrameTheme object, handles cleanup and * deallocation. */ virtual ~CXTPRibbonMarkupFrameTheme(); public: /** * @brief * This method is called to draw the frame if the Ribbon was found. * @param pDC Pointer to a valid device context. * @param pFrameHook Pointer to a CXTPCommandBarsFrameHook hook object. */ virtual void DrawFrame(CDC* pDC, CXTPCommandBarsFrameHook* pFrameHook); /** * @brief * This method is called to draw the frame border. * @param pDC Pointer to a valid device context. * @param pFrameHook Pointer to a CXTPCommandBarsFrameHook hook object. */ virtual void DrawFrameBorder(CDC* pDC, CXTPCommandBarsFrameHook* pFrameHook); /** * @brief * Re-loads markup parts from the specified ZIP source. * @param hZip ZIP source to load markup parts from. * @param pMarkupContext Associated markup context. */ void ReloadMarkupParts(HZIP hZip, CXTPMarkupContext* pMarkupContext); protected: /** * @brief * This method is called to get the frame border part. * @param nId Identifier of the frame border; can be one of the values defined * by the CXTPRibbonMarkupFrameTheme::XTPBorderPart enumeration. * @param bActive TRUE if the frame border is active. * @return Gets the frame border part */ virtual CXTPMarkupThemePart* GetFrameBorder(int nId, BOOL bActive) = 0; /** * @brief * Loads markup parts from the specified ZIP source. * @param hZip ZIP source to load markup parts from. * @param pMarkupContext Associated markup context. */ virtual void LoadParts(HZIP hZip, CXTPMarkupContext* pMarkupContext) = 0; /** * @brief * Loads markup parts. * @param bReload Re-loads previously loaded parts if TRUE. */ virtual void LoadParts(BOOL bReload = FALSE) = 0; protected: BOOL m_bMarkupPartsLoaded; /**< TRUE if markup parts have been loaded. */ }; # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPRIBBONMARKUPFRAMETHEME_H__) /** @endcond */