/** * @file XTPDockingPaneBaseContainer.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(__XTPDOCKINGPANEBASECONTAINER_H__) # define __XTPDOCKINGPANEBASECONTAINER_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * CXTPDockingPaneBaseContainer is a CXTPDockingPaneBase derived class. * It represents the parent class for all virtual containers. */ class _XTP_EXT_CLASS CXTPDockingPaneBaseContainer : public CXTPDockingPaneBase { protected: /** * @brief * Protected constructor. You cannot create this class. * @param type Docking Pane type. Can be any of the values listed in the * Remarks section. * @param pLayout Pointer to a CXTPDockingPaneLayout object. * @details * Docking Pane type can be one of the following: * xtpPaneTypeDockingPane: Indicates the pane's style is a docking pane. * xtpPaneTypeTabbedContainer: Indicates the pane's style is a tabbed * container for a pane. * xtpPaneTypeSplitterContainer: Indicates the pane's style is a splitter * container. * xtpPaneTypeMiniWnd: Indicates the pane's style is a floating window * container. * xtpPaneTypeClient: Indicates the pane's style is a container for * client area. * xtpPaneTypeAutoHidePanel: Indicates the pane's style is an auto-hide * panel container. */ CXTPDockingPaneBaseContainer(XTPDockingPaneType type, CXTPDockingPaneLayout* pLayout); /** * @brief * Destroys a CXTPDockingPaneBase object, handles cleanup and * deallocation. */ virtual ~CXTPDockingPaneBaseContainer(); public: /** * @brief * Call this member to determine if one pane is contained in the * collection of another. * @param pPane Pointer to a CXTPDockingPaneBase object * @return * POSITION of the pane in the collection if successful, * otherwise NULL. */ virtual POSITION ContainPane(CXTPDockingPaneBase* pPane) const; /** * @brief * Call this member to find all panes of a specific XTPDockingPaneType * within the container. * @param type Type of docking pane to search for within the container. * @param pList An array of type CXTPDockingPaneBaseList that will * contain a list of all panes of the specified type * that are in the tabbed container. This points to a * CXTPDockingPaneBaseList object that will contain * the found panes. * @details * pList is an external list that you must create and pass in as a * parameter. See example below: * * Example: * This will get the count of panes inside container: *
	 * CXTPDockingPaneBaseList lst;
	 *
	 * m_pTopContainer->FindPane(xtpPaneTypeTabbedContainer, &lst);
	 * int nCount = (int)lst.GetCount();
	 * 
*/ virtual void FindPane(XTPDockingPaneType type, CXTPDockingPaneBaseList* pList) const; /** * @brief * This method retrieves the position of the first pane of this container. * @return * A POSITION value that can be used for iteration or object pointer * retrieval; it is NULL if the list is empty. * @see * GetNext */ POSITION GetHeadPosition() const; /** * @brief * Gets the pane element identified by rPosition, then sets rPosition to * the POSITION value of the next entry in the container. You can use GetNext * in a forward iteration loop if you establish the initial position with * a call to GetHeadPosition. * @param pos Specifies a reference to a POSITION value returned by a previous * GetNext, GetHeadPosition, or other method call. * @return * Pane identified by rPosition. * @see * GetHeadPosition */ CXTPDockingPaneBase* GetNext(POSITION& pos) const; /** * @brief * This method retrieves the first pane in the container. * @return * First pane in the container. * @see * GetLastPane, GetHeadPosition */ CXTPDockingPaneBase* GetFirstPane() const; /** * @brief * This method retrieves the last pane in the container. * @return * Last pane in the container. * @see * GetFirstPane, GetHeadPosition */ CXTPDockingPaneBase* GetLastPane() const; /** * @brief * Call this member to retrieve the collection of child panes. * @return * A reference to the child panes collection. */ CXTPDockingPaneBaseList& GetPanes(); /** * @brief * This method is called if some action occurs. * @param action Docking pane action. * @return * TRUE if the action was canceled. */ BOOL OnAction(XTPDockingPaneAction action); protected: /** * @brief * Call this member to determine if there are no children panes. * @return * TRUE if there are no children panes, otherwise FALSE. */ virtual BOOL IsEmpty() const; protected: CXTPDockingPaneBaseList m_lstPanes; /**< Child panes collection. */ }; AFX_INLINE CXTPDockingPaneBaseList& CXTPDockingPaneBaseContainer::GetPanes() { return m_lstPanes; } /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif // #if !defined(__XTPDOCKINGPANEBASECONTAINER_H__) /** @endcond */