/** * @file XTPFrameThemeOffice2007.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(__XTPRIBBONOFFICE2007FRAMETHEME_H__) # define __XTPRIBBONOFFICE2007FRAMETHEME_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPPaintManager; class CXTPCommandBarsFrameHook; class CXTPRibbonBar; class _XTP_EXT_CLASS CXTPRibbonOffice2007FrameTheme : public CXTPFramePaintManager { // Construction / Destruction public: CXTPRibbonOffice2007FrameTheme(CXTPPaintManager* pPaintManager); virtual ~CXTPRibbonOffice2007FrameTheme(); // Frame border public: virtual CRect CalcFrameBorder(const CXTPCommandBarsFrameHook* pFrameHook) const; virtual HRGN CalcFrameRegion(CXTPCommandBarsFrameHook* pFrameHook, CSize sz) const; // Frame caption public: /** * @brief * This method is called to draw the frame if Ribbon was found. * * @param pDC Pointer to device context. * @param pFrameHook CXTPCommandBarsFrameHook hook object. */ virtual void DrawFrame(CDC* pDC, CXTPCommandBarsFrameHook* pFrameHook); /** * @brief * This method is called to draw the 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. */ virtual void DrawFrameCaptionButton(CDC* pDC, CRect rc, int nId, BOOL bSelected, BOOL bPressed, BOOL bActive); /** * @brief * This method is called to draw the 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 draw the frame caption text. * * @param pDC Pointer to device context. * @param rcCaptionText Bounding rectangle of window text. * @param pSite Frame to draw. * @param bActive TRUE if the frame is active. */ virtual void DrawCaptionText(CDC* pDC, CRect rcCaptionText, CWnd* pSite, BOOL bActive); /** * @brief * This method is called to draw the frame caption text. * * @param pDC Pointer to device context. * @param rcCaptionText Bounding rectangle of window text. * @param pSite Frame to draw. * @param bActive TRUE if the frame is active. * @param pRibbonBar Ribbon bar pointer. */ virtual void DrawCaptionText(CDC* pDC, CRect rcCaptionText, CWnd* pSite, BOOL bActive, CXTPRibbonBar* pRibbonBar); /** * @brief * This method is called to refresh the visual metrics of the manager. */ virtual void RefreshMetrics(); protected: COLORREF m_clrFrameBorderActive0; /**< Border color */ COLORREF m_clrFrameBorderActive1; /**< Border color */ COLORREF m_clrFrameBorderActive2; /**< Border color */ COLORREF m_clrFrameBorderActive3; /**< Border color */ COLORREF m_clrFrameBorderInactive0; /**< Border color */ COLORREF m_clrFrameBorderInactive1; /**< Border color */ COLORREF m_clrFrameBorderInactive2; /**< Border color */ COLORREF m_clrFrameBorderInactive3; /**< Border color */ }; /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif // !defined(__XTPRIBBONOFFICE2007FRAMETHEME_H__) /** @endcond */