rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvGadgetItem Class Reference

Gadget Item class. More...

#include <ilviews/gadgets/itemgdt.h>

Inheritance diagram for IlvGadgetItem:
IlvMenuItem IlvPathGadgetItem IlvTreeGadgetItem IlvMenuItemPath IlvTreePathGadgetItem

List of all members.

Public Member Functions

 IlvGadgetItem (IlvBitmap *bitmap)
 Constructor.
 IlvGadgetItem (IlvGraphic *graphic)
 Constructor.
 IlvGadgetItem (const char *label, IlvGraphic *graphic, IlvPosition position=IlvRight, IlUShort spacing=4, IlBoolean copy=IlTrue)
 Constructor.
 IlvGadgetItem (const char *label, IlvBitmap *bitmap=0, IlvPosition position=IlvRight, IlUShort spacing=4, IlBoolean copy=IlTrue)
 Constructor.
virtual void activate ()
 Activates the item.
virtual IlvGadgetItemcopy () const
 Copies this object.
virtual void deSelect ()
 Deselects the item.
virtual void draw (IlvPort *dst, const IlvRect &rect, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Is called to draw the item.
virtual void drawLabel (IlvPort *dst, IlvPalette *palette, const IlvRect &rect, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Is called to draw the item label.
virtual void drawPicture (IlvPort *dst, const IlvRect &rect, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Is called to draw the item picture.
virtual void edit ()
 Edits the item label.
IlvBitmapgetBitmap (const IlSymbol *symbol) const
 Returns the bitmap corresponding to the specified symbol.
IlvBitmapgetBitmap (IlUShort index=(IlUShort) 0) const
 Returns the bitmap whose index is specified.
IlUShort getBitmapCount () const
 Returns the number of bitmaps used by this item.
virtual IlUInt getBitmapMask () const
 Returns the bitmap mask of the item.
IlAny getClientData () const
 Returns the client data of the item.
virtual IlvBitmapgetCurrentBitmap () const
 Returns the bitmap that is currently displayed by the item.
IlvGraphicgetGraphic () const
 Returns the IlvGraphic object associated with this item.
virtual IlUShort getHeight () const
 Returns the item height.
virtual IlvPalettegetHighlightTextPalette () const
 Returns the palette used to draw the label of highlighted items.
IlvGadgetItemHoldergetHolder () const
 Returns the item holder.
virtual IlvPalettegetInsensitivePalette () const
 Returns the palette used to draw a nonsensitive item.
const char * getLabel () const
 Returns the item label.
IlvAlignment getLabelAlignment () const
 Returns the label alignment.
void getLabelOrientation (IlvOrientation &orientation, IlBoolean &flip) const
 Returns the orientation of the item label.
IlvPosition getLabelPosition () const
 Returns the position of the label relative to the picture.
virtual const char * getMessage () const
 Returns the message of the item.
char getMnemonic () const
 Returns the mnemonic letter associated with the item.
const char * getName () const
 Returns the item name.
IlvNamedPropertygetNamedProperty (const IlSymbol *name) const
 Returns the property whose name is specified.
virtual IlvPalettegetNormalTextPalette () const
 Returns the default palette used to draw an item.
virtual IlvPalettegetOpaquePalette () const
 Returns the palette that is used to draw opaque items.
IlAny getProperty (const IlSymbol *key) const
 Returns the object property whose symbol is provided as the parameter.
virtual IlvPalettegetSelectionPalette () const
 Returns the palette used to draw selected items.
virtual IlvPalettegetSelectionTextPalette () const
 Returns the palette used to draw the label of selected items.
IlUShort getSpacing () const
 Returns the spacing between the label and the picture of the item.
virtual IlUShort getWidth () const
 Returns the item width.
IlBoolean hasProperty (const IlSymbol *key) const
 Indicates whether the item has the property whose symbol is specified.
virtual void highlight (IlBoolean value=IlTrue)
 Highlights the item.
IlBoolean isDragDropTarget () const
 Returns a Boolean value specifying whether the item is the target of a drag-and-drop operation.
IlBoolean isEditable () const
 Indicates whether the item can be edited.
IlBoolean isHighlighted () const
 Indicates whether the item is highlighted.
IlBoolean isOpaque () const
 Indicates whether the item is opaque.
virtual IlBoolean isSelectable () const
 Indicates whether the item can be selected.
IlBoolean isSelected () const
 Indicates whether the item is selected.
IlBoolean isSensitive () const
 Indicates whether the item is sensitive.
IlBoolean isShowingLabel () const
 Indicates whether the item label is visible.
IlBoolean isShowingPicture () const
 Indicates whether the item picture is visible.
virtual void itemRect (IlvRect &rect, const IlvRect &bbox) const
 Returns the item bounding bbox.
virtual void labelRect (IlvRect &rect, const IlvRect &bbox) const
 Returns the bounding box of the item label.
virtual void pictureRect (IlvRect &rect, const IlvRect &bbox) const
 Returns the bounding bbox of the item picture.
virtual void recomputeSize (IlBoolean redraw=IlTrue)
 Recomputes the item geometry.
void removeAllBitmaps ()
 Removes all the bitmaps associated with the item.
IlvNamedPropertyremoveNamedProperty (IlSymbol *name)
 Removes the specified named property from the object.
IlBoolean removeProperty (const IlSymbol *key)
 Removes a property from the object.
virtual void select ()
 Selects the item.
virtual void selectionRect (IlvRect &rect, const IlvRect &bbox) const
 Returns the bounding box of the item selection.
void setBitmap (IlvBitmap *bitmap)
 Sets the sensitive bitmap of the item.
void setBitmap (const IlSymbol *symbol, IlvBitmap *bitmap)
 Sets the specified bitmap to the item using the specified symbol.
void setBitmap (IlUShort index, IlvBitmap *bitmap)
 Sets the specified bitmap to the item at the specified index.
void setClientData (IlAny data)
 Sets the new client data for this item.
void setEditable (IlBoolean value)
 Specifies whether the item should be editable.
void setGraphic (IlvGraphic *graphic)
 Specifies the graphic object associated with this item.
virtual void setHighlightTextPalette (IlvPalette *palette)
 Sets the palette used to draw the label of highlighted items.
void setLabel (const char *label, IlBoolean copy=IlTrue)
 Sets the item label.
void setLabelAlignment (IlvAlignment alignment)
 Sets the label alignment.
void setLabelOrientation (IlvOrientation orientation, IlBoolean flip=IlFalse)
 Sets the orientation of the item label.
void setLabelPosition (IlvPosition position)
 Sets the label position relative to the picture.
void setName (const char *name)
 Sets the item name.
IlvNamedPropertysetNamedProperty (IlvNamedProperty *property)
 Sets the specified named property to the object.
virtual void setNormalTextPalette (IlvPalette *palette)
 Sets the default palette used to draw an item.
void setOpaque (IlBoolean value)
 Specifies whether the item should be opaque.
virtual void setOpaquePalette (IlvPalette *palette)
 Sets the palette used to draw opaque items.
void setProperty (const IlSymbol *key, IlAny value)
 Sets the property whose symbol is specified to the item.
virtual void setSelectionTextPalette (IlvPalette *palette)
 Sets the palette used to draw the label of selected items.
void setSensitive (IlBoolean value)
 Specifies whether the item should be sensitive or not.
void setSpacing (IlUShort spacing)
 Sets the spacing between the label and the picture of the item.
void showLabel (IlBoolean value=IlTrue)
 Specifies whether the item label should be shown.
void showPicture (IlBoolean value=IlTrue)
 Specifies whether the item picture should be shown.
virtual void write (IlvOutputFile &file) const
 Writes an object description to a file.

Static Public Member Functions

static void AddItemBitmapSymbol (const IlSymbol *symbol, IlUShort index)
 Links a new bitmap symbol with the specified index.
static IlSymbolBitmapSymbol ()
 Returns the symbol associated with the sensitive bitmap.
static IlShort GetItemBitmapIndex (const IlSymbol *symbol)
 Returns the index corresponding to the specified symbol.
static IlSymbolGetItemBitmapSymbol (IlUShort index)
 Returns the symbol corresponding to the specified index.
static IlSymbolHighlightedBitmapSymbol ()
 Returns the symbol associated with the highlighted bitmap.
static IlSymbolInsensitiveBitmapSymbol ()
 Returns the symbol associated with the nonsensitive bitmap.
static IlvGadgetItemreadItem (IlvInputFile &file, IlvDisplay *display)
 Reads an object description from a file.
static IlSymbolSelectedBitmapSymbol ()
 Returns the symbol associated with the selected bitmap.

Protected Member Functions

virtual void computeRects (IlvRect &labelRect, IlvRect &pictureRect) const
 Computes the label and picture bounding boxes.
virtual void computeSize (IlUShort &width, IlUShort &height) const
 Computes the item size.

Friends

class IlvGadgetItemHolder

Detailed Description

Gadget Item class.

Library: ilvgadgt

IlvGadgetItem is the base class for items used in gadget classes such as IlvAbstractMenu, IlvStringList, IlvTreeGadget, and IlvMatrix. IlvGadgetItem objects can display a text and a picture. The picture can be an IlvGraphic object or a bitmap. If it is a bitmap, you can specify several bitmaps, each corresponding to different item states, such as selected or highlighted.

See also:
IlvGadgetItemHolder, IlvGadgetItemMatrixItem, IlvMenuItem, IlvTreeGadgetItem, IlvBitmap, IlvGraphic

Constructor & Destructor Documentation

IlvGadgetItem::IlvGadgetItem ( const char *  label,
IlvBitmap bitmap = 0,
IlvPosition  position = IlvRight,
IlUShort  spacing = 4,
IlBoolean  copy = IlTrue 
)

Constructor.

Initializes a new instance of the IlvGadgetItem class. This constructor allows you to specify both a label and a bitmap, as well as their relative alignment and spacing. The bitmap is locked.

Parameters:
label The item label.
bitmap The sensitive bitmap of the item.
position The label position relative to the picture.
spacing The spacing between the label and the picture.
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.
IlvGadgetItem::IlvGadgetItem ( const char *  label,
IlvGraphic graphic,
IlvPosition  position = IlvRight,
IlUShort  spacing = 4,
IlBoolean  copy = IlTrue 
)

Constructor.

Initializes a new instance of the IlvGadgetItem class. This constructor allows you to specify both a label and a graphic, as well as their relative alignment and spacing.

Parameters:
label The item label.
graphic The item picture.
position The label position relative to the picture.
spacing The spacing between the label and the picture.
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.
IlvGadgetItem::IlvGadgetItem ( IlvGraphic graphic  ) 

Constructor.

Initializes a new instance of the IlvGadgetItem class. This constructor allows you to create an item represented by a graphic object.

Parameters:
graphic The item picture.
IlvGadgetItem::IlvGadgetItem ( IlvBitmap bitmap  ) 

Constructor.

Initializes a new instance of the IlvGadgetItem class. This constructor allows you to create an item represented by a bitmap. The bitmap is locked.

Parameters:
bitmap The sensitive bitmap of the item.

Member Function Documentation

virtual void IlvGadgetItem::activate (  )  [virtual]

Activates the item.

The default implementation calls the holder method IlvGadgetItemHolder::itemActivated.

See also:
IlvGadgetItemHolder::itemActivated
static void IlvGadgetItem::AddItemBitmapSymbol ( const IlSymbol symbol,
IlUShort  index 
) [static]

Links a new bitmap symbol with the specified index.

See also:
GetItemBitmapSymbol, GetItemBitmapIndex, setBitmap
static IlSymbol* IlvGadgetItem::BitmapSymbol (  )  [static]

Returns the symbol associated with the sensitive bitmap.

Returns:
The symbol associated with the sensitive bitmap.
See also:
GetItemBitmapIndex, AddItemBitmapSymbol, setBitmap
virtual void IlvGadgetItem::computeRects ( IlvRect labelRect,
IlvRect pictureRect 
) const [protected, virtual]

Computes the label and picture bounding boxes.

If you want to change the label or picture location, you can override this member function in a subclass.

Parameters:
labelRect The returned bounding box of the item label.
pictureRect The returned bounding box of the item picture.
See also:
computeSize, recomputeSize, labelRect, pictureRect
virtual void IlvGadgetItem::computeSize ( IlUShort width,
IlUShort height 
) const [protected, virtual]

Computes the item size.

Computes the size of the item using the member function IlvGadgetItem::computeRects, which specifies the location of the label and picture parts. If you want to change the item size, you can override this member function in a subclass.

Parameters:
width The returned item width.
height The returned item height.
See also:
computeRects, recomputeSize, getWidth, getHeight

Reimplemented in IlvMenuItem, and IlvTreeGadgetItem.

virtual IlvGadgetItem* IlvGadgetItem::copy (  )  const [virtual]

Copies this object.

Allocates and returns a copy of this object. The named properties attached to the gadget item are also copied.

Returns:
A copy of the object.
See also:
IlvPredefinedGadgetItemIOMembers.

Reimplemented in IlvTreeGadgetItem.

virtual void IlvGadgetItem::deSelect (  )  [virtual]

Deselects the item.

The default implementation deselects and redraws the item, then it calls the holder method IlvGadgetItemHolder::itemDeSelected.

See also:
isSelected, select, SelectedBitmapSymbol

Reimplemented in IlvMenuItem, and IlvTreeGadgetItem.

virtual void IlvGadgetItem::draw ( IlvPort dst,
const IlvRect rect,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const [virtual]

Is called to draw the item.

You can override this method to modify the way the item is drawn.

Parameters:
dst The destination drawing port.
rect The rectangle where to the item will be drawn.
t The transformer used to draw the item.
clip The clipping area.
See also:
drawLabel, drawPicture, itemRect, IlvGadgetItemHolder::drawGadgetItem
virtual void IlvGadgetItem::drawLabel ( IlvPort dst,
IlvPalette palette,
const IlvRect rect,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const [virtual]

Is called to draw the item label.

You can override this method to modify the way the item is drawn.

Parameters:
dst The destination drawing port.
palette The palette used to draw the item label.
rect The rectangle where to the item label will be drawn.
t The transformer used to draw the item label.
clip The clipping area.
See also:
draw, drawPicture, itemRect

Reimplemented in IlvMenuItem.

virtual void IlvGadgetItem::drawPicture ( IlvPort dst,
const IlvRect rect,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const [virtual]

Is called to draw the item picture.

You can override this method to modify the way the item is drawn.

Parameters:
dst The destination drawing port.
rect The rectangle where to draw the item picture.
t The transformer used to draw the item picture.
clip The clipping area.
See also:
draw, drawPicture, itemRect
virtual void IlvGadgetItem::edit (  )  [virtual]

Edits the item label.

Edits the item if editing is allowed.

See also:
isEditable
IlvBitmap* IlvGadgetItem::getBitmap ( const IlSymbol symbol  )  const

Returns the bitmap corresponding to the specified symbol.

Returns:
The bitmap corresponding to the specified symbol or 0 if there is no bitmap that matches this symbol.
See also:
setBitmap, BitmapSymbol, SelectedBitmapSymbol, InsensitiveBitmapSymbol, HighlightedBitmapSymbol
IlvBitmap* IlvGadgetItem::getBitmap ( IlUShort  index = (IlUShort) 0  )  const

Returns the bitmap whose index is specified.

Parameters:
index The index of the bitmap.
Returns:
The bitmap whose index is specified or 0 if there is no bitmap at this index.
See also:
setBitmap
IlUShort IlvGadgetItem::getBitmapCount (  )  const

Returns the number of bitmaps used by this item.

Returns:
The number of bitmaps used by this item.
See also:
setBitmap
virtual IlUInt IlvGadgetItem::getBitmapMask (  )  const [virtual]

Returns the bitmap mask of the item.

The bitmap mask lets you know which bitmap indexes the item is handling. If the ith bit of the return value is set, it means that the item uses the bitmap of index i. You can get the associated symbol using the static member function GetItemBitmapSymbol.

Returns:
The bitmap mask of the item.
See also:
GetItemBitmapSymbol, getBitmap(IlUShort)

Reimplemented in IlvMenuItem, and IlvTreeGadgetItem.

IlAny IlvGadgetItem::getClientData (  )  const

Returns the client data of the item.

Client data is not typed where and can store any type of data.

Returns:
The client data of the item. If no client data has been set, the member function returns 0.
See also:
setClientData
virtual IlvBitmap* IlvGadgetItem::getCurrentBitmap (  )  const [virtual]

Returns the bitmap that is currently displayed by the item.

Returns:
The bitmap that is currently displayed, depending on the item state. If you want to display a specific bitmap, you can override this member function is a subclass.
See also:
getBitmap

Reimplemented in IlvMenuItem, and IlvTreeGadgetItem.

IlvGraphic* IlvGadgetItem::getGraphic (  )  const

Returns the IlvGraphic object associated with this item.

Returns:
The IlvGraphic object associated with this item. You must not delete the returned IlvGraphic object.
See also:
setGraphic
virtual IlUShort IlvGadgetItem::getHeight (  )  const [virtual]

Returns the item height.

Returns:
The item height.
See also:
getWidth, itemRect
virtual IlvPalette* IlvGadgetItem::getHighlightTextPalette (  )  const [virtual]

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

By default, an item uses the palette of its holder. Therefore, this method simply calls IlvGadgetItemHolder::getHighlightTextPalette.

Returns:
The palette used to draw the label of highlighted items.
See also:
setHighlightTextPalette, IlvGadgetItemHolder::getHighlightTextPalette
IlvGadgetItemHolder* IlvGadgetItem::getHolder (  )  const

Returns the item holder.

Returns:
The item holder or 0 if the item has no holder.
virtual IlvPalette* IlvGadgetItem::getInsensitivePalette (  )  const [virtual]

Returns the palette used to draw a nonsensitive item.

By default, an item uses the palette of its holder. Therefore, this method simply calls IlvGadgetItemHolder::getInsensitivePalette.

Returns:
The palette used to draw a nonsensitive item.
See also:
IlvGadgetItemHolder::getInsensitivePalette

Reimplemented in IlvMenuItem.

static IlShort IlvGadgetItem::GetItemBitmapIndex ( const IlSymbol symbol  )  [static]

Returns the index corresponding to the specified symbol.

Returns:
The index corresponding to symbol or -1 if the symbol does not match an existing index.
See also:
GetItemBitmapSymbol, AddItemBitmapSymbol, setBitmap
static IlSymbol* IlvGadgetItem::GetItemBitmapSymbol ( IlUShort  index  )  [static]

Returns the symbol corresponding to the specified index.

Returns:
The symbol corresponding to index or 0 if there is no such symbol.
See also:
GetItemBitmapIndex, AddItemBitmapSymbol, setBitmap
const char* IlvGadgetItem::getLabel (  )  const

Returns the item label.

Returns:
The item label or 0 if there is no label.
IlvAlignment IlvGadgetItem::getLabelAlignment (  )  const

Returns the label alignment.

This method applies only when the label is made up of several lines.

Returns:
The label alignment.
See also:
setAlignment, setLabel
void IlvGadgetItem::getLabelOrientation ( IlvOrientation orientation,
IlBoolean flip 
) const

Returns the orientation of the item label.

Sets orientation and flip to the orientation of the item label.

Parameters:
orientation The label orientation.
flip A Boolean value specifying whether the label is drawn from top to bottom or from bottom to top.
See also:
setLabelOrientation
IlvPosition IlvGadgetItem::getLabelPosition (  )  const

Returns the position of the label relative to the picture.

Returns:
The position of the label relative to the picture.
See also:
setLabelPosition
virtual const char* IlvGadgetItem::getMessage (  )  const [virtual]

Returns the message of the item.

Returns:
The message string with which the item label is associated in the display database. If the item label has no associated message string, the method returns the item label.
See also:
getLabel

Reimplemented in IlvMenuItem.

char IlvGadgetItem::getMnemonic (  )  const

Returns the mnemonic letter associated with the item.

To set a mnemonic letter, you must type the ^ (caret) character before the letter used as the mnemonic in the item label or message.

Returns:
The mnemonic letter associated with the item or 0 if there is no mnemonic.
See also:
setLabel
const char* IlvGadgetItem::getName (  )  const

Returns the item name.

Returns:
The item name. You must not delete or modify the returned string.
See also:
setName, IlvGadgetItemHolder::getItemByName
IlvNamedProperty* IlvGadgetItem::getNamedProperty ( const IlSymbol name  )  const

Returns the property whose name is specified.

Parameters:
name The property name.
Returns:
A pointer to the specified named property. Returns 0 if no named property matches the specified name.
See also:
setNamedProperty, removeNamedProperty
virtual IlvPalette* IlvGadgetItem::getNormalTextPalette (  )  const [virtual]

Returns the default palette used to draw an item.

By default, an item uses the palette of its holder. Therefore, this method simply calls IlvGadgetItemHolder::getNormalTextPalette.

Returns:
The default palette used to draw an item.
See also:
setNormalTextPalette, IlvGadgetItemHolder::getNormalTextPalette
virtual IlvPalette* IlvGadgetItem::getOpaquePalette (  )  const [virtual]

Returns the palette that is used to draw opaque items.

By default, an item uses the palette of its holder. Therefore, this method simply calls IlvGadgetItemHolder::getOpaquePalette.

Returns:
The palette used to draw opaque items.
See also:
setOpaquePalette, IlvGadgetItemHolder::getOpaquePalette
IlAny IlvGadgetItem::getProperty ( const IlSymbol key  )  const

Returns the object property whose symbol is provided as the parameter.

Parameters:
key The symbol representing the property.
Returns:
The specified property value when it can be found. It Returns 0 when no property name matches the key parameter.
See also:
setProperty, removeProperty, hasProperty
virtual IlvPalette* IlvGadgetItem::getSelectionPalette (  )  const [virtual]

Returns the palette used to draw selected items.

By default, an item uses the palette of its holder. Therefore, this method simply calls IlvGadgetItemHolder::getSelectionPalette .

Returns:
The palette used to draw selected items.
See also:
IlvGadgetItemHolder::getSelectionPalette
virtual IlvPalette* IlvGadgetItem::getSelectionTextPalette (  )  const [virtual]

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

By default, an item uses the palette of its holder. Therefore, this method simply calls IlvGadgetItemHolder::getSelectionTextPalette.

Returns:
The palette used to draw the label of selected items.
See also:
setSelectionTextPalette, IlvGadgetItemHolder::getSelectionTextPalette
IlUShort IlvGadgetItem::getSpacing (  )  const

Returns the spacing between the label and the picture of the item.

Returns:
The spacing between the label and the picture of the item.
See also:
setSpacing
virtual IlUShort IlvGadgetItem::getWidth (  )  const [virtual]

Returns the item width.

Returns:
The item width.
See also:
getHeight, itemRect
IlBoolean IlvGadgetItem::hasProperty ( const IlSymbol key  )  const

Indicates whether the item has the property whose symbol is specified.

Parameters:
key The symbol representing the property.
Returns:
IlTrue if the property specified by key was found, and IlFalse otherwise.
See also:
setProperty, removeProperty, getProperty
virtual void IlvGadgetItem::highlight ( IlBoolean  value = IlTrue  )  [virtual]

Highlights the item.

Highlights the item if value is IlTrue, otherwise the item is not highlighted. Uses the highlight bitmap if one is provided.

Parameters:
value A Boolean value specifying whether the item should be highlighted.
See also:
isHighlighted
static IlSymbol* IlvGadgetItem::HighlightedBitmapSymbol (  )  [static]

Returns the symbol associated with the highlighted bitmap.

Returns:
The symbol associated with the highlighted bitmap.
See also:
GetItemBitmapIndex, AddItemBitmapSymbol, setBitmap, highlight
static IlSymbol* IlvGadgetItem::InsensitiveBitmapSymbol (  )  [static]

Returns the symbol associated with the nonsensitive bitmap.

Returns:
The symbol associated with the nonsensitive bitmap.
See also:
GetItemBitmapIndex, AddItemBitmapSymbol, setBitmap, setSensitive
IlBoolean IlvGadgetItem::isDragDropTarget (  )  const

Returns a Boolean value specifying whether the item is the target of a drag-and-drop operation.

When an item is the target of a drag-and-drop operation, it is drawn as if it was selected.

Returns:
IlTrue if the item is considered a drag-and-drop target, and IlFalse otherwise.
See also:
IlvGadgetItemHolder::setDragDropTarget
IlBoolean IlvGadgetItem::isEditable (  )  const

Indicates whether the item can be edited.

Returns:
IlTrue if the item can be edited, and IlFalse otherwise.
See also:
setEditable
IlBoolean IlvGadgetItem::isHighlighted (  )  const

Indicates whether the item is highlighted.

Returns:
IlTrue if the item is highlighted, and IlFalse otherwise.
See also:
highlight
IlBoolean IlvGadgetItem::isOpaque (  )  const

Indicates whether the item is opaque.

Returns:
IlTrue if the item is opaque and, IlFalse otherwise.
See also:
setOpaque, getOpaquePalette
virtual IlBoolean IlvGadgetItem::isSelectable (  )  const [virtual]

Indicates whether the item can be selected.

Is called when an item is about to be selected. You can redefine this member function to filter item selection.

Returns:
IlTrue if the item can be selected, and IlFalse otherwise.
See also:
select, deSelect, isSelected

Reimplemented in IlvMenuItem.

IlBoolean IlvGadgetItem::isSelected (  )  const

Indicates whether the item is selected.

Returns:
IlTrue if the item is selected, and IlFalse otherwise.
See also:
select, deSelect
IlBoolean IlvGadgetItem::isSensitive (  )  const

Indicates whether the item is sensitive.

Returns:
IlTrue if the item is sensitive, and IlFalse otherwise.
See also:
setSensitive, getInsensitivePalette
IlBoolean IlvGadgetItem::isShowingLabel (  )  const

Indicates whether the item label is visible.

Returns:
IlTrue if the item label is visible, and IlFalse otherwise.
See also:
showLabel, isShowingPicture
IlBoolean IlvGadgetItem::isShowingPicture (  )  const

Indicates whether the item picture is visible.

Returns:
IlTrue if the item picture is visible, and IlFalse otherwise.
See also:
showPicture, isShowingLabel
virtual void IlvGadgetItem::itemRect ( IlvRect rect,
const IlvRect bbox 
) const [virtual]

Returns the item bounding bbox.

Sets the item bounding box to rect when the item is drawn in bbox.

Parameters:
rect The returned bounding box.
bbox The rectangle where the item should be drawn.
See also:
pictureRect, labelRect, selectionRect
virtual void IlvGadgetItem::labelRect ( IlvRect rect,
const IlvRect bbox 
) const [virtual]

Returns the bounding box of the item label.

Sets the bounding box of the item label to rect when the item is drawn in bbox.

Parameters:
rect The returned bounding box.
bbox The rectangle where the item should be drawn.
See also:
pictureRect, itemRect, selectionRect
virtual void IlvGadgetItem::pictureRect ( IlvRect rect,
const IlvRect bbox 
) const [virtual]

Returns the bounding bbox of the item picture.

Sets the bounding box of the item picture to rect when the item is drawn in bbox.

Parameters:
rect The returned bounding box.
bbox The rectangle where the item should be drawn.
See also:
labelRect, itemRect, selectionRect
static IlvGadgetItem* IlvGadgetItem::readItem ( IlvInputFile file,
IlvDisplay display 
) [static]

Reads an object description from a file.

Reads an object description from the file input. It reads the information that was saved by the member function write to be able to create a new instance of this object. Usually, because of the availability of the constructor that expects an IlvInputFile, readItem should be equivalent to :

 IlvGadgetItem*
 MyClass::readItem(IlvInputFile& file, IlvDisplay* display)
 {
     return new MyClass(file, display);
 }
Parameters:
file The file to be read from.
display The display used to create the object.
See also:
DeclareGadgetItemInfoRO, DeclareGadgetItemInfo, IlvPredefinedGadgetItemIOMembers.
Warning:
[note] The readItem method is not capitalized like other static methods so that it is consistent with the write method.

Reimplemented in IlvTreeGadgetItem.

virtual void IlvGadgetItem::recomputeSize ( IlBoolean  redraw = IlTrue  )  [virtual]

Recomputes the item geometry.

Is internally called by each function that modifies the item size. If you change the size of an IlvGraphic object encapsulated by an IlvGadgetItem, you must call this member function. If redraw is IlTrue or is omitted, the item will be redrawn automatically.

Parameters:
redraw A Boolean value specifying whether the item should be redrawn.
See also:
computeRects, getWidth, getHeight
void IlvGadgetItem::removeAllBitmaps (  ) 

Removes all the bitmaps associated with the item.

All the bitmaps are unlocked.

See also:
setGraphic, getBitmap, setBitmap
IlvNamedProperty* IlvGadgetItem::removeNamedProperty ( IlSymbol name  ) 

Removes the specified named property from the object.

Parameters:
name The property name.
Returns:
The named property with the same name that was previously associated with this object. You can delete it or keep it for further handling. If no previous named property with the same name was associated with this object, this member function returns 0.
See also:
getNamedProperty, setNamedProperty
IlBoolean IlvGadgetItem::removeProperty ( const IlSymbol key  ) 

Removes a property from the object.

Parameters:
key The symbol representing the property.
Returns:
IlTrue if the property specified by key was found and IlFalse otherwise.
See also:
setProperty, getProperty, hasProperty
virtual void IlvGadgetItem::select (  )  [virtual]

Selects the item.

The default implementation selects and redraws the item, then it calls the holder method IlvGadgetItemHolder::itemSelected.

See also:
isSelected, deSelect, SelectedBitmapSymbol

Reimplemented in IlvMenuItem, and IlvTreeGadgetItem.

static IlSymbol* IlvGadgetItem::SelectedBitmapSymbol (  )  [static]

Returns the symbol associated with the selected bitmap.

Returns:
The symbol associated with the selected bitmap.
See also:
GetItemBitmapIndex, AddItemBitmapSymbol, setBitmap, select
virtual void IlvGadgetItem::selectionRect ( IlvRect rect,
const IlvRect bbox 
) const [virtual]

Returns the bounding box of the item selection.

Sets the bounding bbox of the item selection to rect when the item is drawn in bbox.

Parameters:
rect The returned bounding box.
bbox The rectangle where the item should be drawn.
See also:
pictureRect, itemRect, labelRect
void IlvGadgetItem::setBitmap ( IlvBitmap bitmap  ) 

Sets the sensitive bitmap of the item.

Sets the sensitive bitmap to bitmap. If a sensitive bitmap already exists for this item, it is unlocked. The new bitmap is locked.

Parameters:
bitmap The new sensitive bitmap.
See also:
getBitmap
void IlvGadgetItem::setBitmap ( const IlSymbol symbol,
IlvBitmap bitmap 
)

Sets the specified bitmap to the item using the specified symbol.

Sets the bitmap of the item specified by symbol to bitmap. If a bitmap already exists for this symbol, it is unlocked. The new bitmap is locked.

Parameters:
symbol The symbol specifying the type of bitmap.
bitmap The new bitmap.
See also:
getBitmap, BitmapSymbol, SelectedBitmapSymbol, InsensitiveBitmapSymbol, HighlightedBitmapSymbol
void IlvGadgetItem::setBitmap ( IlUShort  index,
IlvBitmap bitmap 
)

Sets the specified bitmap to the item at the specified index.

Sets the bitmap whose index is specified to bitmap. If a bitmap already exists for this index, it is unlocked. The new bitmap is locked. Existing indexes are:

Sensitive BitmapBitmapSymbol() 0
Selected BitmapSelectedBitmapSymbol() 1
Insensitive Bitmap InsensitiveBitmapSymbol() 2
Highlighted Bitmap HighlightedBitmapSymbol() 3

You can use other indexes to store more bitmaps. In this case, you must override the member function IlvGadgetItem::getCurrentBitmap to return the correct bitmap.

Parameters:
index The index to which the bitmap should be assigned.
bitmap The new bitmap.
See also:
getBitmap, BitmapSymbol, SelectedBitmapSymbol, InsensitiveBitmapSymbol, HighlightedBitmapSymbol
void IlvGadgetItem::setClientData ( IlAny  data  ) 

Sets the new client data for this item.

Parameters:
data The new client data. Any previous client data is lost.
See also:
getClientData
void IlvGadgetItem::setEditable ( IlBoolean  value  ) 

Specifies whether the item should be editable.

Parameters:
value A Boolean value specifying specifying whether the item should be editable (IlTrue) or not (IlFalse).
See also:
isEditable
void IlvGadgetItem::setGraphic ( IlvGraphic graphic  ) 

Specifies the graphic object associated with this item.

Calls the member function IlvGadgetItem::removeAllBitmaps.

See also:
getGraphic
virtual void IlvGadgetItem::setHighlightTextPalette ( IlvPalette palette  )  [virtual]

Sets the palette used to draw the label of highlighted items.

The specified palette is locked.

Parameters:
palette The palette used to draw the label of highlighted items.
See also:
getHighlightTextPalette
void IlvGadgetItem::setLabel ( const char *  label,
IlBoolean  copy = IlTrue 
)

Sets the item label.

To create labels that extend over several lines use the '
' character to start a new line.

Parameters:
label The new item label.
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.
See also:
getLabel, getMessage
void IlvGadgetItem::setLabelAlignment ( IlvAlignment  alignment  ) 

Sets the label alignment.

Sets the label alignment to alignment. This method applies only to labels composed of several lines.

Parameters:
alignment The new label alignment. Valid values are: IlvLeft, IlvRight, or IlvCenter.
See also:
getLabelAlignment, setLabel
void IlvGadgetItem::setLabelOrientation ( IlvOrientation  orientation,
IlBoolean  flip = IlFalse 
)

Sets the orientation of the item label.

Parameters:
orientation The label orientation. Valid values are: IlvHorizontal and IlvVertical.
flip A Boolean value specifying whether the label is drawn from top to bottom or from bottom to top.
See also:
getLabelOrientation
void IlvGadgetItem::setLabelPosition ( IlvPosition  position  ) 

Sets the label position relative to the picture.

Parameters:
position The new position. Valid values are: IlvLeft, IlvRight, IlvTop, IlvBottom, IlvCenter, IlvTopLeft, IlvTopRight, IlvBottomLeft, IlvBottomRight
See also:
getLabelPosition
void IlvGadgetItem::setName ( const char *  name  ) 

Sets the item name.

Assigning a name to items helps you distinguish them by using a designation other than their labels.

Parameters:
name The new item name.
See also:
getName, IlvGadgetItemHolder::getItemByName
IlvNamedProperty* IlvGadgetItem::setNamedProperty ( IlvNamedProperty property  ) 

Sets the specified named property to the object.

Parameters:
property The named property.
Returns:
The named property with the same name that was previously associated with this object. You can delete it or keep it for further handling. If no previous named property with the same name was associated with this object, this member function returns 0.
See also:
getNamedProperty, removeNamedProperty
virtual void IlvGadgetItem::setNormalTextPalette ( IlvPalette palette  )  [virtual]

Sets the default palette used to draw an item.

The specified palette is locked.

Parameters:
palette The default palette used to draw an item.
See also:
getNormalTextPalette
void IlvGadgetItem::setOpaque ( IlBoolean  value  ) 

Specifies whether the item should be opaque.

When an item is opaque, its label is drawn with a background.

Parameters:
value A Boolean value specifying whether the item should be opaque (IlTrue) or not (IlFalse).
See also:
isOpaque, getOpaquePalette
virtual void IlvGadgetItem::setOpaquePalette ( IlvPalette palette  )  [virtual]

Sets the palette used to draw opaque items.

The specified palette is locked.

Parameters:
palette The new opaque palette.
See also:
getOpaquePalette
void IlvGadgetItem::setProperty ( const IlSymbol key,
IlAny  value 
)

Sets the property whose symbol is specified to the item.

Parameters:
key The symbol representing the property.
value The new value of the property. If value is 0, the property is removed.
See also:
removeProperty, getProperty, hasProperty
virtual void IlvGadgetItem::setSelectionTextPalette ( IlvPalette palette  )  [virtual]

Sets the palette used to draw the label of selected items.

The specified palette is locked.

Parameters:
palette The new selection palette.
See also:
getSelectionTextPalette
void IlvGadgetItem::setSensitive ( IlBoolean  value  ) 

Specifies whether the item should be sensitive or not.

Uses the insensitive bitmap, if one is provided. If such a bitmap is not provided, and if a sensitive bitmap is available, the insensitive bitmap is automatically computed.

Parameters:
value A Boolean value specifying whether the item should be sensitive (IlTrue) or not (IlFalse).
See also:
isSensitive, getInsensitivePalette
void IlvGadgetItem::setSpacing ( IlUShort  spacing  ) 

Sets the spacing between the label and the picture of the item.

Parameters:
spacing The new spacing.
See also:
getSpacing
void IlvGadgetItem::showLabel ( IlBoolean  value = IlTrue  ) 

Specifies whether the item label should be shown.

Specifies whether the item label should be shown (IlTrue) or not (IlFalse).

Parameters:
value A Boolean value specifying whether the item label should be shown.
See also:
isShowingLabel, showPicture
void IlvGadgetItem::showPicture ( IlBoolean  value = IlTrue  ) 

Specifies whether the item picture should be shown.

Specifies whether the item picture should be shown (IlTrue) or not (IlFalse).

Parameters:
value A Boolean value specifying whether the item picture should be shown.
virtual void IlvGadgetItem::write ( IlvOutputFile file  )  const [virtual]

Writes an object description to a file.

Writes out, in a file, the object description. This description contains all the information necessary to create an exact copy of this object by means of the member function readItem.

Parameters:
file The name of the file to be written to.
See also:
DeclareGadgetItemInfoRO, DeclareGadgetItemInfo, IlvPredefinedGadgetItemIOMembers.

Reimplemented in IlvTreeGadgetItem.

 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.