Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Item holder class. More...
#include <ilviews/gadgets/itemgdt.h>
Public Member Functions | |
virtual IlvGadgetItem * | applyToItems (IlvApplyGadgetItem func, IlAny arg) |
Applies the specified function to all the items of the holder. More... | |
virtual IlvGadgetItem * | createItem (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... | |
IlvGadgetItem * | getCallbackItem () const |
Returns the item that triggered a callback. More... | |
IlvGadgetItem * | getDragDropTarget () const |
Returns the target item of a drag-and-drop operation. More... | |
IlvGraphic * | getDraggedImage () const |
Returns the graphic object used to draw the ghost image during a drag-and-drop operation. More... | |
IlvGadgetItem * | getDraggedItem () const |
Returns the item that is being dragged during a drag-and-drop operation. More... | |
IlvGadgetItem * | getEditedItem () const |
Returns the item that is being edited. More... | |
virtual IlvPalette * | getHighlightTextPalette () const |
Returns the highlight palette used to draw the label of highlighted items. More... | |
virtual IlvPalette * | getInsensitivePalette () const =0 |
Returns the palette used to draw an item that is not sensitive. More... | |
virtual IlvGadgetItem * | getItemByName (const char *name) const |
Returns the item whose name is specified. More... | |
virtual IlvPalette * | getNormalTextPalette () const =0 |
Returns the default palette used to draw an item. More... | |
virtual IlvPalette * | getOpaquePalette () const |
Returns the opaque palette used to draw opaque items. More... | |
virtual IlvPalette * | getSelectionPalette () const =0 |
Returns the selection palette used to draw selected items. More... | |
virtual IlvPalette * | getSelectionTextPalette () const =0 |
Returns the selection palette used to draw the label of selected items. More... | |
IlvGadgetItem * | getToolTipItem () 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 IlSymbol * | AbortDragItemCallbackType () |
Returns the callback type of the Abort Drag callback. More... | |
static IlSymbol * | AbortEditItemCallbackType () |
Returns the callback type of the Abort Edit callback. More... | |
static IlSymbol * | ActivateCallbackType () |
Returns the callback type of the Activate callback. More... | |
static IlSymbol * | DragItemCallbackType () |
Returns the callback type of the Drag Item callback. More... | |
static IlSymbol * | EndDragItemCallbackType () |
Returns the callback type of the End Drag callback. More... | |
static IlSymbol * | EndEditItemCallbackType () |
Returns the callback type of the End Edit callback. More... | |
static IlSymbol * | StartDragItemCallbackType () |
Returns the callback type of the Start Drag callback. More... | |
static IlSymbol * | StartEditItemCallbackType () |
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 |
Item holder class.
Library: ilvgadgt
IlvGadgetItemHolder
is an abstract class used to manage IlvGadgetItem
objects.
IlvGadgetItem
, IlvListGadgetItemHolder
.
|
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.
|
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.
|
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.
item | The edited gadget item. |
|
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.
|
static |
Returns the callback type of the Activate callback.
The Activate callback is invoked when an item is activated.
|
virtual |
Applies the specified function to all the items of the holder.
func | The function to be applied. |
arg | The argument that will be passed to the function func. |
IlvApplyGadgetItem
for details. IlvApplyGadgetItem
, recomputeAllItems
, getItemByName
. Reimplemented in IlvListGadgetItemHolder, IlvMatrix, IlvMessageLabel, IlvNotebook, and IlvTreeGadgetItemHolder.
|
virtual |
Returns a new gadget item.
You can override this member function in a subclass to create your own items.
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 |
[note] If both the second and third parameters are not null, only the second parameter is used.
The created gadget item.
Reimplemented in IlvAbstractMenu, IlvFileChooserSheet, IlvFileChooserTree, IlvTreeGadget, IlvTreeGadgetItemHolder, IlvNotebook, IlvComboBox, and IlvOptionMenu.
|
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.
|
protectedvirtual |
Is called to draw the ghost image during a drag-and-drop operation.
The drawing takes place at the location specified by point.
point | The location where the ghost image is drawn, expressed in global coordinates. |
t | Not used. |
|
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.
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. |
IlvGadgetItem::draw
. Reimplemented in IlvTreeGadget, IlvStringList, IlvPopupMenu, IlvAbstractBar, IlvToolBar, IlvButton, IlvMenuBar, and IlvFrame.
|
protectedvirtual |
Is called when a drag-and-drop operation is finished.
The default implementation invokes the End Drag callback.
point | The location where the dragged item is dropped expressed in global coordinates. |
|
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.
|
protectedvirtual |
Is called after an item has been edited.
The default implementation calls the End Edit callback.
item | The edited gadget item. |
Reimplemented in IlvMatrix.
|
static |
Returns the callback type of the End Edit callback.
The End Edit callback is invoked just after the item is edited.
IlvGadgetItem* IlvGadgetItemHolder::getCallbackItem | ( | ) | const |
Returns the item that triggered a callback.
IlvGadgetItem* IlvGadgetItemHolder::getDragDropTarget | ( | ) | const |
Returns the target item of a drag-and-drop operation.
setDragDropTarget
. IlvGraphic* IlvGadgetItemHolder::getDraggedImage | ( | ) | const |
Returns the graphic object used to draw the ghost image during a drag-and-drop operation.
setDraggedImage
. IlvGadgetItem* IlvGadgetItemHolder::getDraggedItem | ( | ) | const |
Returns the item that is being dragged during a drag-and-drop operation.
setDraggedItem
. IlvGadgetItem* IlvGadgetItemHolder::getEditedItem | ( | ) | const |
Returns the item that is being edited.
0
if no item is being edited.
|
virtual |
Returns the highlight palette used to draw the label of highlighted items.
Reimplemented in IlvPopupMenu.
|
pure virtual |
Returns the palette used to draw an item that is not sensitive.
Implemented in IlvMatrix.
|
virtual |
Returns the item whose name is specified.
name | The name of the item. |
0
if the specified item cannot be found. IlvGadgetItem::setName
, applyToItems
. Reimplemented in IlvAbstractMenu.
|
pure virtual |
Returns the default palette used to draw an item.
Implemented in IlvMatrix, IlvAbstractMenu, IlvTreeGadget, IlvMessageLabel, IlvStringList, IlvNotebook, IlvComboBox, and IlvOptionMenu.
|
virtual |
Returns the opaque palette used to draw opaque items.
Reimplemented in IlvMatrix, IlvAbstractMenu, IlvTreeGadget, IlvMessageLabel, IlvStringList, IlvNotebook, IlvComboBox, and IlvOptionMenu.
|
pure virtual |
Returns the selection palette used to draw selected items.
Implemented in IlvMatrix.
|
pure virtual |
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.
0
if no tooltip is displayed.
|
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.
reDrawItems
.
|
protectedvirtual |
Is called when an item is activated.
The default implementation calls the Activate callback.
item | The activated gadget item. |
Reimplemented in IlvMatrix, IlvTreeGadget, and IlvAbstractMenu.
|
protectedvirtual |
Is called when an item is deselected.
The default implementation does nothing.
item | The deselected gadget item. |
Reimplemented in IlvTreeGadget.
|
protectedvirtual |
Is called each time the user moves the mouse during a drag-and-drop operation.
The default implementation invokes the Drag Item callback.
point | The location where the item is dragged, in global coordinates. |
|
protectedvirtual |
Is called when an item is highlighted or unhighlighted.
The default implementation does nothing.
item | The highlighted gadget item. |
|
protectedvirtual |
Is called when an item is selected.
The default implementation does nothing.
item | The selected gadget item. |
Reimplemented in IlvTreeGadget.
|
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.
IlvGadgetItem::recomputeSize
, applyToItems
. Reimplemented in IlvTreeGadget, IlvAbstractMenu, IlvPopupMenu, IlvStringList, IlvNotebook, and IlvOptionMenu.
|
virtual |
Ends a redraw session.
Redraws invalidated items after a call to initRedrawsItems
.
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.
item | The new target item. |
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.
graphic | The new graphic object used to draw the ghost image. |
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.
item | The new dragged item. |
getDraggedItem
.
|
protectedvirtual |
Is called when a drag-and-drop operation begins.
The default implementation invokes the Start Drag callback.
item | The dragged item. |
|
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.
|
protectedvirtual |
Is called when an item is edited.
The default implementation calls the Start Edit callback.
item | The edited gadget item. |
|
static |
Returns the callback type of the Start Edit callback.
The Start Edit callback is invoked just before the item is edited.
© 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.