/** * @file XTPControlTabWorkspace.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(__XTPCONTROLTABWORKSPACE_H__) # define __XTPCONTROLTABWORKSPACE_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * TabWorkspace control. */ class _XTP_EXT_CLASS CXTPControlTabWorkspace : public CXTPControlButton , public CXTPTabClientWnd::CWorkspace { /** @cond */ DECLARE_XTP_CONTROL(CXTPControlTabWorkspace) /** @endcond */ public: /** * @brief * Constructs a CXTPControlTabWorkspace object. */ CXTPControlTabWorkspace(); /** * @brief * Destroys a CXTPControlTabWorkspace object, handles cleanup and * deallocation. */ ~CXTPControlTabWorkspace(); public: /** * @brief * This member is called when the visual properties of the tabs are * changed. For example, color, mouse-over, and on-click. This * member must be overridden in derived classes. * @param lpRect The rectangular area of the window that is invalid. * @param bAnimate TRUE to animate changes in the bounding rectangle. */ virtual void RedrawControl(LPCRECT lpRect, BOOL bAnimate); /** * @brief * This method is called to get the window handle of the workspace. * @return * The window handle of the workspace. */ virtual CWnd* GetWindow() const; /** * @brief * Retrieves the paint manager. * @return * A pointer to a CXTPTabPaintManager object. */ CXTPTabPaintManager* GetPaintManager() const; /** * @brief * This method is called to recalculate the layout of the tab client. */ virtual void OnRecalcLayout(); /** * @brief * Call this member to get the current position of the tabs. * @return * Current XTPTabPosition of the tabs. * @details * The position refers to where the tabs are located in relation * to the TabClient. The tabs can be positioned on the top, * bottom, left, or right side of the TabClient. */ XTPTabPosition GetPosition() const; /** * @brief * This method is called when an item is removed from the TabManager * collection. */ virtual void OnRemoved(); protected: /** * @brief * This member is called to set the bounding rectangle of the * tab control. * @param rcControl Bounding rectangle of the tab control. */ virtual void SetRect(CRect rcControl); /** * @brief * Call this member to draw the tab workspace. * @param pDC Pointer to a valid device context. */ virtual void Draw(CDC* pDC); /** * @brief * Call this member to retrieve the size of the tab workspace. * @param pDC Pointer to a valid device context. * @return * A CSize object containing the size of the tab workspace. */ virtual CSize GetSize(CDC* pDC); /** * @brief * The framework calls this member function to determine whether * a point is in the bounding rectangle of the specified tool. * @param point Specifies the x- and y- coordinates of the cursor. These * coordinates are always relative to the upper-left * corner of the window. * @param pTI A pointer to a TOOLINFO structure. * @return * If the tooltip control was found, then the window control ID is returned. * If the tooltip control was not found, then a value of -1 is returned. */ virtual INT_PTR OnToolHitTest(CPoint point, TOOLINFO* pTI) const; /** * @brief * This method is called when the user clicks the control. * @param bKeyboard TRUE if the control is selected using the keyboard. * @param pt Mouse cursor position. */ virtual void OnClick(BOOL bKeyboard = FALSE, CPoint pt = CPoint(0, 0)); /** * @brief * This member is called when the mouse cursor moves. * @param point Specifies the x- and y- coordinates of the cursor. */ void OnMouseMove(CPoint point); protected: BOOL m_bForceRecalc; /**< TRUE to force the tab control to recalculate it's layout. */ }; /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif // !defined(__XTPCONTROLTABWORKSPACE_H__) /** @endcond */