rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvGraphicHolder Class Reference

Holder class. More...

#include <ilviews/graphics/holder.h>

Inherited by IlvContainerGraphicHolder, and IlvSubGraphicHolder.

List of all members.

Public Member Functions

virtual IlUInt addGuide (IlvDirection dir, IlvPos pos, IlInt weight=0, IlInt limit=1)
 Adds a new guide to this holder.
virtual IlBoolean allowFocus (IlBoolean flag)=0
 Specifies whether to enable or disable keyboard focus navigation in the holder.
virtual void applyToObject (IlvGraphic *obj, IlvApplyObject f, IlAny arg, IlBoolean redraw=((IlBoolean) 1))=0
 Applies the specified function to the specified graphic object.
virtual void applyToObjects (IlvApplyObject f, IlAny arg, IlBoolean redraw=((IlBoolean) 1))
 Applies the specified function to all the objects of the holder.
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.
virtual IlvBitmapgetBitmap () const =0
 Returns the bitmap of this holder.
virtual IlvContainergetContainer () const
 Returns the container connected to this holder.
virtual IlvDisplaygetDisplay () const =0
 Returns the display of the holder.
virtual IlvGraphicgetFocus () const =0
 Returns the graphic object having the keyboard focus in this holder.
IlUInt getGuideCardinal (IlvDirection dir) const
 Returns the number of guides in the specified direction.
IlInt getGuideLimit (IlvDirection dir, IlUInt index) const
 Returns the minimum size of a guide in the specified direction.
IlvPos getGuidePosition (IlvDirection dir, IlUInt index) const
 Returns the position of a guide in the specified direction.
IlInt getGuideSize (IlvDirection dir, IlUInt index) const
 Returns the size of a guide in the specified direction.
IlInt getGuideWeight (IlvDirection dir, IlUInt index) const
 Returns the weight of a guide in the specified direction.
virtual IlvLookFeelHandlergetLookFeelHandler () const
 Returns the look and feel handler of the holder.
virtual IlvManager * getManager () const
 Returns the manager connected to this holder.
IlvGraphicHoldergetNextFocusHolder () const
 Returns the next holder in the focus chain.
virtual IlvGraphic *const * getObjects (IlUInt &count) const =0
 Returns an array containing all the objects of this holder.
IlvGraphicHoldergetPreviousFocusHolder () const
 Returns the previous holder in the focus chain.
virtual IlvTransformergetTransformer () const =0
 Returns the transformer of this holder.
virtual IlvViewgetView () const =0
 Returns the view of this holder.
virtual IlBoolean isAContainer () const =0
 Indicates whether or not this holder is connected to a container.
virtual IlBoolean isFocusAllowed () const =0
 Returns IlTrue if the keyboard focus navigation is enabled in this holder.
virtual void moveFocusAfter (IlBoolean redraw=((IlBoolean) 1))=0
 Moves the keyboard focus to the next object.
virtual void moveFocusBefore (IlBoolean redraw=((IlBoolean) 1))=0
 Moves the keyboard focus to the previous object.
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.
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.
virtual void setFocus (IlvGraphic *obj=0, IlBoolean redraw=((IlBoolean) 1)) const =0
 Gives the keyboard focus to the specified object.
virtual void setGrab (IlvGraphic *obj)=0
 Sets the grab of this holder to obj.
virtual void setLookFeelHandler (IlvLookFeelHandler *)
 Sets the look and feel handler of the holder.
void setNextFocusHolder (IlvGraphicHolder *holder)
 Sets the next holder in the focus chain.
void setPreviousFocusHolder (IlvGraphicHolder *holder)
 Sets the previous holder in the focus chain.

Detailed Description

Holder class.

Library: views

The class IlvGraphicHolder is used to make an abstraction of a gadget container or a gadget manager. This class has subclasses which are used depending on the working context. Using the IlvGraphicHolder allows the user to perform many operations without knowing if these operations will be performed on a gadget container (IlvGadgetContainer) or on a gadget manager (IlvGadgetManager).

Every gadget container and gadget manager has a pointer to an IlvGraphicHolder instance, and each gadget of this container or manager has a pointer to the same IlvGraphicHolder instance. You can thus perform, for example, redraw operations on a gadget without knowing if this gadget is contained inside a gadget container or inside a gadget manager. A gadget determine which holder it is located in by using the method IlvGraphic::getHolder.

See also:
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:
dir The direction of the new guide. Valid directions are IlvHorizontal and IlvVertical.
pos The initial position of the guide.
weight The weight of the new guide.
limit The 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:
flag A Boolean value specifying whether the keyboard focus is enabled or disabled.
virtual void IlvGraphicHolder::applyToObject ( IlvGraphic obj,
IlvApplyObject  f,
IlAny  arg,
IlBoolean  redraw = ((IlBoolean) 1) 
) [pure virtual]

Applies the specified function to the specified graphic object.

Parameters:
obj The graphic object.
f The function to apply.
arg The argument that will be passed to f.
redraw A Boolean value specifying whether to redraw the holder or not.
virtual void IlvGraphicHolder::applyToObjects ( IlvApplyObject  f,
IlAny  arg,
IlBoolean  redraw = ((IlBoolean) 1) 
) [virtual]

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

Parameters:
f The function to apply.
arg The argument that will be passed to f.
redraw A 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:
obj The graphic object to attach.
dir The direction in which in the object is to be attached. Valid values are IlvHorizontal and IlvVertical.
weightBefore The weight of the section between the graphic object and the closest guide to the left (or above if dir is IlvVertical).
objectWeight The weight of the bounding box of the object itself.
weightAfter The weight of the section between the graphic object and the closest guide to the right (or below if dir is IlvVertical).
guide1ndx The left (or top) section to which the object will be attached.
guide2ndx The 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:
dir The 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:
dir The direction. Valid directions are IlvHorizontal and IlvVertical.
index The 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:
dir The direction. Valid directions are IlvHorizontal and IlvVertical.
index The 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:
dir The direction. Valid directions are IlvHorizontal and IlvVertical.
index The 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:
dir The direction. Valid directions are IlvHorizontal and IlvVertical.
index The 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:
count The 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 void IlvGraphicHolder::moveFocusAfter ( IlBoolean  redraw = ((IlBoolean) 1)  )  [pure virtual]

Moves the keyboard focus to the next object.

Parameters:
redraw A Boolean value specifying whether to redraw the holder or not.
virtual void IlvGraphicHolder::moveFocusBefore ( IlBoolean  redraw = ((IlBoolean) 1)  )  [pure virtual]

Moves the keyboard focus to the previous object.

Parameters:
redraw A 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:
obj The graphic object to detach.
dir The 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:
dir The direction of the guide to remove. Valid directions are IlvHorizontal and IlvVertical.
index The index of the guide to remove.
virtual void IlvGraphicHolder::setFocus ( IlvGraphic obj = 0,
IlBoolean  redraw = ((IlBoolean) 1) 
) const [pure virtual]

Gives the keyboard focus to the specified object.

Parameters:
obj The new focused object.
redraw A 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:
obj The graphic object that will grab all the events.
virtual void IlvGraphicHolder::setLookFeelHandler ( IlvLookFeelHandler  )  [virtual]

Sets the look and feel handler of the holder.

Parameters:
The 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:
holder The 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:
holder The next holder in the focus chain.
 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.