Creating Docking Panes
Creating a docking pane is very much the same as creating a normal pane as illustrated in the following two code samples. Panes are described in Panes.
Below, the “Tree” pane is added to a paned container with the addPane member function:
IlvPanedContainer* container = new IlvPanedContainer(display,
"Paned Container",
"Paned Container",
IlvRect(0, 0, 500, 500),
IlvVertical);
IlvTreeGadget* tree = new IlvTreeGadget(display, IlvRect(0, 0, 100, 100));
IlvGraphicPane* graphicPane = new IlvGraphicPane(“Tree”, tree);
container->addPane(graphicPane);
Below, the same “Tree” pane is added to a dockable container with the member function addDockingPane, which makes it a dockable pane:
IlvDockableContainer* container =
new IlvDockableContainer(display,
"Dockable Container",
"Dockable Container",
IlvRect(0, 0, 500, 500),
IlvVertical);
IlvTreeGadget* tree = new IlvTreeGadget(display, IlvRect(0, 0, 100, 100));
IlvGraphicPane* graphicPane = new IlvGraphicPane(“Tree”, tree);
container->addDockingPane(graphicPane);
In the second code sample, the paned container is of type IlvDockableContainer, a subclass of IlvPanedContainer, and panes are added to it with the member function addDockingPane to create docking panes.
Panes added to a dockable container with the addDockingPane member function are connected to an instance of the IlvDockable class, which handles docking operations for them. For more information on this class, see Controlling Docking Operations.
Note: If you want to use a subclass of IlvDockable, you should be aware that you have to connect it explicitly before calling addDockingPane. See Connecting an Instance of the IlvDockable Class to a Pane.
Docking panes are equipped with a handle, which you can click and drag to undock the pane. See the following illustration.
Docking Pane Handles
When you drag the pane to move it, a ghost image appears that helps you position it to its new location.
Note: Because the dockable container adds a handle to a docking pane, its index is no longer the one specified when calling the member function addDockingPane. The handle is added to the left of the pane if the target paned container is horizontal and to the top of the pane if the container is vertical. For information about pane indexing, see Using Automatic Slider Creation and Creating Orthogonal Dockable Containers.
Published date: 05/24/2022
Last modified date: 02/24/2022