rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvGadgetItemHolder Class Reference

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

List of all members.

Public Member Functions

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

Static Public Member Functions

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

Protected Member Functions

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

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 (  )  [protected, virtual]

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  )  [protected, virtual]

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:
item The 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:
func The function to be applied.
arg The 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 IlvListGadgetItemHolder, IlvMatrix, 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:
label The item label.
graphic The IlvGraphic object representing the picture associated with the item.
bitmap The IlvBitmap object representing the picture associated with the item.
selbitmap The IlvBitmap object representing the picture of the item when it is selected.
copy A 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, IlvComboBox, IlvFileChooserTree, IlvFileChooserSheet, IlvNotebook, IlvOptionMenu, IlvTreeGadgetItemHolder, and IlvTreeGadget.

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 
) [protected, virtual]

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

The drawing takes place at the location specified by point.

Parameters:
point The location where the ghost image is drawn, expressed in global coordinates.
t Not 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:
item The item to be redrawn.
port The destination drawing port.
rect The bounding box of the item.
t The transformer used to draw the item. Not used.
clip The clipping area.
See also:
IlvGadgetItem::draw.

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

virtual void IlvGadgetItemHolder::endDragItem ( const IlvPoint point  )  [protected, virtual]

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

The default implementation invokes the End Drag callback.

Parameters:
point The 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  )  [protected, virtual]

Is called after an item has been edited.

The default implementation calls the End Edit callback.

Parameters:
item The 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.

Reimplemented in IlvTreeGadget.

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:
name The 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 IlvAbstractMenu, IlvComboBox, IlvMatrix, IlvMessageLabel, IlvNotebook, IlvOptionMenu, IlvStringList, and IlvTreeGadget.

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 IlvAbstractMenu, IlvComboBox, IlvMatrix, IlvMessageLabel, IlvNotebook, IlvOptionMenu, IlvStringList, and IlvTreeGadget.

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  )  [protected, virtual]

Is called when an item is activated.

The default implementation calls the Activate callback.

Parameters:
item The activated gadget item.
See also:
IlvGadgetItem::activate

Reimplemented in IlvAbstractMenu, IlvMatrix, and IlvTreeGadget.

virtual void IlvGadgetItemHolder::itemDeSelected ( IlvGadgetItem item  )  [protected, virtual]

Is called when an item is deselected.

The default implementation does nothing.

Parameters:
item The deselected gadget item.
See also:
IlvGadgetItem::deSelect

Reimplemented in IlvTreeGadget.

virtual void IlvGadgetItemHolder::itemDragged ( const IlvPoint point  )  [protected, virtual]

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

The default implementation invokes the Drag Item callback.

Parameters:
point The location where the item is dragged, in global coordinates.
See also:
startDragItem, endDragItem, abortDragItem, DragItemCallbackType
virtual void IlvGadgetItemHolder::itemHighlighted ( IlvGadgetItem item  )  [protected, virtual]

Is called when an item is highlighted or unhighlighted.

The default implementation does nothing.

Parameters:
item The highlighted gadget item.
See also:
IlvGadgetItem::highlight
virtual void IlvGadgetItemHolder::itemSelected ( IlvGadgetItem item  )  [protected, virtual]

Is called when an item is selected.

The default implementation does nothing.

Parameters:
item The 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 IlvAbstractMenu, IlvPopupMenu, IlvNotebook, IlvOptionMenu, IlvStringList, and IlvTreeGadget.

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:
item The 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:
graphic The 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:
item The new dragged item.
See also:
getDraggedItem.
virtual void IlvGadgetItemHolder::startDragItem ( IlvGadgetItem item  )  [protected, virtual]

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

The default implementation invokes the Start Drag callback.

Parameters:
item The 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  )  [protected, virtual]

Is called when an item is edited.

The default implementation calls the Start Edit callback.

Parameters:
item The 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.
 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.