rwlogo

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 | Protected Member Functions | Friends
IlvGadgetItemHolder Class Referenceabstract

Item holder class. More...

#include <ilviews/gadgets/itemgdt.h>

Inheritance diagram for IlvGadgetItemHolder:
IlvListGadgetItemHolder IlvMatrix IlvMessageLabel IlvNotebook IlvTreeGadgetItemHolder IlvAbstractMenu IlvComboBox IlvOptionMenu IlvStringList IlvSheet IlvButton IlvFrame IlvTreeGadget

Public Member Functions

virtual IlvGadgetItemapplyToItems (IlvApplyGadgetItem func, IlAny arg)
 Applies the specified function to all the items of the holder. More...
 
virtual IlvGadgetItemcreateItem (const char *label, IlvGraphic *graphic=0, IlvBitmap *bitmap=0, IlvBitmap *selbitmap=0, IlBoolean copy=IlTrue) const
 Returns a new gadget item. More...
 
virtual void drawGadgetItem (const IlvGadgetItem *item, IlvPort *port, const IlvRect &rect, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws a specific gadget item. More...
 
IlvGadgetItemgetCallbackItem () const
 Returns the item that triggered a callback. More...
 
IlvGadgetItemgetDragDropTarget () const
 Returns the target item of a drag-and-drop operation. More...
 
IlvGraphicgetDraggedImage () const
 Returns the graphic object used to draw the ghost image during a drag-and-drop operation. More...
 
IlvGadgetItemgetDraggedItem () const
 Returns the item that is being dragged during a drag-and-drop operation. More...
 
IlvGadgetItemgetEditedItem () const
 Returns the item that is being edited. More...
 
virtual IlvPalettegetHighlightTextPalette () const
 Returns the highlight palette used to draw the label of highlighted items. More...
 
virtual IlvPalettegetInsensitivePalette () const =0
 Returns the palette used to draw an item that is not sensitive. More...
 
virtual IlvGadgetItemgetItemByName (const char *name) const
 Returns the item whose name is specified. More...
 
virtual IlvPalettegetNormalTextPalette () const =0
 Returns the default palette used to draw an item. More...
 
virtual IlvPalettegetOpaquePalette () const
 Returns the opaque palette used to draw opaque items. More...
 
virtual IlvPalettegetSelectionPalette () const =0
 Returns the selection palette used to draw selected items. More...
 
virtual IlvPalettegetSelectionTextPalette () const =0
 Returns the selection palette used to draw the label of selected items. More...
 
IlvGadgetItemgetToolTipItem () const
 Returns the item that is displaying a tooltip. More...
 
virtual void initReDrawItems ()
 Begins a redraw session. More...
 
virtual void recomputeAllItems ()
 Recomputes the size of all the items managed by the holder. More...
 
virtual void reDrawItems ()
 Ends a redraw session. More...
 
void setDragDropTarget (IlvGadgetItem *item)
 Sets the target item of a drag-and-drop operation. More...
 
void setDraggedImage (IlvGraphic *graphic)
 Sets the graphic object used to draw the ghost image during a drag-and-drop operation. More...
 
void setDraggedItem (IlvGadgetItem *item)
 Sets the dragged item. More...
 

Static Public Member Functions

static IlSymbolAbortDragItemCallbackType ()
 Returns the callback type of the Abort Drag callback. More...
 
static IlSymbolAbortEditItemCallbackType ()
 Returns the callback type of the Abort Edit callback. More...
 
static IlSymbolActivateCallbackType ()
 Returns the callback type of the Activate callback. More...
 
static IlSymbolDragItemCallbackType ()
 Returns the callback type of the Drag Item callback. More...
 
static IlSymbolEndDragItemCallbackType ()
 Returns the callback type of the End Drag callback. More...
 
static IlSymbolEndEditItemCallbackType ()
 Returns the callback type of the End Edit callback. More...
 
static IlSymbolStartDragItemCallbackType ()
 Returns the callback type of the Start Drag callback. More...
 
static IlSymbolStartEditItemCallbackType ()
 Returns the callback type of the Start Edit callback. More...
 

Protected Member Functions

virtual void abortDragItem ()
 Is called when a drag-and-drop operation is aborted. More...
 
virtual void abortEdit (IlvGadgetItem *item)
 Is called when the editing of the specified item is aborted. More...
 
virtual void drawDraggedImage (const IlvPoint &point, const IlvTransformer *t)
 Is called to draw the ghost image during a drag-and-drop operation. More...
 
virtual void endDragItem (const IlvPoint &point)
 Is called when a drag-and-drop operation is finished. More...
 
virtual void endEdit (IlvGadgetItem *item)
 Is called after an item has been edited. More...
 
virtual void itemActivated (IlvGadgetItem *item)
 Is called when an item is activated. More...
 
virtual void itemDeSelected (IlvGadgetItem *item)
 Is called when an item is deselected. More...
 
virtual void itemDragged (const IlvPoint &point)
 Is called each time the user moves the mouse during a drag-and-drop operation. More...
 
virtual void itemHighlighted (IlvGadgetItem *item)
 Is called when an item is highlighted or unhighlighted. More...
 
virtual void itemSelected (IlvGadgetItem *item)
 Is called when an item is selected. More...
 
virtual void startDragItem (IlvGadgetItem *item)
 Is called when a drag-and-drop operation begins. More...
 
virtual void startEdit (IlvGadgetItem *item)
 Is called when an item is edited. More...
 

Friends

class IlvGadgetItem
 

Detailed Description

Item holder class.

Library: ilvgadgt

IlvGadgetItemHolder is an abstract class used to manage IlvGadgetItem objects.

See Also
IlvGadgetItem, IlvListGadgetItemHolder.

Member Function Documentation

virtual void IlvGadgetItemHolder::abortDragItem ( )
protectedvirtual

Is called when a drag-and-drop operation is aborted.

This member function is called when the users cancels a drag-and-drop operation by pressing the Escape key. Its default implementation calls the Abort Drag callback.

See Also
startDragItem, endDragItem, AbortDragItemCallbackType, getDraggedItem
static IlSymbol* IlvGadgetItemHolder::AbortDragItemCallbackType ( )
static

Returns the callback type of the Abort Drag callback.

The Abort Drag callback is invoked when the use presses the Escape key during a drag-and-drop operation.

Returns
The callback type of the Abort Drag callback.
See Also
StartDragItemCallbackType, DragItemCallbackType, abortDragItem
virtual void IlvGadgetItemHolder::abortEdit ( IlvGadgetItem item)
protectedvirtual

Is called when the editing of the specified item is aborted.

This member function is called when the users cancels editing by pressing the Escape key. Its default implementation calls the Abort Edit callback.

Parameters
itemThe edited gadget item.
See Also
startEdit, endEdit, AbortEditItemCallbackType
static IlSymbol* IlvGadgetItemHolder::AbortEditItemCallbackType ( )
static

Returns the callback type of the Abort Edit callback.

The Abort Edit callback is invoked when the use presses the Escape key while editing an item.

Returns
The callback type of the Abort Edit callback.
See Also
StartEditItemCallbackType, EndEditItemCallbackType.
static IlSymbol* IlvGadgetItemHolder::ActivateCallbackType ( )
static

Returns the callback type of the Activate callback.

The Activate callback is invoked when an item is activated.

Returns
The callback type of the Activate callback.
See Also
itemActivated
virtual IlvGadgetItem* IlvGadgetItemHolder::applyToItems ( IlvApplyGadgetItem  func,
IlAny  arg 
)
virtual

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

Parameters
funcThe function to be applied.
argThe argument that will be passed to the function func.
Returns
The item that stopped the operation. See IlvApplyGadgetItem for details.
See Also
IlvApplyGadgetItem, recomputeAllItems, getItemByName.

Reimplemented in IlvMatrix, IlvListGadgetItemHolder, IlvMessageLabel, IlvNotebook, and IlvTreeGadgetItemHolder.

virtual IlvGadgetItem* IlvGadgetItemHolder::createItem ( const char *  label,
IlvGraphic graphic = 0,
IlvBitmap bitmap = 0,
IlvBitmap selbitmap = 0,
IlBoolean  copy = IlTrue 
) const
virtual

Returns a new gadget item.

You can override this member function in a subclass to create your own items.

Parameters
labelThe item label.
graphicThe IlvGraphic object representing the picture associated with the item.
bitmapThe IlvBitmap object representing the picture associated with the item.
selbitmapThe IlvBitmap object representing the picture of the item when it is selected.
copyA Boolean value specifying whether a label should be copied. If the value is IlFalse, then you must allocate some memory for the label because in any case the label characters are deleted from the memory by the IlvGadgetItem.
Warning
[note] If both the second and third parameters are not null, only the second parameter is used.
Returns
The created gadget item.

Reimplemented in IlvAbstractMenu, IlvFileChooserSheet, IlvFileChooserTree, IlvTreeGadget, IlvTreeGadgetItemHolder, IlvNotebook, IlvComboBox, and IlvOptionMenu.

static IlSymbol* IlvGadgetItemHolder::DragItemCallbackType ( )
static

Returns the callback type of the Drag Item callback.

The Drag Item callback is invoked each time the user moves the mouse during a drag-and-drop operation.

Returns
The callback type of the Drag Item callback.
See Also
StartDragItemCallbackType, EndDragItemCallbackType, itemDragged
virtual void IlvGadgetItemHolder::drawDraggedImage ( const IlvPoint point,
const IlvTransformer t 
)
protectedvirtual

Is called to draw the ghost image during a drag-and-drop operation.

The drawing takes place at the location specified by point.

Parameters
pointThe location where the ghost image is drawn, expressed in global coordinates.
tNot used.
See Also
startDragItem, endDragItem, getDraggedItem
virtual void IlvGadgetItemHolder::drawGadgetItem ( const IlvGadgetItem item,
IlvPort port,
const IlvRect rect,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const
virtual

Draws a specific gadget item.

Redraws item in port at the location specified by rect using the clipping area clip. This method simply calls IlvGadgetItem::draw using the item instance.

Parameters
itemThe item to be redrawn.
portThe destination drawing port.
rectThe bounding box of the item.
tThe transformer used to draw the item. Not used.
clipThe clipping area.
See Also
IlvGadgetItem::draw.

Reimplemented in IlvTreeGadget, IlvStringList, IlvPopupMenu, IlvAbstractBar, IlvToolBar, IlvButton, IlvMenuBar, and IlvFrame.

virtual void IlvGadgetItemHolder::endDragItem ( const IlvPoint point)
protectedvirtual

Is called when a drag-and-drop operation is finished.

The default implementation invokes the End Drag callback.

Parameters
pointThe location where the dragged item is dropped expressed in global coordinates.
See Also
startDragItem, abortDragItem, EndDragItemCallbackType, getDraggedItem
static IlSymbol* IlvGadgetItemHolder::EndDragItemCallbackType ( )
static

Returns the callback type of the End Drag callback.

The End Drag callback is invoked at the end of a drag-and-drop operation.

Returns
The callback type of the End Drag callback.
See Also
StartDragItemCallbackType, DragItemCallbackType, endDragItem
virtual void IlvGadgetItemHolder::endEdit ( IlvGadgetItem item)
protectedvirtual

Is called after an item has been edited.

The default implementation calls the End Edit callback.

Parameters
itemThe edited gadget item.
See Also
startEdit, abortEdit, EndEditItemCallbackType

Reimplemented in IlvMatrix.

static IlSymbol* IlvGadgetItemHolder::EndEditItemCallbackType ( )
static

Returns the callback type of the End Edit callback.

The End Edit callback is invoked just after the item is edited.

Returns
The callback type of the End Edit callback.
See Also
StartEditItemCallbackType., AbortEditItemCallbackType.
IlvGadgetItem* IlvGadgetItemHolder::getCallbackItem ( ) const

Returns the item that triggered a callback.

Returns
The item that triggered the callback. The returned item is valid only inside the callback.
IlvGadgetItem* IlvGadgetItemHolder::getDragDropTarget ( ) const

Returns the target item of a drag-and-drop operation.

Returns
A pointer to the target item of a drag-and-drop operation.
See Also
setDragDropTarget.
IlvGraphic* IlvGadgetItemHolder::getDraggedImage ( ) const

Returns the graphic object used to draw the ghost image during a drag-and-drop operation.

Returns
The graphic object used to draw the ghost image during a drag-and-drop operation.
See Also
setDraggedImage.
IlvGadgetItem* IlvGadgetItemHolder::getDraggedItem ( ) const

Returns the item that is being dragged during a drag-and-drop operation.

Returns
The item that is being dragged during a drag-and-drop operation.
See Also
setDraggedItem.
IlvGadgetItem* IlvGadgetItemHolder::getEditedItem ( ) const

Returns the item that is being edited.

Returns
The item that is being edited. Returns 0 if no item is being edited.
virtual IlvPalette* IlvGadgetItemHolder::getHighlightTextPalette ( ) const
virtual

Returns the highlight palette used to draw the label of highlighted items.

Returns
The palette used to draw the label of highlighted items.

Reimplemented in IlvPopupMenu.

virtual IlvPalette* IlvGadgetItemHolder::getInsensitivePalette ( ) const
pure virtual

Returns the palette used to draw an item that is not sensitive.

Returns
The palette used to draw an item that is not sensitive.

Implemented in IlvMatrix.

virtual IlvGadgetItem* IlvGadgetItemHolder::getItemByName ( const char *  name) const
virtual

Returns the item whose name is specified.

Parameters
nameThe name of the item.
Returns
The item found or 0 if the specified item cannot be found.
See Also
IlvGadgetItem::setName, applyToItems.

Reimplemented in IlvAbstractMenu.

virtual IlvPalette* IlvGadgetItemHolder::getNormalTextPalette ( ) const
pure virtual

Returns the default palette used to draw an item.

Returns
The default palette used to draw an item.

Implemented in IlvMatrix, IlvAbstractMenu, IlvTreeGadget, IlvMessageLabel, IlvStringList, IlvNotebook, IlvComboBox, and IlvOptionMenu.

virtual IlvPalette* IlvGadgetItemHolder::getOpaquePalette ( ) const
virtual

Returns the opaque palette used to draw opaque items.

Returns
The opaque palette used to draw opaque items.

Reimplemented in IlvMatrix, IlvAbstractMenu, IlvTreeGadget, IlvMessageLabel, IlvStringList, IlvNotebook, IlvComboBox, and IlvOptionMenu.

virtual IlvPalette* IlvGadgetItemHolder::getSelectionPalette ( ) const
pure virtual

Returns the selection palette used to draw selected items.

Returns
The selection palette used to draw selected items.

Implemented in IlvMatrix.

virtual IlvPalette* IlvGadgetItemHolder::getSelectionTextPalette ( ) const
pure virtual

Returns the selection palette used to draw the label of selected items.

Returns
The selection palette used to draw the label of selected items.

Implemented in IlvMatrix.

IlvGadgetItem* IlvGadgetItemHolder::getToolTipItem ( ) const

Returns the item that is displaying a tooltip.

Returns
The item that is displaying a tooltip. Returns 0 if no tooltip is displayed.
virtual void IlvGadgetItemHolder::initReDrawItems ( )
virtual

Begins a redraw session.

Redrawing is performed with the member function IlvGadgetItemHolder::reDrawItems, which allows you to group drawing operations. Calls to IlvGadgetItemHolder::initRedrawsItems can be nested.

See Also
reDrawItems.
virtual void IlvGadgetItemHolder::itemActivated ( IlvGadgetItem item)
protectedvirtual

Is called when an item is activated.

The default implementation calls the Activate callback.

Parameters
itemThe activated gadget item.
See Also
IlvGadgetItem::activate

Reimplemented in IlvMatrix, IlvTreeGadget, and IlvAbstractMenu.

virtual void IlvGadgetItemHolder::itemDeSelected ( IlvGadgetItem item)
protectedvirtual

Is called when an item is deselected.

The default implementation does nothing.

Parameters
itemThe deselected gadget item.
See Also
IlvGadgetItem::deSelect

Reimplemented in IlvTreeGadget.

virtual void IlvGadgetItemHolder::itemDragged ( const IlvPoint point)
protectedvirtual

Is called each time the user moves the mouse during a drag-and-drop operation.

The default implementation invokes the Drag Item callback.

Parameters
pointThe location where the item is dragged, in global coordinates.
See Also
startDragItem, endDragItem, abortDragItem, DragItemCallbackType
virtual void IlvGadgetItemHolder::itemHighlighted ( IlvGadgetItem item)
protectedvirtual

Is called when an item is highlighted or unhighlighted.

The default implementation does nothing.

Parameters
itemThe highlighted gadget item.
See Also
IlvGadgetItem::highlight
virtual void IlvGadgetItemHolder::itemSelected ( IlvGadgetItem item)
protectedvirtual

Is called when an item is selected.

The default implementation does nothing.

Parameters
itemThe selected gadget item.
See Also
IlvGadgetItem::select

Reimplemented in IlvTreeGadget.

virtual void IlvGadgetItemHolder::recomputeAllItems ( )
virtual

Recomputes the size of all the items managed by the holder.

Calls the IlvGadgetItem::recomputeSize member function for all the items managed by this holder.

See Also
IlvGadgetItem::recomputeSize, applyToItems.

Reimplemented in IlvTreeGadget, IlvAbstractMenu, IlvPopupMenu, IlvStringList, IlvNotebook, and IlvOptionMenu.

virtual void IlvGadgetItemHolder::reDrawItems ( )
virtual

Ends a redraw session.

Redraws invalidated items after a call to initRedrawsItems.

See Also
initRedrawsItems.
void IlvGadgetItemHolder::setDragDropTarget ( IlvGadgetItem item)

Sets the target item of a drag-and-drop operation.

Sets item as the target item of a drag-and-drop operation. Note that the target of a drag-and-drop operation is not automatically set when dragging an item. Setting an item as the target of a drag-and-drop operation simply modifies the way it is drawn by making it appear as if it were selected. This feature can be used to give a feedback to the user during a drag-and- drop operation.

Parameters
itemThe new target item.
See Also
getDragDropTarget.
void IlvGadgetItemHolder::setDraggedImage ( IlvGraphic graphic)

Sets the graphic object used to draw the ghost image during a drag-and-drop operation.

If you do not provide a ghost image, a default ghost image is used. Note that if there was already a graphic object used to draw the ghost image, this object is deleted.

Parameters
graphicThe new graphic object used to draw the ghost image.
See Also
getDraggedImage.
void IlvGadgetItemHolder::setDraggedItem ( IlvGadgetItem item)

Sets the dragged item.

Changes the item that is being dragged. Usually, you do not have to call this member function, except for stopping a drag-and-drop operation. In this case, call it with 0 as its parameter.

Parameters
itemThe new dragged item.
See Also
getDraggedItem.
virtual void IlvGadgetItemHolder::startDragItem ( IlvGadgetItem item)
protectedvirtual

Is called when a drag-and-drop operation begins.

The default implementation invokes the Start Drag callback.

Parameters
itemThe dragged item.
See Also
StartDragItemCallbackType, abortDragItem, endDragItem, getDraggedItem
static IlSymbol* IlvGadgetItemHolder::StartDragItemCallbackType ( )
static

Returns the callback type of the Start Drag callback.

The Start Drag callbak is invoked at the beginning of a drag-and-drop operation.

Returns
The callback type of the Start Drag callback.
See Also
EndDragItemCallbackType, DragItemCallbackType, startDragItem
virtual void IlvGadgetItemHolder::startEdit ( IlvGadgetItem item)
protectedvirtual

Is called when an item is edited.

The default implementation calls the Start Edit callback.

Parameters
itemThe edited gadget item.
See Also
abortEdit, endEdit, StartEditItemCallbackType
static IlSymbol* IlvGadgetItemHolder::StartEditItemCallbackType ( )
static

Returns the callback type of the Start Edit callback.

The Start Edit callback is invoked just before the item is edited.

Returns
The callback type of the Start Edit callback.
See Also
EndEditItemCallbackType, AbortEditItemCallbackType.

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