/** * @file XTPFrameThemeOffice2007System.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(__XTPRIBBONOFFICE2007SYSTEMFRAMETHEME_H__) # define __XTPRIBBONOFFICE2007SYSTEMFRAMETHEME_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPMarkupThemePart; class CXTPRibbonBar; /** * @brief * The CXTPFrameThemeOffice2007System class is used to enable a system style * theme for Command Bars. * * @see * CXTPPaintManager::SetTheme */ class _XTP_EXT_CLASS CXTPFrameThemeOffice2007System : public CXTPRibbonMarkupFrameTheme { /** * Construction / Destruction */ public: /** * @brief * Constructs a CXTPFrameThemeOffice2007System object. * * @param pPaintManager Reference to a CXTPPaintManager object. */ CXTPFrameThemeOffice2007System(CXTPPaintManager* pPaintManager); /** * @brief * Destroys a CXTPFrameThemeOffice2007System object, handles cleanup and * deallocation. */ virtual ~CXTPFrameThemeOffice2007System(); // Frame border public: virtual HRGN CalcFrameRegion(CXTPCommandBarsFrameHook* pFrameHook, CSize sz) const; virtual CRect CalcFrameBorder(const CXTPCommandBarsFrameHook* pFrameHook) const; public: virtual CXTPMarkupThemePart* GetFrameBorder(int nId, BOOL bActive); /** * @brief * This method is called to draw the frame caption bar. * * @param pDC Pointer to device context. * @param rcCaptionBar Caption bar rectangle. * @param pSite Frame to draw. * @param bActive TRUE if the frame is active. */ virtual void DrawCaptionBar(CDC* pDC, CRect rcCaptionBar, CWnd* pSite, BOOL bActive); /** * @brief * This method is called to draw caption button. * * @param pDC Pointer to device context. * @param rc Bounding rectangle of the button. * @param nId Identifier of the button. * @param bSelected TRUE if the button is highlighted. * @param bPressed TRUE if the button is pressed. * @param bActive TRUE if the frame is active. */ void DrawFrameCaptionButton(CDC* pDC, CRect rc, int nId, BOOL bSelected, BOOL bPressed, BOOL bActive); /** * @brief * This method is called to draw caption button. * * @param pDC Pointer to device context. * @param rc Bounding rectangle of the button. * @param nId Identifier of the button. * @param bSelected TRUE if the button is highlighted. * @param bPressed TRUE if the button is pressed. * @param bActive TRUE if the frame is active. * @param pRibbonBar Ribbon bar pointer. */ virtual void DrawFrameCaptionButton(CDC* pDC, CRect rc, int nId, BOOL bSelected, BOOL bPressed, BOOL bActive, CXTPRibbonBar* pRibbonBar); /** * @brief * This method is called to refresh the visual metrics of the manager. */ virtual void RefreshMetrics(); /** * @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); /** * @brief * Loads markup parts. * * @param bReload Re-loads previously loaded parts if TRUE. */ virtual void LoadParts(BOOL bReload = FALSE); protected: /** @cond */ _XTP_DEPRECATED_IN_FAVOR(LoadParts) BOOL LoadResource(); _XTP_DEPRECATED_IN_FAVOR(CXTPRibbonMarkupFrameTheme::m_bMarkupPartsLoaded) BOOL m_bLoaded; /** @endcond */ using CXTPRibbonMarkupFrameTheme::m_bMarkupPartsLoaded; CXTPMarkupThemePart* m_pCaptionActive; CXTPMarkupThemePart* m_pCaptionInactive; CXTPMarkupThemePart* m_pBorderLeftActive; CXTPMarkupThemePart* m_pBorderLeftInactive; CXTPMarkupThemePart* m_pBorderLeftCaptionActive; CXTPMarkupThemePart* m_pBorderLeftCaptionInactive; CXTPMarkupThemePart* m_pBorderTopActive; CXTPMarkupThemePart* m_pBorderTopInactive; CXTPMarkupThemePart* m_pBorderRightActive; CXTPMarkupThemePart* m_pBorderRightInactive; CXTPMarkupThemePart* m_pBorderRightCaptionActive; CXTPMarkupThemePart* m_pBorderRightCaptionInactive; CXTPMarkupThemePart* m_pBorderBottomActive; CXTPMarkupThemePart* m_pBorderBottomInactive; CXTPMarkupThemePart* m_pCaptionButtonSelected; CXTPMarkupThemePart* m_pCaptionButtonPressed; CXTPMarkupThemePart* m_pGlyphMinimize9; CXTPMarkupThemePart* m_pGlyphMinimize11; CXTPMarkupThemePart* m_pGlyphMaximize9; CXTPMarkupThemePart* m_pGlyphMaximize11; CXTPMarkupThemePart* m_pGlyphRestore9; CXTPMarkupThemePart* m_pGlyphRestore11; CXTPMarkupThemePart* m_pGlyphClose9; CXTPMarkupThemePart* m_pGlyphClose11; CXTPMarkupContext* m_pMarkupContext; /**< Store pointer to CXTPMarkupContext object.*/ }; /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif // !defined(__XTPRIBBONOFFICE2007SYSTEMFRAMETHEME_H__) /** @endcond */