Views
Gadgets Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
IlvTreeGadgetItem Class Reference

Gadget Item class. More...

#include <ilviews/gadgets/tree.h>

Inheritance diagram for IlvTreeGadgetItem:
IlvGadgetItem IlvValueInterface IlvStylable IlvTreePathGadgetItem

Public Member Functions

 IlvTreeGadgetItem (const char *label, IlvBitmap *bitmap=0, IlvPosition position=IlvRight, IlUShort spacing=IlvDefaultGadgetItemSpacing, IlBoolean copy=IlTrue)
 Constructor. More...
 
 IlvTreeGadgetItem (const char *label, IlvGraphic *graphic, IlvPosition position=IlvRight, IlUShort spacing=IlvDefaultGadgetItemSpacing, IlBoolean copy=IlTrue)
 Constructor. More...
 
 IlvTreeGadgetItem (IlvBitmap *bitmap)
 Constructor. More...
 
 IlvTreeGadgetItem (IlvGraphic *graphic)
 Constructor. More...
 
IlvTreeGadgetItemapplyToChildren (IlvApplyGadgetItem func, IlAny arg=0) const
 Applies the specified function to all the children of the tree gadget item. More...
 
virtual void deSelect ()
 Deselects the item. More...
 
void detach ()
 Detaches the item from its parent. More...
 
virtual void expand ()
 Expands the item. More...
 
void expandAll ()
 Expands the item and all its children. More...
 
virtual IlUInt getBitmapMask () const
 Returns the bitmap mask of the item. More...
 
IlUInt getCardinal () const
 Returns the number of children of the tree gadget item. More...
 
virtual IlvBitmapgetCurrentBitmap () const
 Returns the bitmap that is currently displayed by the item. More...
 
IlvTreeGadgetItemgetFirstChild () const
 Returns the first child of the item. More...
 
IlvTreeGadgetItemgetLastChild () const
 Returns the last child of the item. More...
 
IlvTreeGadgetItemgetNextSibling () const
 Returns the next sibling of the item. More...
 
IlvTreeGadgetItemgetParent () const
 Returns the parent of the item. More...
 
IlUInt getPosition () const
 Returns the position of the item in its parent list. More...
 
IlvTreeGadgetItemgetPrevSibling () const
 Returns the previous sibling of the item. More...
 
IlvTreeGadgetItemHoldergetTreeHolder () const
 Returns a pointer to the item holder. More...
 
IlBoolean hasChildren () const
 Indicates whether the item has children. More...
 
IlBoolean hasUnknownChildCount () const
 Indicates that the number of children is not known. More...
 
IlBoolean insertChild (IlvTreeGadgetItem *item, IlInt index=-1)
 Inserts the specified item in the list of children of this tree gadget item. More...
 
IlBoolean isAncestorOf (IlvTreeGadgetItem *item) const
 Indicates whether the item is an ancestor of the specified item. More...
 
IlBoolean isExpanded () const
 Indicates whether the item is expanded. More...
 
IlBoolean isFirstChild () const
 Indicates whether the item is the first child in its parent list. More...
 
IlBoolean isLastChild () const
 Indicates whether the item is the last child in its parent list. More...
 
IlBoolean isVisible () const
 Indicates whether the item is visible. More...
 
IlvTreeGadgetItemlastVisible () const
 Returns the last visible children of the item. More...
 
IlvTreeGadgetItemnextSelected () const
 Returns the next selected item. More...
 
IlvTreeGadgetItemnextVisible () const
 Returns the next visible item. More...
 
IlvTreeGadgetItempreviousVisible () const
 Returns the previous visible item. More...
 
virtual void select ()
 Selects the item. More...
 
void setUnknownChildCount (IlBoolean value)
 Specifies whether the item should behave as if it had children. More...
 
virtual void shrink ()
 Shrinks the item. More...
 
void sortChildren (IlUInt levels=(IlUInt) -1, IlvTreeGadgetItemCompareFunction func=0)
 Sorts the children of the tree gadget item. More...
 
- Public Member Functions inherited from IlvGadgetItem
 IlvGadgetItem (const char *label, IlvBitmap *bitmap=0, IlvPosition position=IlvRight, IlUShort spacing=4, IlBoolean copy=IlTrue)
 Constructor. More...
 
 IlvGadgetItem (const char *label, IlvGraphic *graphic, IlvPosition position=IlvRight, IlUShort spacing=4, IlBoolean copy=IlTrue)
 Constructor. More...
 
 IlvGadgetItem (IlvBitmap *bitmap)
 Constructor. More...
 
 IlvGadgetItem (IlvGraphic *graphic)
 Constructor. More...
 
virtual void activate ()
 Activates the item. More...
 
virtual IlvGadgetItemcopy () const
 Copies this object. More...
 
virtual void draw (IlvPort *dst, const IlvRect &rect, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Is called to draw the item. More...
 
virtual void drawLabel (IlvPort *dst, const IlvPalette *palette, const IlvRect &rect, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Is called to draw the item label. More...
 
virtual void drawPicture (IlvPort *dst, const IlvRect &rect, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Is called to draw the item picture. More...
 
virtual void edit ()
 Edits the item label. More...
 
IlvBitmapgetBitmap (const IlSymbol *symbol) const
 Returns the bitmap corresponding to the specified symbol. More...
 
IlvBitmapgetBitmap (IlUShort index=(IlUShort) 0) const
 Returns the bitmap whose index is specified. More...
 
IlUShort getBitmapCount () const
 Returns the number of bitmaps used by this item. More...
 
IlAny getClientData () const
 Returns the client data of the item. More...
 
IlvGraphicgetGraphic () const
 Returns the IlvGraphic object associated with this item. More...
 
virtual IlUShort getHeight () const
 Returns the item height. More...
 
virtual const IlvPalettegetHighlightTextPalette () const
 Returns the palette used to draw the label of highlighted items. More...
 
IlvGadgetItemHoldergetHolder () const
 Returns the item holder. More...
 
virtual const IlvPalettegetInsensitivePalette () const
 Returns the palette used to draw a nonsensitive item. More...
 
const char * getLabel () const
 Returns the item label. More...
 
virtual IlvAlignment getLabelAlignment () const
 Returns the label alignment. More...
 
void getLabelOrientation (IlvOrientation &orientation, IlBoolean &flip) const
 Returns the orientation of the item label. More...
 
IlvPosition getLabelPosition () const
 Returns the position of the label relative to the picture. More...
 
virtual const char * getMessage () const
 Returns the message of the item. More...
 
char getMnemonic () const
 Returns the mnemonic letter associated with the item. More...
 
const char * getName () const
 Returns the item name. More...
 
IlvNamedPropertygetNamedProperty (const IlSymbol *name) const
 Returns the property whose name is specified. More...
 
virtual const IlvPalettegetNormalTextPalette () const
 Returns the default palette used to draw an item. More...
 
virtual const IlvPalettegetOpaquePalette () const
 Returns the palette that is used to draw opaque items. More...
 
IlAny getProperty (const IlSymbol *key) const
 Returns the object property whose symbol is provided as the parameter. More...
 
virtual const IlvPalettegetSelectionPalette () const
 Returns the palette used to draw selected items. More...
 
virtual const IlvPalettegetSelectionTextPalette () const
 Returns the palette used to draw the label of selected items. More...
 
IlUShort getSpacing () const
 Returns the spacing between the label and the picture of the item. More...
 
virtual IlUShort getWidth () const
 Returns the item width. More...
 
IlBoolean hasProperty (const IlSymbol *key) const
 Indicates whether the item has the property whose symbol is specified. More...
 
virtual void highlight (IlBoolean value=IlTrue)
 Highlights the item. More...
 
IlBoolean isDragDropTarget () const
 Indicates whether the item is the target of a drag-and-drop operation. More...
 
IlBoolean isEditable () const
 Indicates whether the item can be edited. More...
 
IlBoolean isHighlighted () const
 Indicates whether the item is highlighted. More...
 
IlBoolean isOpaque () const
 Indicates whether the item is opaque. More...
 
virtual IlBoolean isSelectable () const
 Indicates whether the item can be selected. More...
 
IlBoolean isSelected () const
 Indicates whether the item is selected. More...
 
IlBoolean isSensitive () const
 Indicates whether the item is sensitive. More...
 
IlBoolean isShowingLabel () const
 Indicates whether the item label is visible. More...
 
IlBoolean isShowingPicture () const
 Indicates whether the item picture is visible. More...
 
virtual void itemRect (IlvRect &rect, const IlvRect &bbox) const
 Returns the item bounding bbox. More...
 
virtual void labelRect (IlvRect &rect, const IlvRect &bbox) const
 Returns the bounding box of the item label. More...
 
virtual void pictureRect (IlvRect &rect, const IlvRect &bbox) const
 Returns the bounding bbox of the item picture. More...
 
virtual void recomputeSize (IlBoolean redraw=IlTrue)
 Recomputes the item geometry. More...
 
void removeAllBitmaps ()
 Removes all the bitmaps associated with the item. More...
 
IlvNamedPropertyremoveNamedProperty (IlSymbol *name)
 Removes the specified named property from the object. More...
 
IlBoolean removeProperty (const IlSymbol *key)
 Removes a property from the object. More...
 
virtual void selectionRect (IlvRect &rect, const IlvRect &bbox) const
 Returns the bounding box of the item selection. More...
 
void setBitmap (const IlSymbol *symbol, IlvBitmap *bitmap)
 Sets the specified bitmap to the item using the specified symbol. More...
 
void setBitmap (IlUShort index, IlvBitmap *bitmap)
 Sets the specified bitmap to the item at the specified index. More...
 
void setBitmap (IlvBitmap *bitmap)
 Sets the sensitive bitmap of the item. More...
 
void setClientData (IlAny data)
 Sets the new client data for this item. More...
 
void setEditable (IlBoolean value)
 Specifies whether the item should be editable. More...
 
void setGraphic (IlvGraphic *graphic)
 Specifies the graphic object associated with this item. More...
 
virtual void setHighlightTextPalette (IlvPalette *palette)
 Sets the palette used to draw the label of highlighted items. More...
 
void setLabel (const char *label, IlBoolean copy=IlTrue)
 Sets the item label. More...
 
virtual void setLabelAlignment (IlvAlignment alignment)
 Sets the label alignment. More...
 
void setLabelOrientation (IlvOrientation orientation, IlBoolean flip=IlFalse)
 Sets the orientation of the item label. More...
 
void setLabelPosition (IlvPosition position)
 Sets the label position relative to the picture. More...
 
void setName (const char *name)
 Sets the item name. More...
 
IlvNamedPropertysetNamedProperty (IlvNamedProperty *property)
 Sets the specified named property to the object. More...
 
virtual void setNormalTextPalette (IlvPalette *palette)
 Sets the default palette used to draw an item. More...
 
void setOpaque (IlBoolean value)
 Specifies whether the item should be opaque. More...
 
virtual void setOpaquePalette (IlvPalette *palette)
 Sets the palette used to draw opaque items. More...
 
void setProperty (const IlSymbol *key, IlAny value)
 Sets the property whose symbol is specified to the item. More...
 
virtual void setSelectionTextPalette (IlvPalette *palette)
 Sets the palette used to draw the label of selected items. More...
 
void setSensitive (IlBoolean value)
 Specifies whether the item should be sensitive or not. More...
 
void setSpacing (IlUShort spacing)
 Sets the spacing between the label and the picture of the item. More...
 
void showLabel (IlBoolean value=IlTrue)
 Specifies whether the item label should be shown. More...
 
void showPicture (IlBoolean value=IlTrue)
 Specifies whether the item picture should be shown. More...
 
virtual void write (IlvOutputFile &file) const
 Writes an object description to a file. More...
 

Static Public Member Functions

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

Protected Member Functions

virtual void computeSize (IlUShort &, IlUShort &) const
 Computes the item size. More...
 
- Protected Member Functions inherited from IlvGadgetItem
virtual void computeRects (IlvRect &labelRect, IlvRect &pictureRect) const
 Computes the label and picture bounding boxes. More...
 

Friends

class IlvTreeGadget
 
class IlvTreeGadgetItemHolder
 

Detailed Description

Gadget Item class.

Library: ilvadvgdt

This class represents an item of an IlvTreeGadgetItemHolder. Each IlvTreeGadgetItem has a certain number of children. An IlvTreeGadgetItem may be expanded or not. When the item is expanded, its children are displayed, and if an expanded bitmap has been provided, it is used. This class is used by the both the IlvTreeGadget and IlvHierarchicalSheet classes.

Tree Gadget Items

See also
IlvTreeGadgetItemHolder, IlvTreeGadget, IlvHierarchicalSheet.

Accessors\nAccessors provide a scriptable and uniform way to inspect and modify an object by using its base class methods <tt>IlvValueInterface::queryValue()</tt>, <tt>IlvValueInterface::queryValues()</tt>, <tt>IlvValueInterface::changeValue()</tt>, <tt>IlvValueInterface::changeValues()</tt>.\n\n\nThis class inherits the accessors of its superclass \c IlvGadgetItem and adds the following ones:

Data accessors

Name Type Equivalent methods
hasChildren Boolean hasChildren()
expanded Boolean isExpanded(), shrink(), expand()
visible Boolean isVisible()
parent Object getParent()
firstChild Object getFirstChild()
lastChild Object getLastChild()
isFirst Boolean isFirstChild()
isLast Boolean isLastChild()
nextSibling Object getNextSibling()
prevSibling Object getPrevSibling()
nextVisible Object nextVisible()
prevVisible Object previousVisible()
expandedBitmap Bitmap getBitmap(), setBitmap()
nextSelected Object nextSelected()

Method accessors

Name Return type Equivalent methods
isAncestorOf(IlvTreeGadgetItem item) Boolean isAncestorOf(IlvTreeGadgetItem* item) const
detach() Void detach()
insertChild(IlvTreeGadgetItem item, Int index) Void insertChild(IlvTreeGadgetItem* item, IlInt index )
sortChildren(Int levels) Void sortChildren(IlUInt levels, IlvTreeGadgetItemCompareFunction)

Constructor & Destructor Documentation

◆ IlvTreeGadgetItem() [1/4]

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

Constructor.

Initializes a new instance of the IlvTreeGadgetItem 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
labelThe item label.
bitmapThe item sensitive bitmap.
positionThe label position relative to the picture.
spacingThe spacing between the label and the picture.
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 IlvTreeGadgetItem.

◆ IlvTreeGadgetItem() [2/4]

IlvTreeGadgetItem::IlvTreeGadgetItem ( const char *  label,
IlvGraphic graphic,
IlvPosition  position = IlvRight,
IlUShort  spacing = IlvDefaultGadgetItemSpacing,
IlBoolean  copy = IlTrue 
)

Constructor.

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

Parameters
labelThe item label.
graphicThe item picture.
positionThe label position relative to the picture.
spacingThe spacing between the label and the picture.
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 IlvTreeGadgetItem.

◆ IlvTreeGadgetItem() [3/4]

IlvTreeGadgetItem::IlvTreeGadgetItem ( IlvGraphic graphic)

Constructor.

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

Parameters
graphicThe item picture.

◆ IlvTreeGadgetItem() [4/4]

IlvTreeGadgetItem::IlvTreeGadgetItem ( IlvBitmap bitmap)

Constructor.

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

Parameters
bitmapThe item sensitive bitmap.

Member Function Documentation

◆ applyToChildren()

IlvTreeGadgetItem* IlvTreeGadgetItem::applyToChildren ( IlvApplyGadgetItem  func,
IlAny  arg = 0 
) const

Applies the specified function to all the children of the tree gadget item.

Parameters
funcThe function to be applied.
argThe argument that will be passed to the function func.
Returns
The item that stopped the apply mechanism.
See also
IlvApplyGadgetItem.

◆ computeSize()

virtual void IlvTreeGadgetItem::computeSize ( IlUShort width,
IlUShort height 
) const
protectedvirtual

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
widthThe returned item width.
heightThe returned item height.
See also
computeRects(), recomputeSize(), getWidth(), getHeight().

Reimplemented from IlvGadgetItem.

◆ deSelect()

virtual void IlvTreeGadgetItem::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 from IlvGadgetItem.

◆ detach()

void IlvTreeGadgetItem::detach ( )

Detaches the item from its parent.

The item is not deleted.

See also
insertChild().

◆ expand()

virtual void IlvTreeGadgetItem::expand ( )
virtual

Expands the item.

When an item is expanded, its children are visible.

See also
isExpanded(), shrink().

◆ expandAll()

void IlvTreeGadgetItem::expandAll ( )

Expands the item and all its children.

See also
expand(), shrink().

◆ ExpandedBitmapSymbol()

static IlSymbol* IlvTreeGadgetItem::ExpandedBitmapSymbol ( )
static

Returns the symbol associated with the expanded bitmap.

Returns
The symbol associated with the expanded bitmap.
See also
IlvGadgetItem::GetItemBitmapIndex(), IlvGadgetItem::AddItemBitmapSymbol(), IlvGadgetItem::setBitmap(), expand(), shrink().

◆ getBitmapMask()

virtual IlUInt IlvTreeGadgetItem::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 from IlvGadgetItem.

◆ getCardinal()

IlUInt IlvTreeGadgetItem::getCardinal ( ) const

Returns the number of children of the tree gadget item.

Searches the children of the tree gadget item recursively.

Returns
The number of children of the tree gadget item. The returned value includes this item.
See also
insertChild().

◆ getCurrentBitmap()

virtual IlvBitmap* IlvTreeGadgetItem::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 from IlvGadgetItem.

◆ getFirstChild()

IlvTreeGadgetItem* IlvTreeGadgetItem::getFirstChild ( ) const

Returns the first child of the item.

Returns
The first child of this item, or 0 if this item has no children.
See also
getLastChild(), getParent().

◆ getLastChild()

IlvTreeGadgetItem* IlvTreeGadgetItem::getLastChild ( ) const

Returns the last child of the item.

Returns
The last child of this item, or 0 if this item has no children.
See also
getFirstChild(), getParent().

◆ getNextSibling()

IlvTreeGadgetItem* IlvTreeGadgetItem::getNextSibling ( ) const

Returns the next sibling of the item.

Returns
The next sibling of this item, or 0 if the item is the last child.
See also
getPrevSibling(), nextVisible(), nextSelected(), getParent().

◆ getParent()

IlvTreeGadgetItem* IlvTreeGadgetItem::getParent ( ) const

Returns the parent of the item.

Returns
The parent of this item, or 0 if this item has no parent.
See also
insertChild().

◆ getPosition()

IlUInt IlvTreeGadgetItem::getPosition ( ) const

Returns the position of the item in its parent list.

Returns
Returns the position of the item in its parent list.
See also
insertChild().

◆ getPrevSibling()

IlvTreeGadgetItem* IlvTreeGadgetItem::getPrevSibling ( ) const

Returns the previous sibling of the item.

Returns
The previous sibling of this item, or 0 if the item is the first child.
See also
getNextSibling(), previousVisible(), previousSelected(), getParent().

◆ getTreeHolder()

IlvTreeGadgetItemHolder* IlvTreeGadgetItem::getTreeHolder ( ) const

Returns a pointer to the item holder.

Returns
A pointer to the instance of IlvTreeGadgetItemHolder to which the item is connected, or 0 if there's none.

◆ hasChildren()

IlBoolean IlvTreeGadgetItem::hasChildren ( ) const

Indicates whether the item has children.

Returns
IlTrue if the item has children. Otherwise, returns IlFalse.
See also
insertChild(), detach().

◆ hasUnknownChildCount()

IlBoolean IlvTreeGadgetItem::hasUnknownChildCount ( ) const

Indicates that the number of children is not known.

Returns
IlTrue if the number of children of the tree gadget item is not known. In this case, the tree gadget item behaves as if it had children even when it does not have any. This means that you can expand it. This feature is useful when you want to add items to the tree only if necessary, that is, when the user tries accessing these items by expanding their parent.
See also
expand(), shrink().

◆ insertChild()

IlBoolean IlvTreeGadgetItem::insertChild ( IlvTreeGadgetItem item,
IlInt  index = -1 
)

Inserts the specified item in the list of children of this tree gadget item.

Parameters
itemThe item to be inserted.
indexThe position where item will be added in the list.
See also
detach().

◆ isAncestorOf()

IlBoolean IlvTreeGadgetItem::isAncestorOf ( IlvTreeGadgetItem item) const

Indicates whether the item is an ancestor of the specified item.

Parameters
itemThe tree gadget item.
Returns
IlTrue if this tree gadget item is an ancestor of item. Otherwise, it returns IlFalse.
See also
getParent().

◆ isExpanded()

IlBoolean IlvTreeGadgetItem::isExpanded ( ) const

Indicates whether the item is expanded.

To expand or shrink a tree gadget item, you can use the IlvTreeGadgetItem::expand() and IlvTreeGadgetItem::shrink() member functions.

Returns
IlTrue if the item is expanded. Otherwise, returns IlFalse.
See also
expand(), shrink().

◆ isFirstChild()

IlBoolean IlvTreeGadgetItem::isFirstChild ( ) const

Indicates whether the item is the first child in its parent list.

Returns
IlTrue if this item is the first child of its parent. Otherwise, it returns IlFalse.
See also
getFirstChild(), isLastChild().

◆ isLastChild()

IlBoolean IlvTreeGadgetItem::isLastChild ( ) const

Indicates whether the item is the last child in its parent list.

Returns
IlTrue if this item is the last child of its parent. Otherwise, it returns IlFalse.
See also
getLastChild(), isFirstChild().

◆ isVisible()

IlBoolean IlvTreeGadgetItem::isVisible ( ) const

Indicates whether the item is visible.

Note
This method does not check that the item can be seen on the screen. It only checks that all its ancestors are expanded.
Returns
IlTrue if this item is visible. The item is visible if all its ancestors are expanded.
See also
expand(), shrink().

◆ lastVisible()

IlvTreeGadgetItem* IlvTreeGadgetItem::lastVisible ( ) const

Returns the last visible children of the item.

Returns
The last visible children of this item.
See also
isVisible(), nextVisible(), previousVisible().

◆ nextSelected()

IlvTreeGadgetItem* IlvTreeGadgetItem::nextSelected ( ) const

Returns the next selected item.

Returns
The next selected item, or 0 if there is no selected item.
See also
isSelected(), IlvGadgetItem::select().

◆ nextVisible()

IlvTreeGadgetItem* IlvTreeGadgetItem::nextVisible ( ) const

Returns the next visible item.

Returns
The next visible item.
See also
isVisible(), previousVisible().

◆ previousVisible()

IlvTreeGadgetItem* IlvTreeGadgetItem::previousVisible ( ) const

Returns the previous visible item.

Returns
The previous visible item.
See also
isVisible(), nextVisible().

◆ select()

virtual void IlvTreeGadgetItem::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 from IlvGadgetItem.

◆ setUnknownChildCount()

void IlvTreeGadgetItem::setUnknownChildCount ( IlBoolean  value)

Specifies whether the item should behave as if it had children.

For details, see IlvTreeGadgetItem::hasUnknownChildCount().

Parameters
valueA Boolean value specifying whether the item knows the number of its children (IlTrue) or not (IlFalse).
See also
hasUnknownChildCount().

◆ shrink()

virtual void IlvTreeGadgetItem::shrink ( )
virtual

Shrinks the item.

When an item is shrunk, its children are hidden.

See also
isExpanded(), expand().

◆ sortChildren()

void IlvTreeGadgetItem::sortChildren ( IlUInt  levels = (IlUInt) -1,
IlvTreeGadgetItemCompareFunction  func = 0 
)

Sorts the children of the tree gadget item.

Runs the sorting algorithm on all the children of this item. If you provide a sorting function in the form of an IlvTreeGadgetItemCompareFunction, this function is called to compare each item pair. If you do not provide a sorting function, a default comparison function is used that sort items in the ascendant order using their labels.

Parameters
levelsAn integer value specifying the depth of the sorting algorithm.
funcA sorting function.
See also
IlvTreeGadgetItemHolder::sort(), IlvTreeGadgetItemCompareFunction.