/** * @file XTPTabView.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(__XTPTABVIEW_H__) # define __XTPTABVIEW_H__ /** @endcond */ # if _MSC_VER > 1000 # pragma once # endif // _MSC_VER > 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** @cond */ class _XTP_EXT_CLASS CXTPCtrlView : public CCtrlView { public: CXTPCtrlView() : CCtrlView(WC_TABCONTROL, AFX_WS_DEFAULT_VIEW | TCS_TOOLTIPS) { } }; DECLARE_TABCTRLEX_BASE(CXTPTabViewBase, CXTPCtrlView, CXTPTabExBase) /** @endcond */ /** * @brief * CXTPTabView is a multiple inheritance class derived from CCtrlView and * CXTPTabCtrlBaseEx. CXTPTabView can be used to create a view that contains * nested views displayed in a tab control. See CXTPTabCtrlBaseEx for additional * functionality. */ class _XTP_EXT_CLASS CXTPTabView : public CXTPTabViewBase { /** @cond */ DECLARE_DYNCREATE(CXTPTabView) /** @endcond */ friend class CXTPTabViewBase; public: /** * @brief * Constructs a CXTPTabView object. */ CXTPTabView(); /** * @brief * Destroys a CXTPTabView object, handles cleanup and deallocation. */ virtual ~CXTPTabView(); public: /** * @brief * Call this member function to retrieve a reference pointer to the * CTabCtrl object associated with this view. * @return * A CTabCtrl reference to the object associated with this view. */ virtual CTabCtrl& GetTabCtrl() const; /** * @brief * Call this function to assign an image list to the tab control * associated with this view. * @param pImageList A pointer to the image list to be assigned to the * tab control. * @return * A pointer to the previous image list, or NULL if there is no * previous image list. */ virtual CImageList* SetTabImageList(CImageList* pImageList); /** * @brief * This member function retrieves the handle of the tooltip control associated * with the tab control. The tab control creates a tooltip control if * it has the TCS_TOOLTIPS style. You can also assign a tooltip control * to a tab control by using the SetToolTips member function. * @return * The handle of the tooltip control if successful, otherwise NULL. */ virtual CToolTipCtrl* GetToolTips(); /** * @brief * Call this function to assign a tooltip control to the tab control. * You can associate the tooltip control with a tab control by making * a call to GetToolTips. * @param pWndTip A pointer to a tooltip control. */ virtual void SetToolTips(CToolTipCtrl* pWndTip); /** * @brief * Call this member function to update the document name with the tab label. */ void UpdateDocTitle(); protected: /** * @brief * This member function is called by the CXTPTabView class to perform * initialization when the window is created or sub-classed. * @return * TRUE if the window was successfully initialized, otherwise FALSE. */ virtual BOOL Init(); /** @cond */ DECLARE_MESSAGE_MAP() //{{AFX_VIRTUAL(CXTPTabView) virtual void OnInitialUpdate(); //}}AFX_VIRTUAL //{{AFX_MSG(CXTPTabView) afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message); //}}AFX_MSG /** @endcond */ }; ////////////////////////////////////////////////////////////////////// /** @cond */ AFX_INLINE CTabCtrl& CXTPTabView::GetTabCtrl() const { _ASSERTE(this); return (CTabCtrl&)*this; } AFX_INLINE CImageList* CXTPTabView::SetTabImageList(CImageList* pImageList) { _ASSERTE(this); return GetTabCtrl().SetImageList(pImageList); } AFX_INLINE CToolTipCtrl* CXTPTabView::GetToolTips() { return GetTips(); } AFX_INLINE void CXTPTabView::SetToolTips(CToolTipCtrl* pWndTip) { SetTips(pWndTip); } /** @endcond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" /** @cond */ #endif // !defined(__XTPTABVIEW_H__) /** @endcond */