rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvDockable Class Reference

Class used to handle docking operations. More...

#include <ilviews/gadgets/dockpane.h>

Inherited by IlvAbstractBarDockable.

List of all members.

Public Member Functions

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

Static Public Member Functions

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

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:
pane The 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:
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.
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:
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
static IlvDockable* IlvDockable::GetDockable ( const IlvPane pane  )  [static]

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

Parameters:
pane The 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:
pane The pane to which dockable will be connected.
dockable The 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:
direction The 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:
pane The 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:
title The 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:
rect The size and position of the pane in global screen coordinates when undocked.
show Not documented.
See also:
isDocked, dock
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, 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.