Class used to handle docking operations.
More...
#include <ilviews/gadgets/dockpane.h>
Inherited by IlvAbstractBarDockable.
Class used to handle docking operations.
Library: ilvadvgdt
Instances of the class IlvDockable
manage docking operations for the IlvPane
object to which they are linked. A pane is said to be docked when it belongs to a dockable container or undocked when it is contained in a special top view. A docked pane is one that is added to a dockable container with the method IlvDockableContainer::addDockingPane
.
- See also
- IlvDockableContainer, IlvPane.
◆ IlvDockable()
IlvDockable::IlvDockable |
( |
IlvPane * |
pane = 0 | ) |
|
◆ acceptDocking()
Indicates whether the pane connected to this dockable instance can dock to the specified dockable container.
You can override this method in subclasses to filter docking operations. This methods calls the IlvDockableContainer::acceptDocking
method.
- Parameters
-
container | The potential target dockable container. |
index | The position where the pane will be docked in container. |
- Returns
- A Boolean value specifying whether docking to container at index is allowed for the pane connected to this instance of
IlvDockable
.
◆ dock()
Docks the pane connected to this dockable instance.
Docks the pane associated with this instance of IlvDockable
to the dockable container container, at the position specified by the index parameter. This method does nothing if the pane is already docked.
- Parameters
-
container | The dockable container to which the pane will be docked. |
index | The index specifying the position where the pane will be docked in container. |
rect | The preferred size of the pane. If the dockable container is oriented vertically, the pane height is that of rect. If it is oriented horizontally, the pane width is that of rect. |
- See also
- isDocked, unDock
◆ GetDockable()
Returns the instance of IlvDockable
that is connected to the specified pane.
- Parameters
-
- Returns
- The instance of
IlvDockable
connected to pane or 0 if there is none.
- See also
- SetDockable
◆ getDockingDirection()
IlvDirection IlvDockable::getDockingDirection |
( |
| ) |
const |
Returns the preferred docking direction of this dockable instance.
When a preferred docking direction has been set with IlvDockable::setDockingDirection
, docking operations are restricted to dockable containers whose orientation matches the specified preferred docking direction. For example, if you want a pane to be docked only to vertical dockable containers, call setDockingDirection(IlvVertical)
.
- See also
- setDockingDirection, acceptDocking
◆ getPane()
IlvPane* IlvDockable::getPane |
( |
| ) |
const |
Returns the pane connected to this dockable instance.
- Returns
- The pane associated with this instance of
IlvDockable
.
- See also
- setPane
◆ getTitle()
const char* IlvDockable::getTitle |
( |
| ) |
const |
Returns the title displayed by the top window when the pane is undocked.
- Returns
- The title of the top window when the pane is undocked or
0
if no title has been defined. In this case, the title displayed by the top window is the name of the pane.
- See also
- setTitle, getName
◆ isDocked()
Returns the dockable state of this dockable instance.
- Returns
IlTrue
if the pane is docked, that is, if it belongs to an IlvDockableContainer
object.
- See also
- dock, unDock
◆ SetDockable()
Connects an instance of IlvDockable
to the specified pane.
Connects dockable to pane. If an instance of IlvDockable
was already connected to pane, it is removed but not deleted.
- Parameters
-
pane | The pane to which dockable will be connected. |
dockable | The instance of IlvDockable to connect to pane. |
- See also
- GetDockable
◆ setDockingDirection()
void IlvDockable::setDockingDirection |
( |
IlvDirection |
direction | ) |
|
Sets the preferred docking direction of this dockable instance.
Calling this method restricts docking operation for this dockable instance to dockable containers that match the preferred docking direction. The default value is IlvBadPosition
, which means that no preferred direction has been set. In this case, the pane can be docked in both IlvHorizontal
and IlvVertical
dockable containers.
- Parameters
-
direction | The preferred docking direction. Valid values are: IlvVertical , IlvHorizontal |
- See also
- getDockingDirection, acceptDocking
◆ setPane()
void IlvDockable::setPane |
( |
IlvPane * |
pane | ) |
|
◆ setTitle()
void IlvDockable::setTitle |
( |
const char * |
title | ) |
|
Sets the title displayed by the top window when the pane is undocked.
When the pane is undocked, it is placed in a special top window. Calling this method lets you specify the title of this top window. If a title was already set, it gets deleted.
- Parameters
-
title | The title displayed by the top window when the pane is undocked. |
- See also
- getTitle
◆ unDock()
Undocks the pane connected to this dockable instance.
Removes the pane associated with this instance of IlvDockable
from its container, and adds it to a new top paned container. The new container is resized to rect. This method does nothing if the pane is not docked.
- Parameters
-
rect | The size and position of the pane in global screen coordinates when undocked. |
show | Not documented. |
- See also
- isDocked, dock