/** * @file XTPDockingPaneThemeVisualStudio2012.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(__XTPDOCKINGPANETHEMEVISUALSTUDIO2012_H__) # define __XTPDOCKINGPANETHEMEVISUALSTUDIO2012_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" class CXTPResourceImages; /** * @brief * CXTPDockingPaneVisualStudio2012Theme is used to define drawing routines * specific to a Visual Studio 2012 docking pane theme. */ class _XTP_EXT_CLASS CXTPDockingPaneVisualStudio2012Theme : public CXTPDockingPaneDefaultTheme { public: /** * @brief * Constructs a CXTPDockingPaneVisualStudio2012Theme object. */ CXTPDockingPaneVisualStudio2012Theme(); /** * @brief * Destroys a CXTPDockingPaneVisualStudio2012Theme object, handles * cleanup and deallocation. */ virtual ~CXTPDockingPaneVisualStudio2012Theme(); /** * @brief * This member function is used to initialize default colors * for a theme from an .INI resource. */ virtual void RefreshMetrics(); /** * @brief * Call this method to get the pane's caption rectangle. * @param pPane Side panel container to get caption CRect. * @return * Bounding rectangle of the side panel's caption. */ virtual CRect GetPaneCaptionRect(const CXTPDockingPaneSidePanel* pPane); /** * @brief * Override this member to change the client rectangle of the * child docking pane. * @param pPane Pointer to the tabbed container or side panel. * @param rc Client rectangle to be changed. * @param bApply TRUE to update tabs inside the client area. */ virtual void AdjustClientRect(CXTPDockingPaneTabbedContainer* pPane, CRect& rc, BOOL bApply); # if _MSC_VER > 1200 using CXTPDockingPanePaintManager::AdjustClientRect; # endif /** * @brief * Override this member to change the caption rectangle of the * child docking pane. * @param pPane Pointer to a CXTPDockingPaneTabbedContainer object * or CXTPDockingPaneSidePanel object. * @param rc Caption rectangle to be changed. */ virtual void AdjustCaptionRect(const CXTPDockingPaneTabbedContainer* pPane, CRect& rc); # if _MSC_VER > 1200 using CXTPDockingPanePaintManager::AdjustCaptionRect; # endif /** * @brief * Override this method to draw a splitter. * @param pDC Pointer to a valid device context. * @param pSplitter Pointer to a splitter window. */ virtual void DrawSplitter(CDC* pDC, CXTPDockingPaneSplitterWnd* pSplitter); /** * @brief * Override this member function to draw a caption. * @param pDC Reference to the device context in which to draw. * @param pPane Pointer to the tabbed container. * @param rc Client rectangle of the tabbed container. */ virtual void DrawCaption(CDC* pDC, CXTPDockingPaneTabbedContainer* pPane, CRect rc); /** * @brief * Call this method to draw the frame of a floating window. * @param pDC Pointer to a valid device context. * @param pPane Floating window pointer. * @param rc Client rectangle of the floating frame. */ virtual void DrawFloatingFrame(CDC* pDC, CXTPDockingPaneMiniWnd* pPane, CRect rc); /** * @brief * Override this member function to draw a tabbed container. * @param pDC Reference to the device context in which to draw. * @param pPane Pointer to the tabbed container. * @param rc Client rectangle of the tabbed container. */ virtual void DrawPane(CDC* pDC, CXTPDockingPaneTabbedContainer* pPane, CRect rc); /** * @brief * Override this member function to draw the side panel. * @param pDC Reference to the device context in which to draw. * @param pPane Pointer to the side panel. * @param rc Client rectangle of the side panel. */ virtual void DrawSidePanel(CDC* pDC, CXTPDockingPaneSidePanel* pPane, CRect rc); /** * @brief * Override this member function to draw a button for a tabbed caption. * @param pDC Pointer to a valid device context. * @param pButton Pointer to the button to draw. * @param clrButton Color of the button's text. */ virtual void DrawCaptionButton(CDC* pDC, CXTPDockingPaneCaptionButton* pButton, COLORREF clrButton); /** * @brief * This method is called by the framework to draw the docking pane * auto-hide panel background and splitter. * @param pDC Pointer to the auto-hide panes device context. * @param rc Size of the area to draw. * @param direction Docking direction (either xtpPaneDockLeft, xtpPaneDockRight, * xtpPaneDockTop or xtpPaneDockBottom). */ virtual void DrawAutoHidePanel(CDC* pDC, CRect rc, XTPDockingPaneDirection direction); protected: /** * @brief * This member function is called to draw a title bar for the * docking pane. * @param pDC Pointer to a valid device context. * @param pPane Pointer to a valid CXTPDockingPaneBase object. * @param rc Size of the title bar to draw. * @param bVertical TRUE if the title bar should be drawn vertically. */ virtual void DrawTitleBar(CDC* pDC, CXTPDockingPaneBase* pPane, CRect rc, BOOL bVertical); /** * @brief * This member function is called to draw a gripper for the * docking pane. * @param pDC Pointer to a valid device context. * @param rcGripper Size of the gripper to draw. * @param clr Specifies the color of the gripper. * @param bVertical TRUE it the gripper should be drawn vertically. */ void DrawGripper(CDC* pDC, CRect rcGripper, COLORREF clr, BOOL bVertical); /** * @brief * This member function is called to draw a dotted line. * @param pDC Pointer to a valid device context. * @param x Specifies the left position of the dotted line. * @param y Specifies the top position of the dotted line. * @param nSize Specifies the length of the dotted line. * @param clr Specifies the color of the dotted line. * @param bVertical TRUE if the line should be drawn vertically. */ void DrawDottedLine(CDC* pDC, int x, int y, int nSize, COLORREF clr, BOOL bVertical); /** * @brief * Call this member function to retrieve the active or inactive color * set for the Docking Pane using the state specified by bActive. * @param bActive TRUE to retrieve the active color set, * FALSE to retrieve the inactive color set. * @return * A reference to a CXTPDockingPaneColorSet object representing * the docking pane state specified by bActive. */ virtual CXTPDockingPaneColorSet* GetColorSet(BOOL bActive); /** * @brief * Called to initialize the active and inactive colors sets for * the docking pane theme. * @param pcsActive Pointer to a CXTPDockingPaneColorSet representing * the active pane color set. * @param pcsInactive Pointer to a CXTPDockingPaneColorSet representing * the inactive pane color set. */ void SetPaneColorSets(CXTPDockingPaneColorSet* pcsActive, CXTPDockingPaneColorSet* pcsInactive); /** * @brief * Called to free the memory allocated for the docking pane * active and inactive color sets. */ void DeletePaneColorSets(); CXTPDockingPaneColorSet* m_pcsActive; /**< Active state docking pane colors. */ CXTPDockingPaneColorSet* m_pcsInactive; /**< Inactive state docking pane colors. */ CString m_strFontFace; /**< Font face name. */ int m_nFontSize; /**< Font size in points. */ }; AFX_INLINE CXTPDockingPaneColorSet* CXTPDockingPaneVisualStudio2012Theme::GetColorSet(BOOL bActive) { return bActive ? m_pcsActive : m_pcsInactive; } # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPDOCKINGPANETHEMEVISUALSTUDIO2012_H__) /** @endcond */