Rogue Wave Views
Gadgets Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions | Static Public Member Functions
IlvDockable Class Reference

Class used to handle docking operations. More...

#include <ilviews/gadgets/dockpane.h>

Inherited by IlvAbstractBarDockable.

Public Member Functions

 IlvDockable (IlvPane *pane=0)
 Constructor. More...
 
virtual IlBoolean acceptDocking (const IlvDockableContainer *container, IlUInt index) const
 Indicates whether the pane connected to this dockable instance can dock to the specified dockable container. More...
 
virtual void dock (IlvDockableContainer *container, IlUInt index, const IlvRect &rect)
 Docks the pane connected to this dockable instance. More...
 
IlvDirection getDockingDirection () const
 Returns the preferred docking direction of this dockable instance. More...
 
IlvPanegetPane () const
 Returns the pane connected to this dockable instance. More...
 
const char * getTitle () const
 Returns the title displayed by the top window when the pane is undocked. More...
 
IlBoolean isDocked () const
 Returns the dockable state of this dockable instance. More...
 
void setDockingDirection (IlvDirection direction)
 Sets the preferred docking direction of this dockable instance. More...
 
void setPane (IlvPane *pane)
 Sets the pane managed by this dockable instance. More...
 
void setTitle (const char *title)
 Sets the title displayed by the top window when the pane is undocked. More...
 
virtual IlvPanedContainerunDock (const IlvRect &rect, IlBoolean show=IlTrue)
 Undocks the pane connected to this dockable instance. More...
 

Static Public Member Functions

static IlvDockableGetDockable (const IlvPane *pane)
 Returns the instance of IlvDockable that is connected to the specified pane. More...
 
static void SetDockable (IlvPane *pane, IlvDockable *dockable)
 Connects an instance of IlvDockable to the specified pane. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

IlvDockable::IlvDockable ( IlvPane pane = 0)

Constructor.

Initializes a new instance of the IlvDockable class connected to pane.

Parameters
paneThe pane to be connected with this instance of IlvDockable. If pane is 0, the pane will have to be set with the IlvDockable::setPane method or the IlvDockable::SetDockable static method later.
See also
setPane, SetDockable

Member Function Documentation

virtual IlBoolean IlvDockable::acceptDocking ( const IlvDockableContainer container,
IlUInt  index 
) const
virtual

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
containerThe potential target dockable container.
indexThe 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.
virtual void IlvDockable::dock ( IlvDockableContainer container,
IlUInt  index,
const IlvRect rect 
)
virtual

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
containerThe dockable container to which the pane will be docked.
indexThe index specifying the position where the pane will be docked in container.
rectThe 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
static IlvDockable* IlvDockable::GetDockable ( const IlvPane pane)
static

Returns the instance of IlvDockable that is connected to the specified pane.

Parameters
paneThe pane.
Returns
The instance of IlvDockable connected to pane or 0 if there is none.
See also
SetDockable
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
IlvPane* IlvDockable::getPane ( ) const

Returns the pane connected to this dockable instance.

Returns
The pane associated with this instance of IlvDockable.
See also
setPane
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
IlBoolean IlvDockable::isDocked ( ) const

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
static void IlvDockable::SetDockable ( IlvPane pane,
IlvDockable dockable 
)
static

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
paneThe pane to which dockable will be connected.
dockableThe instance of IlvDockable to connect to pane.
See also
GetDockable
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
directionThe preferred docking direction. Valid values are: IlvVertical, IlvHorizontal
See also
getDockingDirection, acceptDocking
void IlvDockable::setPane ( IlvPane pane)

Sets the pane managed by this dockable instance.

Note that this method does not connect pane to the instance of IlvDockable, but simply changes the pane to which it is connected. To connect a pane with an instance of IlvDockable, use the IlvDockable::SetDockable method.

Parameters
paneThe pane to be linked to this instance of IlvDockable.
See also
getPane, SetDockable
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
titleThe title displayed by the top window when the pane is undocked.
See also
getTitle
virtual IlvPanedContainer* IlvDockable::unDock ( const IlvRect rect,
IlBoolean  show = IlTrue 
)
virtual

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
rectThe size and position of the pane in global screen coordinates when undocked.
showNot documented.
See also
isDocked, dock

© Copyright 2016, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.