Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvGraphicHolder Class Referenceabstract

Holder class. More...

#include <ilviews/graphics/holder.h>

Inherited by IlvContainerGraphicHolder, and IlvSubGraphicHolder.

Public Member Functions

virtual IlUInt addGuide (IlvDirection dir, IlvPos pos, IlInt weight=0, IlInt limit=1)
 Adds a new guide to this holder. More...
 
virtual IlBoolean allowFocus (IlBoolean flag)=0
 Specifies whether to enable or disable keyboard focus navigation in the holder. More...
 
virtual void applyToObject (IlvGraphic *obj, IlvApplyObject f, IlAny arg, IlBoolean redraw=IlTrue)=0
 Applies the specified function to the specified graphic object. More...
 
virtual void applyToObjects (IlvApplyObject f, IlAny arg, IlBoolean redraw=IlTrue)
 Applies the specified function to all the objects of the holder. More...
 
void attach (IlvGraphic *obj, IlvDirection dir, IlInt weightBefore=0, IlInt objectWeight=1, IlInt weightAfter=0, IlUInt guide1ndx=0, IlUInt guide2ndx=(IlUInt)-1)
 Attaches an object to the holder. More...
 
virtual IlvBitmapgetBitmap () const =0
 Returns the bitmap of this holder. More...
 
virtual IlvContainergetContainer () const
 Returns the container connected to this holder. More...
 
virtual IlvDisplaygetDisplay () const =0
 Returns the display of the holder. More...
 
virtual IlvGraphicgetFocus () const =0
 Returns the graphic object having the keyboard focus in this holder. More...
 
IlUInt getGuideCardinal (IlvDirection dir) const
 Returns the number of guides in the specified direction. More...
 
IlInt getGuideLimit (IlvDirection dir, IlUInt index) const
 Returns the minimum size of a guide in the specified direction. More...
 
IlvPos getGuidePosition (IlvDirection dir, IlUInt index) const
 Returns the position of a guide in the specified direction. More...
 
IlInt getGuideSize (IlvDirection dir, IlUInt index) const
 Returns the size of a guide in the specified direction. More...
 
IlInt getGuideWeight (IlvDirection dir, IlUInt index) const
 Returns the weight of a guide in the specified direction. More...
 
virtual IlvLookFeelHandlergetLookFeelHandler () const
 Returns the look and feel handler of the holder. More...
 
virtual IlvManager * getManager () const
 Returns the manager connected to this holder. More...
 
IlvGraphicHoldergetNextFocusHolder () const
 Returns the next holder in the focus chain. More...
 
virtual IlvGraphic *const * getObjects (IlUInt &count) const =0
 Returns an array containing all the objects of this holder. More...
 
IlvGraphicHoldergetPreviousFocusHolder () const
 Returns the previous holder in the focus chain. More...
 
virtual IlvTransformergetTransformer () const =0
 Returns the transformer of this holder. More...
 
virtual IlvViewgetView () const =0
 Returns the view of this holder. More...
 
virtual IlBoolean isAContainer () const =0
 Indicates whether or not this holder is connected to a container. More...
 
virtual IlBoolean isFocusAllowed () const =0
 Returns IlTrue if the keyboard focus navigation is enabled in this holder. More...
 
virtual IlBoolean isVisible (const IlvGraphic *obj) const =0
 Indicates if the specified graphic object is set to be visible. More...
 
virtual void moveFocusAfter (IlBoolean redraw=IlTrue)=0
 Moves the keyboard focus to the next object. More...
 
virtual void moveFocusBefore (IlBoolean redraw=IlTrue)=0
 Moves the keyboard focus to the previous object. More...
 
virtual void moveFocusFirst ()=0
 Moves the focus to the first object of the holder.
 
virtual void moveFocusLast ()=0
 Moves the focus to the last object of the holder.
 
void removeAttachments (IlvGraphic *obj, IlvDirection dir)
 Removes the attachments of an object. More...
 
virtual void removeGrab ()=0
 Removes the grab of an object in this holder.
 
virtual IlBoolean removeGuide (IlvDirection dir, IlUInt index)
 Removes the specified guide from this holder. More...
 
virtual void setFocus (IlvGraphic *obj=0, IlBoolean redraw=IlTrue) const =0
 Gives the keyboard focus to the specified object. More...
 
virtual void setGrab (IlvGraphic *obj)=0
 Sets the grab of this holder to obj. More...
 
virtual void setLookFeelHandler (IlvLookFeelHandler *lfh)
 Sets the look and feel handler of the holder. More...
 
void setNextFocusHolder (IlvGraphicHolder *holder)
 Sets the next holder in the focus chain. More...
 
void setPreviousFocusHolder (IlvGraphicHolder *holder)
 Sets the previous holder in the focus chain. More...
 
virtual void setVisible (IlvGraphic *obj, IlBoolean visible, IlBoolean redraw)=0
 Sets the visibility of the specified graphic object. More...
 

Detailed Description

Holder class.

Library: views

The class IlvGraphicHolder is an abstraction to unify the API of IlvContainer and IlvManager. It allows the user to perform many operations without knowing if they occur on a container or a manager.

Every container and manager has a pointer to an IlvGraphicHolder instance, and every graphic object of this container or manager has a pointer to the same IlvGraphicHolder instance. A graphic object retrieves its holder by using the method IlvGraphic::getHolder().

See also
IlvContainer, IlvManager, IlvGadgetContainer, IlvGadgetManager.

Member Function Documentation

virtual IlUInt IlvGraphicHolder::addGuide ( IlvDirection  dir,
IlvPos  pos,
IlInt  weight = 0,
IlInt  limit = 1 
)
virtual

Adds a new guide to this holder.

Adds a new guide in the direction specified by dir.

Parameters
dirThe direction of the new guide. Valid directions are IlvHorizontal and IlvVertical.
posThe initial position of the guide.
weightThe weight of the new guide.
limitThe minimum size of the new guide.
Returns
The index of the new guide, or -1 if the guide has not been added.
See also
IlvSplitterGadget
virtual IlBoolean IlvGraphicHolder::allowFocus ( IlBoolean  flag)
pure virtual

Specifies whether to enable or disable keyboard focus navigation in the holder.

Parameters
flagA Boolean value specifying whether the keyboard focus is enabled or disabled.
virtual void IlvGraphicHolder::applyToObject ( IlvGraphic obj,
IlvApplyObject  f,
IlAny  arg,
IlBoolean  redraw = IlTrue 
)
pure virtual

Applies the specified function to the specified graphic object.

Parameters
objThe graphic object.
fThe function to apply.
argThe argument that will be passed to f.
redrawA Boolean value specifying whether to redraw the holder or not.
virtual void IlvGraphicHolder::applyToObjects ( IlvApplyObject  f,
IlAny  arg,
IlBoolean  redraw = IlTrue 
)
virtual

Applies the specified function to all the objects of the holder.

Parameters
fThe function to apply.
argThe argument that will be passed to f.
redrawA Boolean value specifying whether to redraw the holder or not.
void IlvGraphicHolder::attach ( IlvGraphic obj,
IlvDirection  dir,
IlInt  weightBefore = 0,
IlInt  objectWeight = 1,
IlInt  weightAfter = 0,
IlUInt  guide1ndx = 0,
IlUInt  guide2ndx = (IlUInt)-1 
)

Attaches an object to the holder.

Sets attachments on the IlvGraphic object obj, in the direction dir. For details about attachments and guide, see the User's manual.

Parameters
objThe graphic object to attach.
dirThe direction in which in the object is to be attached. Valid values are IlvHorizontal and IlvVertical.
weightBeforeThe weight of the section between the graphic object and the closest guide to the left (or above if dir is IlvVertical).
objectWeightThe weight of the bounding box of the object itself.
weightAfterThe weight of the section between the graphic object and the closest guide to the right (or below if dir is IlvVertical).
guide1ndxThe left (or top) section to which the object will be attached.
guide2ndxThe right (or bottom) section to which the object will be attached.
virtual IlvBitmap* IlvGraphicHolder::getBitmap ( ) const
pure virtual

Returns the bitmap of this holder.

This bitmap is used for double buffering. If double buffering has not been enabled for this holder, this method returns 0.

Returns
The bitmap of this holder.
virtual IlvContainer* IlvGraphicHolder::getContainer ( ) const
virtual

Returns the container connected to this holder.

Returns
The container connected to this holder, or 0 if the holder is not an IlvContainerGraphicHolder.
virtual IlvDisplay* IlvGraphicHolder::getDisplay ( ) const
pure virtual

Returns the display of the holder.

Returns
The display of the holder.
virtual IlvGraphic* IlvGraphicHolder::getFocus ( ) const
pure virtual

Returns the graphic object having the keyboard focus in this holder.

Returns
The graphic object having the keyboard focus in this holder.
IlUInt IlvGraphicHolder::getGuideCardinal ( IlvDirection  dir) const

Returns the number of guides in the specified direction.

Parameters
dirThe direction. Valid directions are IlvHorizontal and IlvVertical.
Returns
The number of guides in the specified direction.
IlInt IlvGraphicHolder::getGuideLimit ( IlvDirection  dir,
IlUInt  index 
) const

Returns the minimum size of a guide in the specified direction.

Parameters
dirThe direction. Valid directions are IlvHorizontal and IlvVertical.
indexThe index of the guide.
Returns
The minimum size of a guide in the specified direction.
IlvPos IlvGraphicHolder::getGuidePosition ( IlvDirection  dir,
IlUInt  index 
) const

Returns the position of a guide in the specified direction.

Parameters
dirThe direction. Valid directions are IlvHorizontal and IlvVertical.
indexThe index of the guide.
Returns
The position of a guide in the specified direction.
IlInt IlvGraphicHolder::getGuideSize ( IlvDirection  dir,
IlUInt  index 
) const

Returns the size of a guide in the specified direction.

Parameters
dirThe direction. Valid directions are IlvHorizontal and IlvVertical.
indexThe index of the guide.
Returns
The size of a guide in the specified direction.
IlInt IlvGraphicHolder::getGuideWeight ( IlvDirection  dir,
IlUInt  index 
) const

Returns the weight of a guide in the specified direction.

Parameters
dirThe direction. Valid directions are IlvHorizontal and IlvVertical.
indexThe index of the guide.
Returns
The weight of a guide in the specified direction.
virtual IlvLookFeelHandler* IlvGraphicHolder::getLookFeelHandler ( ) const
virtual

Returns the look and feel handler of the holder.

Returns
The look and feel handler of the holder.
virtual IlvManager* IlvGraphicHolder::getManager ( ) const
virtual

Returns the manager connected to this holder.

Returns
The manager connected to this holder, or 0 if the holder is not an IlvManagerGraphicHolder.
IlvGraphicHolder* IlvGraphicHolder::getNextFocusHolder ( ) const

Returns the next holder in the focus chain.

The returned holder will be the next holder to obtain the keyboard focus when the Tab key is pressed in the last gadget of the focus chain.

Returns
The next holder in the focus chain.
virtual IlvGraphic* const* IlvGraphicHolder::getObjects ( IlUInt count) const
pure virtual

Returns an array containing all the objects of this holder.

Parameters
countThe size of the returned array.
Returns
An array containing all the objects of this holder. This array is managed by a memory pool.
IlvGraphicHolder* IlvGraphicHolder::getPreviousFocusHolder ( ) const

Returns the previous holder in the focus chain.

The returned holder will be the next holder to obtain the keyboard focus when the Shift-Tab key is pressed in the first gadget of the focus chain.

Returns
The previous holder in the focus chain.
virtual IlvTransformer* IlvGraphicHolder::getTransformer ( ) const
pure virtual

Returns the transformer of this holder.

Returns
The transformer of this holder.
virtual IlvView* IlvGraphicHolder::getView ( ) const
pure virtual

Returns the view of this holder.

Returns
The view of this holder.
virtual IlBoolean IlvGraphicHolder::isAContainer ( ) const
pure virtual

Indicates whether or not this holder is connected to a container.

Returns
IlTrue if the holder is an IlvContainerGraphicHolder or IlFalse otherwise.
virtual IlBoolean IlvGraphicHolder::isFocusAllowed ( ) const
pure virtual

Returns IlTrue if the keyboard focus navigation is enabled in this holder.

Returns
IlTrue if the keyboard focus navigation is enabled in this holder.
virtual IlBoolean IlvGraphicHolder::isVisible ( const IlvGraphic obj) const
pure virtual

Indicates if the specified graphic object is set to be visible.

Here, 'visible' does not necessarily mean that the object can be seen; it may be hidden by overlapping objects, or located beyond the visible boundaries of the holder, or the holder itself may be hidden.

Parameters
objThe graphic object.
Returns
IlTrue if the object is visible, IlFalse otherwise.
virtual void IlvGraphicHolder::moveFocusAfter ( IlBoolean  redraw = IlTrue)
pure virtual

Moves the keyboard focus to the next object.

Parameters
redrawA Boolean value specifying whether to redraw the holder or not.
virtual void IlvGraphicHolder::moveFocusBefore ( IlBoolean  redraw = IlTrue)
pure virtual

Moves the keyboard focus to the previous object.

Parameters
redrawA Boolean value specifying whether to redraw the holder or not.
void IlvGraphicHolder::removeAttachments ( IlvGraphic obj,
IlvDirection  dir 
)

Removes the attachments of an object.

Removes the attachments previously set on the IlvGraphic object obj, along the direction dir.

Parameters
objThe graphic object to detach.
dirThe direction in which in the object is to be detached. Valid values are IlvHorizontal and IlvVertical.
virtual IlBoolean IlvGraphicHolder::removeGuide ( IlvDirection  dir,
IlUInt  index 
)
virtual

Removes the specified guide from this holder.

Parameters
dirThe direction of the guide to remove. Valid directions are IlvHorizontal and IlvVertical.
indexThe index of the guide to remove.
virtual void IlvGraphicHolder::setFocus ( IlvGraphic obj = 0,
IlBoolean  redraw = IlTrue 
) const
pure virtual

Gives the keyboard focus to the specified object.

Parameters
objThe new focused object.
redrawA Boolean value specifying whether to redraw the holder or not.
Returns
The graphic object having the keyboard focus in this holder.
virtual void IlvGraphicHolder::setGrab ( IlvGraphic obj)
pure virtual

Sets the grab of this holder to obj.

After calling this method, all the events sents to this holder will be dispatched to obj.

Parameters
objThe graphic object that will grab all the events.
virtual void IlvGraphicHolder::setLookFeelHandler ( IlvLookFeelHandler lfh)
virtual

Sets the look and feel handler of the holder.

Parameters
lfhThe new look and feel handler for this holder.
void IlvGraphicHolder::setNextFocusHolder ( IlvGraphicHolder holder)

Sets the next holder in the focus chain.

holder will be the next holder to obtain the keyboard focus when the Tab key is pressed in the last gadget of the focus chain.

Parameters
holderThe next holder in the focus chain.
void IlvGraphicHolder::setPreviousFocusHolder ( IlvGraphicHolder holder)

Sets the previous holder in the focus chain.

holder will be the next holder to obtain the keyboard focus when the Tab key is pressed in the first gadget of the focus chain.

Parameters
holderThe next holder in the focus chain.
virtual void IlvGraphicHolder::setVisible ( IlvGraphic obj,
IlBoolean  visible,
IlBoolean  redraw 
)
pure virtual

Sets the visibility of the specified graphic object.

Parameters
objThe graphic object.
visibleIf IlTrue, the object is set to be visible. If IlFalse, it is set to be invisible and the holder will not draw it.
redrawIf IlTrue, the holder will redraw the object bounding box after changing its visibility.

© 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.