CDockingManager Class
Implements the core functionality that controls docking layout in a main frame window.
class CDockingManager : public CObject
Members
Public Methods
Name |
Description |
---|---|
Creates a dock pane and adds it to the list of control bars. |
|
Adds a handle to a bar pane to the list of hidden MDI tabbed bar panes. |
|
Adds a frame to the list of mini frames. |
|
Registers a pane with the docking manager. |
|
Recalculates and adjusts the layout of all panes in a frame window. |
|
Causes the WM_NCCALCSIZE message to be sent to all panes and CPaneFrameWnd windows. |
|
Adjusts the alignment of a rectangle. |
|
Resizes a docking pane in autohide mode so that it takes the full width or height of the frame’s client area surrounded by dock sites. |
|
Creates an autohide toolbar. |
|
Brings the docked bars that have the specified alignment to the top. |
|
Adds names of docking panes and toolbars to a menu. |
|
Calculates the expected rectangle of a docked window. |
|
Creates a docking manager. |
|
Determines the pane that contains a given point and its docking status. |
|
Enables or disables loading of docking layout from the registry. |
|
Docks a pane to another pane or to a frame window. |
|
Docks a pane to the left of another pane. |
|
Enables docking of the pane to the main frame, creates a dock pane, and adds it to the list of control bars. |
|
Creates a dock pane and enables docking of the pane to the main frame. |
|
Displays an additional button that opens a pop-up menu on the captions of all docking panes. |
|
Tells the library to display a special context menu that has a list of application toolbars and docking panes when the user clicks the right mouse button and the library is processing the WM_CONTEXTMENU message. |
|
Retrieves the bar pane that is at the specified position and that has the specified alignment. |
|
Returns the bar pane that has the id of the target bar pane. |
|
Finds a pane by the specified control ID. |
|
Commits all current toolbar positions to virtual rectangles. |
|
Returns the frame that contains the given point. |
|
Gets the rectangle that contains the bounds of the client area. |
|
Returns the current docking mode. |
|
Gets a pointer to the parent window frame. |
|
Returns the enabled alignment of the panes. |
|
Gets a list of miniframes. |
|
Gets a rectangle that contains the outer edges of the frame. |
|
Returns a list of panes that belong to the docking manager. This includes all floating panes. |
|
Retrieves a pointer to the smart docking manager. |
|
Retrieves a pointer to the smart docking manager. |
|
Returns the smart docking parameters for the docking manager. |
|
A static method that returns a theme used to display smart docking markers. |
|
Hides a pane that is in autohide mode. |
|
Creates a dock pane and inserts it into the list of control bars. |
|
Inserts a control pane into the list of control bars. |
|
Specifies whether a pop-up menu is displayed on the captions of all panes. |
|
Determines if the layouts of all panes are adjusted. |
|
Specifies whether the docking manager is in OLE container mode. |
|
Determines whether a specified point is near the dock site. |
|
Determines if the print preview mode is set. |
|
Loads the docking manager's state from the registry. |
|
Locks the given window. |
|
Called by the framework when the frame window is made active or is deactivated. |
|
Called by the framework when an active pop-up menu processes a WM_DESTROY message. |
|
Called by the framework to move a mini-frame window. |
|
Called by the framework when it builds a menu that has a list of panes. |
|
Returns the pane that contains the given point. |
|
Called by the framework to select or to clear a check box for the specified command and recalculate the layout of a shown pane. |
|
Recalculates the internal layout of the controls present in the list of controls. |
|
Releases the empty pane containers. |
|
Removes the specified hidden bar pane. |
|
Removes a specified frame from the list of mini frames. |
|
Unregisters a pane and removes it from the list in the docking manager. |
|
Replaces one pane with another. |
|
Resorts the frames in the list of mini frames. |
|
Saves the docking manager's state to the registry. |
|
Sends the specified message to all mini frames. |
|
Writes the docking manager to an archive. (Overrides CObject::Serialize.) |
|
Sets the size, width, and height of the control bars and the specified pane. |
|
Sets the docking mode. |
|
Sets the docking state of the control bars, the mini frames, and the autohide bars. |
|
Sets the print preview mode of the bars that are displayed in the print preview. |
|
Sets the parameters that define the behavior of smart docking. |
|
Shows or hides the windows of the mini frames. |
|
Shows or hides the panes of the control and autohide bars. |
|
Starts the smart docking of the specified window according to the alignment of the smart docking manager. |
|
Stops smart docking. |
Data Members
Name |
Description |
---|---|
Specifies whether the docking manager hides panes in OLE container mode. |
|
Specifies the global docking mode. |
|
Specifies the docking sensitivity. |
|
Specifies the time, in milliseconds, before a docking pane is docked in immediate docking mode. |
|
Specifies the time, in milliseconds, before a toolbar is docked to the main frame window. |
Remarks
The main frame window creates and initializes this class automatically.
The docking manager object holds a list of all panes that are in the docking layout, and also a list of all CPaneFrameWnd windows that belong to the main frame window.
The CDockingManager class implements some services that you can use to find a pane or a CPaneFrameWnd window. You usually do not call these services directly because they are wrapped in the main frame window object. For more information, see CPaneFrameWnd Class.
Customization Tips
The following tips apply to CDockingManager objects:
CDockingManager Class supports these docking modes:
AFX_DOCK_TYPE::DT_IMMEDIATE
AFX_DOCK_TYPE::DT_STANDARD
AFX_DOCK_TYPE::DT_SMART
These docking modes are defined by CDockingManager::m_dockModeGlobal and are set by calling CDockingManager::SetDockingMode.
If you want to create a non-floating, non-resizable pane, call the CDockingManager::AddPane method. This method registers the pane with the docking manager, which is responsible for the layout of the pane.
Example
The following example demonstrates how to use various methods in the CDockingManager class to configure a CDockingManager object. The example shows how to display an additional button that opens a pop-up menu on the captions of all docking panes and how to set the docking mode of the object. This code snippet is part of the Visual Studio Demo sample.
CDockingManager* pDockManager = GetDockingManager();
ASSERT_VALID(pDockManager);
pDockManager->AdjustPaneFrames();
pDockManager->EnableDockSiteMenu();
pDockManager->SetDockingMode(DT_STANDARD);
Inheritance Hierarchy
Requirements
Header: afxDockingManager.h