CDockablePane Class
Implements a pane that can either be docked in a dock site or included in a tabbed pane.
class CDockablePane : public CPane
Members
Public Constructors
Name |
Description |
---|---|
Constructs and initializes a CDockablePane object. |
Public Methods
Name |
Description |
---|---|
Attaches a pane to another pane. This creates a tabbed pane. |
|
Returns the size of the pane rectangle. |
|
Determines whether the specified mini frame can be docked to the pane. |
|
Determines whether another pane can be docked to the current pane. |
|
Determines whether the pane supports auto-hide mode. (Overrides CBasePane::CanAutoHide.) |
|
Determines whether the current pane can be docked to another pane. |
|
Converts one or more dockable panes to MDI tabbed documents. |
|
Copies the state of a dockable pane. |
|
Creates the Windows control and attaches it to the CDockablePane object. |
|
Creates a default divider for the pane as it is being docked to a frame window. |
|
Creates the Windows control and attaches it to the CDockablePane object. |
|
Creates a tabbed pane from the current pane. |
|
Docks a container to the pane. |
|
Docks a pane by using outline (standard) docking. |
|
CDockablePane::DockToFrameWindow |
Used internally. To dock a pane, use CPane::DockPane or CDockablePane::DockToWindow. |
Docks a pane to its stored recent docking position. |
|
Docks one docking pane to another docking pane. |
|
Enables or disables auto-hide mode for this pane together with other panes in the container. |
|
Shows or hides the caption (gripper). |
|
Specifies the position of the pane when visible in auto-hide mode. |
|
Retrieves the auto hide slide mode for the pane. |
|
CDockablePane::GetAutoHideButton |
Used internally. |
CDockablePane::GetAutoHideToolBar |
Used internally. |
Returns the height of the current caption. |
|
Returns the default pane divider for the pane's container. |
|
Determines the ability of a pane to be docked based on the provided pointer location. |
|
Returns the drag sensitivity of a docking pane. |
|
Retrieves the percentage of space that a pane occupies within its container. |
|
Retrieves the tab area for the pane. |
|
Returns the runtime class information about a tabbed window that is created when another pane docks to the current pane. |
|
Specifies whether a docking pane can be switched to auto-hide mode. |
|
Specifies the specific location in a pane where the user clicks a mouse. |
|
CDockablePane::IsAccessibilityCompatible |
Used internally. |
Indicates whether the docking pane and all other panes in the container can be placed in auto-hide mode. |
|
Determines whether a pane is in auto-hide mode. |
|
CDockablePane::IsChangeState |
Used internally. |
Determines whether the current pane is docked. |
|
Determines the behavior of a pane that is in auto-hide mode if it is shown (or hidden) by calling ShowPane. |
|
Specifies whether the pane is in a multi-pane frame window. |
|
Specifies whether the pane is resizable. |
|
Specifies whether tabs are located at the top or bottom of the pane. |
|
Specifies whether a pane is being dragged by the user. |
|
Determines whether the current pane is visible. |
|
Used internally. |
|
Called by the framework when the parent of a pane has changed. (Overrides CPane::OnAfterChangeParent.) |
|
Called by the framework when a floating docking bar docks at a frame window. |
|
Called by the framework when the parent of the pane is about to change. (Overrides CPane::OnBeforeChangeParent.) |
|
Called by the framework when a pane is about to float. (Overrides CPane::OnBeforeFloat.) |
|
The framework calls this method when a pane is being undocked. |
|
Replaces the pane with a specified pane. |
|
The framework calls this method as a pane is deserialized to restore the default pane divider. |
|
CDockablePane::SaveState |
Used internally. |
CDockablePane::Serialize |
Serializes the pane. (Overrides CBasePane::Serialize.) |
Toggles the docking pane between visible and auto-hide mode. |
|
Sets the auto-hide button and auto-hide toolbar for the pane. |
|
CDockablePane::SetDefaultPaneDivider |
Used internally. |
Sets the percentage of space that a pane occupies within its container. |
|
CDockablePane::SetResizeMode |
Used internally. |
Sets the restored default pane divider. |
|
Sets the runtime class information for a tabbed window that is created when two panes dock together. |
|
Shows or hides a pane. |
|
Shows or hides a pane with a sliding animation which displays only when the pane is in auto-hide mode. |
|
Toggles auto-hide mode. (Overrides CPane::ToggleAutoHide .) |
|
Undocks a pane from either the main frame window or a miniframe window container. |
|
CDockablePane::UnSetAutoHideMode |
Used internally. To set the auto-hide mode, use CDockablePane::SetAutoHideMode |
Protected Methods
Name |
Description |
---|---|
Determines whether the docking pane is hidden (in autohide mode). |
|
Determines when an autohide docking pane should stop sliding. |
|
Draws the docking pane caption (gripper). |
|
Called when the user presses a caption button other than the AFX_HTCLOSE and AFX_HTMAXBUTTON buttons. |
|
Called by the framework to render the autohide slide effect when the pane is either shown or hidden. |
Data Members
Name |
Description |
---|---|
Specifies whether autohide animation of the dockable pane is disabled. |
|
Determines the behavior of the pane when the pane is in autohide mode. |
|
Specifies the animation speed of the pane when it is being shown or hidden when in autohide mode. |
Remarks
CDockablePane implements the following functionality:
Docking a pane to a main frame window.
Switching a pane to autohide mode.
Attaching a pane to a tabbed window.
Floating a pane in a miniframe window.
Docking a pane to another pane that is floating in a miniframe window.
Resizing a pane.
Loading and saving state for a docking pane.
Note
State information is saved to the Windows registry.
Creating a pane with or without a caption. The caption can have a text label and it can be filled with a gradient color.
Dragging a pane while displaying the contents of the pane
Dragging a pane while displaying a drag rectangle.
To use a docking pane in your application, derive your pane class from the CDockablePane class. Either embed the derived object into the main frame window object or into a window object that controls the instance of your pane. Then call the CDockablePane::Create method or the CDockablePane::CreateEx method when you process the WM_CREATE message in the main frame window. Finally, set up the pane object by calling CBasePane::EnableDocking, CBasePane::DockPane, or CDockablePane::AttachToTabWnd.
Example
The following example demonstrates how to configure a CDockablePane object by using various methods in the CDockablePane class. The example illustrates how to enable the autohide all feature for the dockable pane, enable the caption or the gripper, enable the autohide mode, show the pane, and animate a pane that is in autohide mode. This code snippet is part of the VisualStudioDemo Sample: MFC Visual Studio Application.
// GetOwner is an inherited method.
CDockablePane* pParentBar = DYNAMIC_DOWNCAST(CDockablePane, GetOwner());
...
pParentBar->EnableAutohideAll();
pParentBar->EnableGripper(true);
pParentBar->SetAutoHideMode(true, CBRS_ALIGN_LEFT);
pParentBar->ShowPane(true,false,true);
pParentBar->Slide(true);
Inheritance Hierarchy
Requirements
Header: afxDockablePane.h