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
IlvTreeGadget Class Reference

Gadget class. More...

#include <ilviews/gadgets/tree.h>

Inheritance diagram for IlvTreeGadget:
IlvScrolledGadget IlvTreeGadgetItemHolder IlvGadget IlvGadgetItemHolder IlvSimpleGraphic IlvStylable IlvGraphic IlvValueInterface IlvFileChooserTree

Public Member Functions

 IlvTreeGadget (IlvDisplay *display, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Constructor. More...
 
IlvTreeGadgetItemaddItem (IlvTreeGadgetItem *parent, const char *label, IlInt index=-1, IlvBitmap *bitmap=0, IlvBitmap *expandedBitmap=0, IlBoolean redraw=IlTrue)
 Adds a new item to the tree gadget. More...
 
virtual IlBoolean allowDragDrop () const
 Indicates whether drag-and-drop operations are allowed for the tree gadget. More...
 
void allowDragDrop (IlBoolean allow)
 Specifies whether drag-and-drop operations should be allowed for the tree gadget. More...
 
IlBoolean areButtonsVisible () const
 Indicates whether the buttons located to the left of parent items are displayed. More...
 
IlBoolean areLinesVisible () const
 Indicates whether the lines connecting tree items to their parent are visible. More...
 
IlBoolean areRootsLinked () const
 Indicates whether the children of the root item are linked by a connecting line. More...
 
virtual void beginPopulate ()
 Stops all scroll bar computing while populating the tree gadget. More...
 
IlBoolean buttonBBox (IlvTreeGadgetItem *item, IlvRect &bbox, const IlvTransformer *t=0) const
 Returns the bounding box of the button associated with the specified item. More...
 
virtual void constantItemHeightAssumed (IlBoolean assumed)
 Indicates that all items are assumed to be the same height. More...
 
virtual IlvGadgetItemcreateItem (const char *label, IlvGraphic *g=0, IlvBitmap *bitmap=0, IlvBitmap *sbitmap=0, IlBoolean copy=IlTrue) const
 Returns a new gadget item. More...
 
void deSelectAll (IlBoolean redraw=IlTrue)
 Deselects all the selected items. More...
 
virtual void drawBackground (IlvPort *, const IlvTransformer *, const IlvRegion *) const
 Draws the gadget background. More...
 
virtual void drawButton (IlvPort *dst, const IlvTreeGadgetItem *item, const IlvRect &bbox, const IlvRegion *clip=0) const
 Is called to draw the button of the specified item. More...
 
virtual void drawFrame (IlvPort *, const IlvTransformer *, const IlvRegion *) const
 Draws the gadget frame. More...
 
virtual void drawGadgetItem (const IlvGadgetItem *, IlvPort *port, const IlvRect &rect, const IlvTransformer *t, const IlvRegion *clip) const
 Draws a specific gadget item. More...
 
virtual void endPopulate (IlBoolean redraw=IlTrue)
 Launches all scroll bar computing after the populating of tree. gadget. More...
 
void ensureVisible (IlvTreeGadgetItem *item, IlBoolean horizontal=IlTrue, IlBoolean redraw=IlTrue)
 Ensures that the specified tree gadget item is visible. More...
 
void expandItem (IlvTreeGadgetItem *item, IlBoolean redraw=IlTrue, IlBoolean all=IlFalse)
 Expands the specified item so that its children become visible. More...
 
virtual void getButtonSize (const IlvTreeGadgetItem *item, IlvDim &width, IlvDim &height) const
 Returns the size of the button of the specified tree gadget item. More...
 
IlvTreeGadgetItemgetCallbackItem () const
 Returns the item that triggered the callback. More...
 
IlvTreeGadgetItemgetFirstVisibleItem () const
 Returns the first visible item of the tree gadget. More...
 
IlvDim getIndent () const
 Returns the number of pixels that children are indented relative to the parent. More...
 
virtual void getLabelOrientation (IlvOrientation &orientation, IlBoolean &flip) const
 Returns the default orientation of the tree item labels. More...
 
virtual IlvPosition getLabelPosition () const
 Returns the default position of the tree item labels, relative to the picture. More...
 
IlvTreeGadgetItemgetLastFullVisibleItem (const IlvTransformer *t=0) const
 Returns the last visible item that can be seen without scrolling the tree gadget. More...
 
IlvTreeGadgetItemgetLastVisibleItem (const IlvTransformer *t=0) const
 Returns the last visible item of the tree gadget. More...
 
IlBoolean getLinesAtRoot () const
 Indicates whether lines connecting the root item to its children are drawn. More...
 
virtual IlvPalettegetNormalTextPalette () const
 Returns the default palette used to draw an item. More...
 
IlvDim getOffset () const
 Returns the horizontal offset defined for the tree gadget. More...
 
virtual IlvPalettegetOpaquePalette () const
 Returns the opaque palette used to draw opaque items. More...
 
IlvTreeGadgetItemgetRoot () const
 Returns the root item of the tree hierarchy. More...
 
IlvTreeSelectionMode getSelectionMode () const
 Returns the selection mode of the tree gadget. More...
 
virtual IlBoolean handleGadgetEvent (IlvEvent &event)
 Handles the gadget events. More...
 
virtual IlBoolean handleTreeEvent (IlvEvent &event)
 Handles the events occurring to the tree. More...
 
virtual IlBoolean hasToolTips () const
 Indicates whether the tree gadget displays tooltips. More...
 
virtual IlBoolean isConstantItemHeightAssumed () const
 Returns IlTrue when all items are assumed to be the same height. More...
 
virtual IlBoolean isEditable () const
 Indicates whether the tree items can be edited. More...
 
virtual IlBoolean isShowingLabel () const
 Indicates whether the tree item labels are displayed. More...
 
virtual IlBoolean isShowingPicture () const
 Indicates whether the tree item pictures are displayed. More...
 
IlBoolean itemBBox (IlvTreeGadgetItem *item, IlvRect &bbox, const IlvTransformer *t=0) const
 Returns the bounding box of the specified item. More...
 
void linkRoots (IlBoolean value, IlBoolean redraw=IlTrue)
 Specifies whether the children of the root item should be linked by a connecting line. More...
 
IlvTreeGadgetItempointToItem (const IlvPoint &point, IlBoolean &button, const IlvTransformer *t) const
 Returns the item located at the specified position. More...
 
IlvTreeGadgetItempointToItemLine (const IlvPoint &point, const IlvTransformer *t) const
 Returns the item located at the specified point. More...
 
virtual void recomputeAllItems ()
 Recomputes the size of all the items managed by the holder. More...
 
void removeAllItems (IlBoolean redraw=IlTrue)
 Removes all the items from the tree gadget. More...
 
void removeItem (IlvTreeGadgetItem *item, IlBoolean redraw=IlTrue)
 Removes and destroys the specified item. More...
 
void scrollToItem (IlvTreeGadgetItem *item, IlBoolean redraw=IlTrue)
 Sets the specified item as the first visible item in the tree gadget. More...
 
void selectItem (IlvTreeGadgetItem *item, IlBoolean value, IlBoolean deselectAll=IlTrue, IlBoolean redraw=IlTrue)
 Selects or deselects the specified tree gadget item. More...
 
void setEditable (IlBoolean value=IlTrue)
 Specifies whether the tree gadget should be editable. More...
 
void setIndent (IlvDim indent, IlBoolean redraw=IlTrue)
 Sets the number of pixels that children are indented relative to the parent. More...
 
void setLabelOrientation (IlvOrientation orientation, IlBoolean flip=IlFalse, IlBoolean redraw=IlTrue)
 Sets the default orientation of the tree item labels. More...
 
void setLabelPosition (IlvPosition position, IlBoolean redraw=IlTrue)
 Sets the default position of the tree item labels, relative to the picture. More...
 
void setLinesAtRoot (IlBoolean value, IlBoolean redraw=IlTrue)
 Specifies whether lines connecting the root item to its children should be drawn. More...
 
void setOffset (IlvDim offset, IlBoolean redraw=IlTrue)
 Sets the horizontal offset of the tree gadget. More...
 
void setSelectionMode (IlvTreeSelectionMode mode)
 Specifies the selection mode of the tree gadget. More...
 
void showButtons (IlBoolean value, IlBoolean redraw=IlTrue)
 Shows or hides the buttons appearing to the left of each parent item. More...
 
void showLabel (IlBoolean value=IlTrue, IlBoolean redraw=IlTrue)
 Indicates whether the tree item labels should be shown or hidden. More...
 
void showLines (IlBoolean value, IlBoolean redraw=IlTrue)
 Shows or hides the lines connecting the tree items to their parent. More...
 
void showPicture (IlBoolean value=IlTrue, IlBoolean redraw=IlTrue)
 Specifies whether the tree item pictures should be shown or hidden. More...
 
void shrinkItem (IlvTreeGadgetItem *item, IlBoolean redraw=IlTrue)
 Shrinks the specified item so that its children are no longer visible. More...
 
virtual void sort (IlvTreeGadgetItem *=0, IlUInt levels=(IlUInt) -1, IlvTreeGadgetItemCompareFunction=0)
 Sorts the children of the specified item. More...
 
void useToolTips (IlBoolean value=IlTrue)
 Specifies whether the tree gadget should display tooltips. More...
 
- Public Member Functions inherited from IlvScrolledGadget
 IlvScrolledGadget (IlvDisplay *display, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Constructor. More...
 
virtual void adjustScrollBars (IlBoolean redraw=IlFalse)
 Recomputes the scroll bars. More...
 
void computeBBox (IlvRect &ibox, IlvRect &vbox, IlvRect &vs, IlvRect &hs, const IlvTransformer *t=0) const
 Computes the bounding boxes of the elements that compose the gadget. More...
 
void computeBBox (IlvRect &ibox, IlvRect &vs, IlvRect &hs, const IlvTransformer *t=0) const
 Computes the bounding boxes of the elements that compose the gadget. More...
 
virtual IlvScrollBarcreateScrollBar (const IlvRect &rect, IlvDirection direction, IlUShort thickness, IlvPalette *palette)
 Returns a new instance of the IlvScrollBar class. More...
 
virtual void drawScrollBar (IlvPort *dst, IlvDirection direction, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws the specified internal scroll bar. More...
 
void fitToRect (const IlvRect &rect)
 Resizes the object so that the scrollable area fits the specified rectangle. More...
 
IlUShort getBottomMargin () const
 Returns the bottom margin. More...
 
IlvScrollBargetHorizontalScrollBar () const
 Returns a pointer to the internal horizontal scroll bar. More...
 
IlUShort getLeftMargin () const
 Returns the left margin. More...
 
IlUShort getRightMargin () const
 Returns the right margin. More...
 
IlvScrollBargetScrollBar (IlvDirection direction) const
 Returns a pointer to the specified internal scroll bar. More...
 
void getScrollBarShowAsNeeded (IlBoolean &vert, IlBoolean &hor) const
 Returns the scroll bar mode of the internal scroll bars. More...
 
IlUShort getTopMargin () const
 Returns the top margin. More...
 
IlvScrollBargetVerticalScrollBar () const
 Returns a pointer to the internal vertical scroll bar. More...
 
virtual IlBoolean handleScrollBarsEvent (IlvEvent &event)
 Handles the internal scroll bars event. More...
 
void hideScrollBar (IlvDirection direction, IlBoolean redraw=IlTrue)
 Hides the specified internal scroll bar. More...
 
virtual void internalBBox (IlvRect &bbox, const IlvTransformer *t=0) const
 Returns the internal bounding box of the gadget. More...
 
void moveScrollBar (IlvDirection direction, IlvPosition where, IlBoolean redraw=IlTrue)
 Moves the specified internal scroll bar to a new position. More...
 
virtual void scrollableSize (IlvDim &width, IlvDim &height) const
 Returns the size of the scrollable area of the gadget. More...
 
virtual void scrollBarBBox (IlvDirection direction, IlvRect &bbox, const IlvTransformer *t=0) const
 Returns the bounding box of the specified internal scroll bar. More...
 
virtual void scrollBarHasMoved (IlvDirection direction)
 Is called when an internal scroll bar has moved. More...
 
void scrollBarShowAsNeeded (IlBoolean vertical, IlBoolean horizontal, IlBoolean redraw=IlTrue)
 Sets the scroll bar mode of the internal scroll bars. More...
 
virtual void scrollBarVisibilityChanged (IlvDirection direction)
 Is called when an internal scroll bar is shown or hidden. More...
 
void setBottomMargin (IlUShort margin)
 Sets the bottom margin. More...
 
void setLeftMargin (IlUShort margin)
 Sets the left margin. More...
 
void setMargin (IlUShort val)
 Sets the left, right, top, and bottom margins. More...
 
void setRightMargin (IlUShort margin)
 Sets the right margin. More...
 
void setTopMargin (IlUShort margin)
 Sets the top margin. More...
 
void showScrollBar (IlvDirection direction, IlBoolean redraw=IlTrue)
 Shows the specified internal scroll bar. More...
 
virtual void visibleBBox (IlvRect &bbox, const IlvTransformer *t=0) const
 Returns the visible bounding box of the gadget. More...
 
IlvPosition whereIsScrollBar (IlvDirection direction) const
 Returns the location of the specified internal scroll bar. More...
 
- Public Member Functions inherited from IlvTreeGadgetItemHolder
void addItem (IlvTreeGadgetItem *parent, IlvTreeGadgetItem *item, IlInt index=-1)
 Adds the specified item to the tree hierarchy. More...
 
virtual IlvGadgetItemapplyToItems (IlvApplyGadgetItem f, IlAny arg)
 Applies the specified function to all the items of the holder. More...
 
virtual int compareItems (const IlvTreeGadgetItem *item1, const IlvTreeGadgetItem *item2) const
 Compares a pair of items. More...
 
void deSelectAll ()
 Deselects all the selected items. More...
 
void detachItem (IlvTreeGadgetItem *item)
 Removes the specified item from the tree without destroying it. More...
 
IlvTreeGadgetItemgetFirstSelectedItem () const
 Retrieves the first selected item. More...
 
IlUInt getItemsCount () const
 Returns the number of items in the tree. More...
 
IlUInt getVisibleItemsCount () const
 Returns the number of visible tree items. More...
 
void moveItem (IlvTreeGadgetItem *item, IlvTreeGadgetItem *parent, IlInt index=-1)
 Moves the specified item to a new parent. More...
 
void removeItem (IlvTreeGadgetItem *item)
 Removes the specified item from the tree. More...
 
- Public Member Functions inherited from IlvGadgetItemHolder
IlvGadgetItemgetCallbackItem () const
 Returns the item that triggered a callback. More...
 
IlvGadgetItemgetDragDropTarget () const
 Returns the target item of a drag-and-drop operation. More...
 
IlvGraphicgetDraggedImage () const
 Returns the graphic object used to draw the ghost image during a drag-and-drop operation. More...
 
IlvGadgetItemgetDraggedItem () const
 Returns the item that is being dragged during a drag-and-drop operation. More...
 
IlvGadgetItemgetEditedItem () const
 Returns the item that is being edited. More...
 
virtual IlvPalettegetHighlightTextPalette () const
 Returns the highlight palette used to draw the label of highlighted items. More...
 
virtual IlvGadgetItemgetItemByName (const char *name) const
 Returns the item whose name is specified. More...
 
IlvGadgetItemgetToolTipItem () const
 Returns the item that is displaying a tooltip. More...
 
virtual void initReDrawItems ()
 Begins a redraw session. 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 IlSymbolExpandCallbackType ()
 Returns the callback type for the Expand callback. More...
 
static IlSymbolSelectCallbackType ()
 Returns the callback type for the Select callback. More...
 
static IlSymbolShrinkCallbackType ()
 Returns the callback type for the Shrink callback. More...
 
- Static Public Member Functions inherited from IlvScrolledGadget
static IlSymbolScrollBarMovedSymbol ()
 Returns the callback type for the Scroll Bar Moved callback. More...
 
static IlSymbolScrollBarVisibilitySymbol ()
 Returns the callback type for the Scroll Bar Visibility Changed callback. More...
 
- Static Public Member Functions inherited from IlvGadgetItemHolder
static IlSymbolAbortDragItemCallbackType ()
 Returns the callback type of the Abort Drag callback. More...
 
static IlSymbolAbortEditItemCallbackType ()
 Returns the callback type of the Abort Edit callback. More...
 
static IlSymbolActivateCallbackType ()
 Returns the callback type of the Activate callback. More...
 
static IlSymbolDragItemCallbackType ()
 Returns the callback type of the Drag Item callback. More...
 
static IlSymbolEndDragItemCallbackType ()
 Returns the callback type of the End Drag callback. More...
 
static IlSymbolEndEditItemCallbackType ()
 Returns the callback type of the End Edit callback. More...
 
static IlSymbolStartDragItemCallbackType ()
 Returns the callback type of the Start Drag callback. More...
 
static IlSymbolStartEditItemCallbackType ()
 Returns the callback type of the Start Edit callback. More...
 

Protected Member Functions

virtual void activate (IlvTreeGadgetItem *item)
 Is called by the interactor when an item is activated. More...
 
virtual void adjustFromScrollBar (const IlvScrollBar *sb, IlvDirection dir)
 Is called to adjust the gadget to the scroll bars values. More...
 
virtual void adjustScrollBarValue (IlvScrollBar *sb, IlvDirection dir)
 Is called to adjust the scroll bar values. More...
 
virtual void deSelect (IlvTreeGadgetItem *item)
 Is called by the interactor when an item is deselected. More...
 
virtual void drawGadgetContents (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws the gadget contents. More...
 
virtual void expand (IlvTreeGadgetItem *item)
 Is called by the interactor when an item is expanded. 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 itemSelected (IlvGadgetItem *item)
 Is called when an item is selected. More...
 
virtual void select (IlvTreeGadgetItem *item)
 Is called by the interactor when an item is selected. More...
 
virtual void shrink (IlvTreeGadgetItem *item)
 Is called by the interactor when an item is shrunk. More...
 
- Protected Member Functions inherited from IlvScrolledGadget
IlvDim getLimitHeightValue () const
 Returns the limit value for the vertical scrolling. More...
 
IlvDim getLimitWidthValue () const
 Returns the limit value for the horizontal scrolling. More...
 
IlvDim getScrollableHeight () const
 Returns the height of the scrollable area. More...
 
IlvDim getScrollableWidth () const
 Returns the width of the scrollable area. More...
 
void setLimitHeightValue (IlvDim value)
 Sets the limit value for the vertical scrolling. More...
 
void setLimitWidthValue (IlvDim value)
 Sets the limit value for the horizontal scrolling. More...
 
void setScrollableHeight (IlvDim height)
 Sets the height of the scrollable area. More...
 
void setScrollableWidth (IlvDim width)
 Sets the width of the scrollable area. More...
 
- Protected Member Functions inherited from IlvGadgetItemHolder
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 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 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 IlvDefaultTreeGadgetLFHandler
 
class IlvTreeGadgetItem
 

Detailed Description

Gadget class.

Library: ilvadvgdt

An IlvTreeGadget is a gadget that displays a hierarchical list of items. Each item is an instance of the IlvTreeGadgetItem class. Each tree gadget item displays a label and an optional bitmap and has a list of subitems. The user can expand or shrink the item to show or hide its subitems. The main callback of the tree gadget is invoked when the user double-clicks an item that has no children.

- Tree Gadget -

See also
IlvTreeGadgetItem, 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 IlvScrolledGadget and adds the following ones:

Data accessors

Name Type Equivalent methods
indentation UInt getIndent(), setIndent()
linesAtRoot Boolean getLinesAtRoot(), setLinesAtRoot()
visibleButtons Boolean areButtonsVisible(), showButtons()
visibleLines Boolean areLinesVisible(), showLines()
linkedRoots Boolean areRootsLinked(), linkRoots()
editable Boolean isEditable(), setEditable()
showLabel Boolean isShowingLabel(), showLabel()
showPicture Boolean isShowingPicture(), showPicture()
labelPosition Direction getLabelPosition(), setLabelPosition()
labelOrientation Direction getLabelOrientation(), setLabelOrientation()
flipLabel Boolean getLabelOrientation(), setLabelOrientation()
hasToolTips Boolean hasToolTips(), useToolTips()
dragdrop Boolean allowDragDrop(), allowDragDrop()
selectionMode String getSelectionMode(), setSelectionMode()
itemsCount UInt getItemsCount()
root Object getRoot()
firstVisible Object getFirstVisibleItem()
firstSelectedItem Object getFirstSelectedItem()
callbackItem Object getCallbackItem()

Method accessors

Name Return type Equivalent methods
shrinkItem(IlvTreeGadgetItem item) Void shrinkItem(IlvTreeGadgetItem* item, IlBoolean)
expandItem(IlvTreeGadgetItem item) Void expandItem(IlvTreeGadgetItem* item, IlBoolean, IlBoolean)
removeAllItems() Void removeAllItems()
removeItem(IlvTreeGadgetItem item) Void removeItem(IlvTreeGadgetItem* item, IlBoolean)
addItem(IlvTreeGadgetItem parent, String label, IlInt index, Bitmap bitmap, Bitmap expandedBitmap) Object addItem(IlvTreeGadgetItem* parent, const char* label, IlInt index, IlvBitmap* bitmap, IlvBitmap* expandedBitmap, IlBoolean)
selectItem(IlvTreeGadgetItem item, Boolean set, Boolean deselectAll) Void selectItem(IlvTreeGadgetItem* item, IlBoolean set, IlBoolean deselectAll, IlBoolean)
deSelectAll() Void deSelectAll()
sort(IlvTreeGadgetItem item, UInt levels) Void sort(IlvTreeGadgetItem* item, IlUInt levels, IlvTreeGadgetItemCompareFunction)
getItemByName(String name) Object getItemByName(const char* name) const

Styling\nThis class supports the following CSS properties:

Graphic property CSS property Type
Background color background-color Color
Text color color Color

Constructor & Destructor Documentation

◆ IlvTreeGadget()

IlvTreeGadget::IlvTreeGadget ( IlvDisplay display,
const IlvRect rect,
IlUShort  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)

Constructor.

Initializes a new instance of the class IlvTreeGadget.

Parameters
displayThe connection to the display.
rectThe size and position of the tree gadget.
thicknessThe thickness of the tree gadget.
paletteThe palette used by the tree gadget.

Member Function Documentation

◆ activate()

virtual void IlvTreeGadget::activate ( IlvTreeGadgetItem item)
protectedvirtual

Is called by the interactor when an item is activated.

An item is activated when the user double-clicks on it. The default implementation calls the Activate callback.

Parameters
itemThe activated item.
See also
IlvGadgetItemHolder::ActivateCallbackType(), IlvGadgetItem::activate().

◆ addItem()

IlvTreeGadgetItem* IlvTreeGadget::addItem ( IlvTreeGadgetItem parent,
const char *  label,
IlInt  index = -1,
IlvBitmap bitmap = 0,
IlvBitmap expandedBitmap = 0,
IlBoolean  redraw = IlTrue 
)

Adds a new item to the tree gadget.

Parameters
parentThe parent item to which the new item will be attached. If parent is 0, the item is added to the root item of the tree gadget.
labelThe label of the new item.
indexThe position where the new item will be added. If index is -1, the item is added at the end of the parent child list.
bitmapThe sensitive bitmap of the new item.
expandedBitmapThe expanded bitmap of the new item.
redrawA Boolean value specifying whether the tree gadget should be redrawn.
See also
IlvTreeGadgetItem::insertChild(), removeItem(), detachItem().

◆ adjustFromScrollBar()

virtual void IlvTreeGadget::adjustFromScrollBar ( const IlvScrollBar scrollbar,
IlvDirection  direction 
)
protectedvirtual

Is called to adjust the gadget to the scroll bars values.

Is called each time the scroll bar scrollbar of direction direction moves. If you want to detect these events, you must redefine this member function in a subclass. The default implementation does nothing.

Parameters
scrollbarThe scroll bar object.
directionThe direction of the scroll bar. Valid values are: IlvHorizontal and IlvVertical.
See also
adjustScrollBarValue().

Reimplemented from IlvScrolledGadget.

◆ adjustScrollBarValue()

virtual void IlvTreeGadget::adjustScrollBarValue ( IlvScrollBar scrollbar,
IlvDirection  direction 
)
protectedvirtual

Is called to adjust the scroll bar values.

Is called by the member function adjustScrollBars() to adjust the values of the scroll bar scrollbar of direction direction. This member function must modify the scrollbar values to match the gadget scrolling mode. If you want to detect these events, you must redefine this member function in a subclass. The default implementation does nothing.

Parameters
scrollbarThe scroll bar object.
directionThe direction of the scroll bar. Valid values are: IlvHorizontal and IlvVertical.
See also
adjustFromScrollBar().

Reimplemented from IlvScrolledGadget.

◆ allowDragDrop() [1/2]

virtual IlBoolean IlvTreeGadget::allowDragDrop ( ) const
virtual

Indicates whether drag-and-drop operations are allowed for the tree gadget.

Returns
IlTrue if drag-and-drop operations are allowed and IlFalse otherwise.
See also
IlvGadgetItemHolder::startDragItem(), allowDragDrop(IlBoolean).

Reimplemented from IlvGadgetItemHolder.

◆ allowDragDrop() [2/2]

void IlvTreeGadget::allowDragDrop ( IlBoolean  allow)

Specifies whether drag-and-drop operations should be allowed for the tree gadget.

Parameters
allowA Boolean value specifying whether drag-and-drop operations should be allowed (IlTrue).
See also
IlvGadgetItemHolder::startDragItem(), allowDragDrop().

◆ areButtonsVisible()

IlBoolean IlvTreeGadget::areButtonsVisible ( ) const

Indicates whether the buttons located to the left of parent items are displayed.

Returns
IlTrue if the buttons to the left of parent items are displayed.
See also
showButtons().

◆ areLinesVisible()

IlBoolean IlvTreeGadget::areLinesVisible ( ) const

Indicates whether the lines connecting tree items to their parent are visible.

Returns
IlTrue if the lines connecting tree items to their parent are visible.
See also
showLines().

◆ areRootsLinked()

IlBoolean IlvTreeGadget::areRootsLinked ( ) const

Indicates whether the children of the root item are linked by a connecting line.

Returns
IlTrue if the children of the root item are linked by a connecting line.
See also
linkRoots().

◆ beginPopulate()

virtual void IlvTreeGadget::beginPopulate ( )
virtual

Stops all scroll bar computing while populating the tree gadget.

Call this function to indicate to the tree gadget that all computing operations about scroll bar are stopped while populating the tree gadget.

◆ buttonBBox()

IlBoolean IlvTreeGadget::buttonBBox ( IlvTreeGadgetItem item,
IlvRect bbox,
const IlvTransformer t = 0 
) const

Returns the bounding box of the button associated with the specified item.

Parameters
itemThe tree item.
bboxThe returned bounding box of the button associated with item when the tree is drawn with the transformer t.
tThe transformer applied to the tree gadget.
Returns
A Boolean value indicating whether the item button is visible. If IlFalse is returned, the value in bbox is not relevant.

◆ constantItemHeightAssumed()

virtual void IlvTreeGadget::constantItemHeightAssumed ( IlBoolean  assumed)
virtual

Indicates that all items are assumed to be the same height.

You can override item height checking to enable faster tree gadget refreshes when you have a lot of items that are all the same height. Use this method to notify the tree gadget instance not to perform height checking. This override is not saved to the ilv file and so is not persistent.

Parameters
assumedIf IlTrue, item height is not checked by the tree gadget instance. The default value is IlFalse.

◆ createItem()

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

Returns a new gadget item.

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

Parameters
labelThe item label.
graphicThe IlvGraphic object representing the picture associated with the item.
bitmapThe IlvBitmap object representing the picture associated with the item.
selbitmapThe IlvBitmap object representing the picture of the item when it is selected.
copySpecifies 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.
Note
If both the second and third parameters are not 0, only the second parameter is used.
Returns
The created gadget item.

Reimplemented from IlvTreeGadgetItemHolder.

Reimplemented in IlvFileChooserTree.

◆ deSelect()

virtual void IlvTreeGadget::deSelect ( IlvTreeGadgetItem item)
protectedvirtual

Is called by the interactor when an item is deselected.

The default implementation calls the Select callback.

Parameters
itemThe deselected item.
See also
SelectCallbackType.

◆ deSelectAll()

void IlvTreeGadget::deSelectAll ( IlBoolean  redraw = IlTrue)

Deselects all the selected items.

Parameters
redrawA Boolean value specifying whether the tree gadget should be redrawn.
See also
IlvGadgetItem::isSelected(), IlvGadgetItem::select().

◆ drawBackground()

virtual void IlvTreeGadget::drawBackground ( IlvPort dst,
const IlvTransformer t,
const IlvRegion clip 
) const
virtual

Draws the gadget background.

Is called from the draw() method. This method is not called if the gadget is transparent.

Parameters
dstThe destination drawing port.
tThe transformer applied to the gadget.
clipThe clipping area.
See also
drawFrame(), drawScrollBar(), drawGadgetContents(), IlvGadget::isTransparent().

Reimplemented from IlvScrolledGadget.

◆ drawButton()

virtual void IlvTreeGadget::drawButton ( IlvPort dst,
const IlvTreeGadgetItem item,
const IlvRect bbox,
const IlvRegion clip = 0 
) const
virtual

Is called to draw the button of the specified item.

Parameters
dstThe drawing destination port.
itemThe tree gadget item.
bboxThe rectangle where the button of item should be drawn.
clipThe clipping area.
See also
buttonBBox().

◆ drawFrame()

virtual void IlvTreeGadget::drawFrame ( IlvPort dst,
const IlvTransformer t,
const IlvRegion clip 
) const
virtual

Draws the gadget frame.

Is called from the draw() method. This method is not called if the method isShowingFrame() returns IlFalse.

Parameters
dstThe destination drawing port.
tThe transformer applied to the gadget.
clipThe clipping area.
See also
drawBackground(), drawScrollBar(), drawGadgetContents().

Reimplemented from IlvScrolledGadget.

◆ drawGadgetContents()

virtual void IlvTreeGadget::drawGadgetContents ( IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const
protectedvirtual

Draws the gadget contents.

Is called from the draw() method. The default implementation does nothing.

Parameters
dstThe destination drawing port.
tThe transformer applied to the gadget.
clipThe clipping area.
See also
drawBackground(), drawScrollBar(), drawFrame().

Reimplemented from IlvScrolledGadget.

◆ drawGadgetItem()

virtual void IlvTreeGadget::drawGadgetItem ( const IlvGadgetItem item,
IlvPort port,
const IlvRect rect,
const IlvTransformer t,
const IlvRegion clip 
) const
virtual

Draws a specific gadget item.

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

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

Reimplemented from IlvGadgetItemHolder.

◆ endPopulate()

virtual void IlvTreeGadget::endPopulate ( IlBoolean  redraw = IlTrue)
virtual

Launches all scroll bar computing after the populating of tree. gadget.

Call this function to indicate to the tree gadget that all scroll bar computing can be done after the populating if necessary.

Parameters
redrawA Boolean value specifying whether the tree gadget should be redrawn.

◆ ensureVisible()

void IlvTreeGadget::ensureVisible ( IlvTreeGadgetItem item,
IlBoolean  horizontal = IlTrue,
IlBoolean  redraw = IlTrue 
)

Ensures that the specified tree gadget item is visible.

Parameters
itemThe tree gadget item to be made visible.
horizontalA Boolean value specifying whether the item visibility will be checked horizontally. If horizontal is set to IlTrue, the horizontal offset of the tree gadget item can be modified by this method.
redrawA Boolean value specifying whether the tree gadget should be redrawn.
See also
scrollToItem().

◆ expand()

virtual void IlvTreeGadget::expand ( IlvTreeGadgetItem item)
protectedvirtual

Is called by the interactor when an item is expanded.

The default implementation calls the Expand callback.

Parameters
itemThe expanded item.
See also
ExpandCallbackType, expandItem().

◆ ExpandCallbackType()

static IlSymbol* IlvTreeGadget::ExpandCallbackType ( )
static

Returns the callback type for the Expand callback.

The Expand callback is called when an item is expanded.

See also
IlvGraphic::setCallback(), IlvTreeGadgetItem::expand(), expandItem().

◆ expandItem()

void IlvTreeGadget::expandItem ( IlvTreeGadgetItem item,
IlBoolean  redraw = IlTrue,
IlBoolean  all = IlFalse 
)

Expands the specified item so that its children become visible.

Parameters
itemThe item to be expanded.
redrawA Boolean value specifying whether the tree gadget should be redrawn.
allA Boolean value specifying whether the method should expand the children of item (IlTrue) recursively or not (IlTrue).
See also
IlvTreeGadgetItem::expand().

◆ getButtonSize()

virtual void IlvTreeGadget::getButtonSize ( const IlvTreeGadgetItem item,
IlvDim width,
IlvDim height 
) const
virtual

Returns the size of the button of the specified tree gadget item.

Note
The returned height must be smaller than the height of item.
Parameters
itemThe tree gadget item.
widthThe width of the buttons of the tree gadget.
heightThe width of the buttons of the tree gadget.
See also
drawButton(), buttonBBox().

◆ getCallbackItem()

IlvTreeGadgetItem* IlvTreeGadget::getCallbackItem ( ) const

Returns the item that triggered the callback.

Returns
The item that triggered the callback. This method should be used only in the callback.

◆ getFirstVisibleItem()

IlvTreeGadgetItem* IlvTreeGadget::getFirstVisibleItem ( ) const

Returns the first visible item of the tree gadget.

Returns
The first visible item of the tree.
See also
scrollToItem(), getLastFullVisibleItem(), getLastVisibleItem().

◆ getIndent()

IlvDim IlvTreeGadget::getIndent ( ) const
virtual

Returns the number of pixels that children are indented relative to the parent.

Returns
The number of pixels that children are indented relative to the parent.
See also
setIndent().

Implements IlvTreeGadgetItemHolder.

◆ getLabelOrientation()

virtual void IlvTreeGadget::getLabelOrientation ( IlvOrientation &  orientation,
IlBoolean flip 
) const
virtual

Returns the default orientation of the tree item labels.

Parameters
orientationThe default orientation of the labels.
flipA Boolean value indicating whether the labels should be flipped or not.
See also
setLabelOrientation().

Reimplemented from IlvGadgetItemHolder.

◆ getLabelPosition()

virtual IlvPosition IlvTreeGadget::getLabelPosition ( ) const
virtual

Returns the default position of the tree item labels, relative to the picture.

Returns
The default position of the tree item labels, relative to the picture.
See also
setLabelPosition().

Reimplemented from IlvGadgetItemHolder.

◆ getLastFullVisibleItem()

IlvTreeGadgetItem* IlvTreeGadget::getLastFullVisibleItem ( const IlvTransformer t = 0) const

Returns the last visible item that can be seen without scrolling the tree gadget.

Parameters
tThe transformer applied to the tree gadget.
Returns
The last visible item that can be seen without scrolling the tree gadget. If the first visible item is larger than the tree gadget height, the first visible item is returned.
See also
getFirstVisibleItem(), getLastVisibleItem().

◆ getLastVisibleItem()

IlvTreeGadgetItem* IlvTreeGadget::getLastVisibleItem ( const IlvTransformer t = 0) const

Returns the last visible item of the tree gadget.

Parameters
tThe transformer applied to the tree gadget.
Returns
The last visible item when this tree gadget is displayed with the transformer t. Only part of the item can be visible.
See also
getLastFullVisibleItem(), getFirstVisibleItem().

◆ getLinesAtRoot()

IlBoolean IlvTreeGadget::getLinesAtRoot ( ) const

Indicates whether lines connecting the root item to its children are drawn.

Returns
IlTrue if lines connecting the root item to its children are drawn.
See also
setLinesAtRoot().

◆ getNormalTextPalette()

virtual IlvPalette* IlvTreeGadget::getNormalTextPalette ( ) const
virtual

Returns the default palette used to draw an item.

Returns
The default palette used to draw an item.

Implements IlvGadgetItemHolder.

◆ getOffset()

IlvDim IlvTreeGadget::getOffset ( ) const

Returns the horizontal offset defined for the tree gadget.

When the user moves the horizontal scroll bar, the tree gadget items are shifted to the left according to the defined offset value. The bigger the value, the further to the left the items will be displayed.

See also
setOffset().

◆ getOpaquePalette()

virtual IlvPalette* IlvTreeGadget::getOpaquePalette ( ) const
virtual

Returns the opaque palette used to draw opaque items.

Returns
The opaque palette used to draw opaque items.

Reimplemented from IlvGadgetItemHolder.

◆ getRoot()

IlvTreeGadgetItem* IlvTreeGadget::getRoot ( ) const
virtual

Returns the root item of the tree hierarchy.

Returns
The root item of the tree hierarchy.
See also
addItem(), removeItem(), detachItem().

Implements IlvTreeGadgetItemHolder.

◆ getSelectionMode()

IlvTreeSelectionMode IlvTreeGadget::getSelectionMode ( ) const

Returns the selection mode of the tree gadget.

Returns
The selection mode of the tree. The result may be either IlvTreeExtendedSelection or IlvTreeSingleSelection.
See also
setSelectionMode().

◆ handleGadgetEvent()

virtual IlBoolean IlvTreeGadget::handleGadgetEvent ( IlvEvent event)
virtual

Handles the gadget events.

Is called by handleEvent() when the member function handleScrollBarsEvent() returns IlFalse. Its default implementation does nothing. You can override this member function to implement your own gadget behavior.

Parameters
eventThe event.
See also
handleScrollBarsEvent().

Reimplemented from IlvScrolledGadget.

◆ handleTreeEvent()

virtual IlBoolean IlvTreeGadget::handleTreeEvent ( IlvEvent event)
virtual

Handles the events occurring to the tree.

You can override this member function to implement a new behavior for the tree gadget.

Parameters
eventThe event to be handled.
Returns
A Boolean value specifying whether the tree gadget handles the events.

◆ hasToolTips()

virtual IlBoolean IlvTreeGadget::hasToolTips ( ) const
virtual

Indicates whether the tree gadget displays tooltips.

Returns
IlTrue if the tree gadget displays tooltips. Otherwise, returns IlFalse.
See also
useToolTips().

Reimplemented from IlvGadgetItemHolder.

◆ isConstantItemHeightAssumed()

virtual IlBoolean IlvTreeGadget::isConstantItemHeightAssumed ( ) const
virtual

Returns IlTrue when all items are assumed to be the same height.

When you assume that all items are the same height, tree gadget refreshes are faster because the item height is not checked.

Returns
Returns IlTrue when all items are assumed to be the same height. The default value is IlFalse.

◆ isEditable()

virtual IlBoolean IlvTreeGadget::isEditable ( ) const
virtual

Indicates whether the tree items can be edited.

Returns
IlTrue if the tree gadget can be edited. Otherwise, returns IlFalse.
See also
setEditable(), IlvGadgetItem::isEditable().

Reimplemented from IlvGadgetItemHolder.

◆ isShowingLabel()

virtual IlBoolean IlvTreeGadget::isShowingLabel ( ) const
virtual

Indicates whether the tree item labels are displayed.

Returns
IlTrue if the tree item labels are displayed. Otherwise, returns IlFalse.
See also
showLabel(), isShowingPicture().

Reimplemented from IlvGadgetItemHolder.

◆ isShowingPicture()

virtual IlBoolean IlvTreeGadget::isShowingPicture ( ) const
virtual

Indicates whether the tree item pictures are displayed.

Returns
IlTrue if the tree item pictures are displayed. Otherwise, returns IlFalse.
See also
showPicture(), isShowingLabel().

Reimplemented from IlvGadgetItemHolder.

◆ itemActivated()

virtual void IlvTreeGadget::itemActivated ( IlvGadgetItem item)
protectedvirtual

Is called when an item is activated.

The default implementation calls the Activate callback.

Parameters
itemThe activated gadget item.
See also
IlvGadgetItem::activate().

Reimplemented from IlvGadgetItemHolder.

◆ itemBBox()

IlBoolean IlvTreeGadget::itemBBox ( IlvTreeGadgetItem item,
IlvRect bbox,
const IlvTransformer t = 0 
) const

Returns the bounding box of the specified item.

Parameters
itemThe tree item.
bboxThe returned bounding box of item when the tree is drawn with the transformer t.
tThe transformer applied to the tree gadget.
Returns
A Boolean value indicating whether the item is visible. If IlFalse is returned, the value in bbox is not relevant.

◆ itemDeSelected()

virtual void IlvTreeGadget::itemDeSelected ( IlvGadgetItem item)
protectedvirtual

Is called when an item is deselected.

The default implementation does nothing.

Parameters
itemThe deselected gadget item.
See also
IlvGadgetItem::deSelect().

Reimplemented from IlvGadgetItemHolder.

◆ itemSelected()

virtual void IlvTreeGadget::itemSelected ( IlvGadgetItem item)
protectedvirtual

Is called when an item is selected.

The default implementation does nothing.

Parameters
itemThe selected gadget item.
See also
IlvGadgetItem::select().

Reimplemented from IlvGadgetItemHolder.

◆ linkRoots()

void IlvTreeGadget::linkRoots ( IlBoolean  value,
IlBoolean  redraw = IlTrue 
)

Specifies whether the children of the root item should be linked by a connecting line.

Parameters
valueA Boolean value specifying whether the children of the root item should be linked by a connecting line (IlTrue) or not (IlFalse).
redrawA Boolean value specifying whether the tree gadget should be redrawn.
See also
areRootsLinked().

◆ pointToItem()

IlvTreeGadgetItem* IlvTreeGadget::pointToItem ( const IlvPoint point,
IlBoolean button,
const IlvTransformer t 
) const

Returns the item located at the specified position.

Parameters
pointThe position of the item to be retrieved.
buttonA Boolean value indicating whether point is located inside the item button.
tThe transformer applied to the tree gadget.
Returns
The item located at the position specified by point when the tree gadget is drawn with the transformer t, or 0 if there is no item.
See also
pointToItemLine().

◆ pointToItemLine()

IlvTreeGadgetItem* IlvTreeGadget::pointToItemLine ( const IlvPoint point,
const IlvTransformer t 
) const

Returns the item located at the specified point.

The point parameter represents the y coordinate of a point that is located between the top and bottom border of the item bounding box.

Parameters
pointThe position of the item to be retrieved.
tThe transformer applied to the tree gadget.
Returns
The item located at the position specified by point when the tree gadget is drawn using the transformer t.
See also
pointToItem().

◆ recomputeAllItems()

virtual void IlvTreeGadget::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 from IlvGadgetItemHolder.

◆ removeAllItems()

void IlvTreeGadget::removeAllItems ( IlBoolean  redraw = IlTrue)

Removes all the items from the tree gadget.

The root item is never deleted.

Parameters
redrawA Boolean value specifying whether the tree gadget should be redrawn.
See also
removeItem(), detachItem(), addItem().

◆ removeItem()

void IlvTreeGadget::removeItem ( IlvTreeGadgetItem item,
IlBoolean  redraw = IlTrue 
)

Removes and destroys the specified item.

item and all its children are removed and deleted.

Parameters
itemThe item to remove.
redrawA Boolean value specifying whether the tree gadget should be redrawn.

◆ scrollToItem()

void IlvTreeGadget::scrollToItem ( IlvTreeGadgetItem item,
IlBoolean  redraw = IlTrue 
)

Sets the specified item as the first visible item in the tree gadget.

Scrolls the tree gadget vertically so that item becomes the first visible item.

Parameters
itemThe new first visible item.
redrawA Boolean value specifying whether the tree gadget should be redrawn.
See also
getFirstVisibleItem().

◆ select()

virtual void IlvTreeGadget::select ( IlvTreeGadgetItem item)
protectedvirtual

Is called by the interactor when an item is selected.

The default implementation calls the Select callback.

Parameters
itemThe selected item.
See also
SelectCallbackType.

◆ SelectCallbackType()

static IlSymbol* IlvTreeGadget::SelectCallbackType ( )
static

Returns the callback type for the Select callback.

The Select callback is called when an item is selected or deselected. The item that has been selected or deselected is returned by IlvTreeGadget::getCallbackItem(). If the item has just been selected, then IlvGadgetItem::isSelected() returns IlTrue for that item. If the item has just been deselected, then IlvGadgetItem::isSelected() returns IlFalse.

See also
IlvGraphic::setCallback(), IlvGadgetItem::select(), IlvGadgetItem::deSelect().

◆ selectItem()

void IlvTreeGadget::selectItem ( IlvTreeGadgetItem item,
IlBoolean  value,
IlBoolean  deselectAll = IlTrue,
IlBoolean  redraw = IlTrue 
)

Selects or deselects the specified tree gadget item.

Parameters
itemThe tree gadget item to be selected or deselected.
valueA Boolean value specifying whether item should be selected or deselected.
deselectAllA Boolean value specifying whether all the tree gadget items should be deselected before the selection of item is modified.
redrawA Boolean value specifying whether the tree gadget should be redrawn.
See also
IlvGadgetItem::select(), IlvGadgetItem::deSelect().

◆ setEditable()

void IlvTreeGadget::setEditable ( IlBoolean  value = IlTrue)

Specifies whether the tree gadget should be editable.

When this member function is set to IlTrue, you can edit a tree gadget item by clicking on it or by pressing the F2 key once it is selected.

Parameters
valueA Boolean value specifying whether the tree gadget can be edited (IlTrue) or not (IlFalse).
See also
isEditable(), IlvGadgetItem::setEditable().

◆ setIndent()

void IlvTreeGadget::setIndent ( IlvDim  indent,
IlBoolean  redraw = IlTrue 
)

Sets the number of pixels that children are indented relative to the parent.

Parameters
indentThe new indentation value.
redrawA Boolean value specifying whether the tree gadget should be redrawn.
See also
getIndent().

◆ setLabelOrientation()

void IlvTreeGadget::setLabelOrientation ( IlvOrientation  orientation,
IlBoolean  flip = IlFalse,
IlBoolean  redraw = IlTrue 
)

Sets the default orientation of the tree item labels.

When orientation is set to IlvHorizontal, labels are drawn from left to right. When orientation is set to IlvVertical, labels are drawn from top to the bottom if flip is IlFalse and from bottom to top if flip is IlTrue.

Parameters
orientationThe new orientation of the labels.
flipA Boolean value specifying whether the labels are flipped or not.
redrawA Boolean value specifying whether the tree gadget should be redrawn.
See also
getLabelOrientation().

◆ setLabelPosition()

void IlvTreeGadget::setLabelPosition ( IlvPosition  position,
IlBoolean  redraw = IlTrue 
)

Sets the default position of the tree item labels, relative to the picture.

This setting is used to compute the geometry of each tree item. For more information, see the member function IlvGadgetItem::setLabelPosition().

Parameters
positionThe new position of the tree item labels, relative to the picture.
redrawA Boolean value specifying whether the tree gadget should be redrawn.

◆ setLinesAtRoot()

void IlvTreeGadget::setLinesAtRoot ( IlBoolean  value,
IlBoolean  redraw = IlTrue 
)

Specifies whether lines connecting the root item to its children should be drawn.

Parameters
valueA Boolean value specifying whether connecting lines should be drawn between the root item and its children.
redrawA Boolean value specifying whether the tree gadget should be redrawn.

◆ setOffset()

void IlvTreeGadget::setOffset ( IlvDim  offset,
IlBoolean  redraw = IlTrue 
)

Sets the horizontal offset of the tree gadget.

When the user moves the horizontal scroll bar, the tree gadget items are shifted to the left according to the defined offset value. The bigger the value, the further to the left the items will be displayed.

Parameters
offsetThe new horizontal offset.
redrawA Boolean value specifying whether the tree gadget should be redrawn.
See also
getOffset().

◆ setSelectionMode()

void IlvTreeGadget::setSelectionMode ( IlvTreeSelectionMode  mode)

Specifies the selection mode of the tree gadget.

Parameters
modeThe new selection mode. Valid values are: IlvTreeExtendedSelection for the multiple selection mode, or IlvTreeSingleSelection for the single selection mode.
See also
getSelectionMode().

◆ showButtons()

void IlvTreeGadget::showButtons ( IlBoolean  value,
IlBoolean  redraw = IlTrue 
)

Shows or hides the buttons appearing to the left of each parent item.

Parameters
valueA Boolean value specifying whether the buttons located to the left of each parent item should be shown (IlTrue) or hidden (IlFalse).
redrawA Boolean value specifying whether the tree gadget should be redrawn.
See also
areButtonsVisible().

◆ showLabel()

void IlvTreeGadget::showLabel ( IlBoolean  value = IlTrue,
IlBoolean  redraw = IlTrue 
)

Indicates whether the tree item labels should be shown or hidden.

Parameters
valueA Boolean value specifying whether the tree item labels should be shown (IlTrue) or hidden (IlFalse).
redrawA Boolean value specifying whether the tree gadget should be redrawn.
See also
isShowingLabel(), showPicture().

◆ showLines()

void IlvTreeGadget::showLines ( IlBoolean  value,
IlBoolean  redraw = IlTrue 
)

Shows or hides the lines connecting the tree items to their parent.

Parameters
valueA Boolean value specifying whether the lines connecting the tree items to their parent should be shown (IlTrue).
redrawA Boolean value specifying whether the tree gadget should be redrawn.
See also
areLinesVisible().

◆ showPicture()

void IlvTreeGadget::showPicture ( IlBoolean  value = IlTrue,
IlBoolean  redraw = IlTrue 
)

Specifies whether the tree item pictures should be shown or hidden.

Parameters
valueA Boolean value specifying whether the tree item pictures should be shown (IlTrue) or hidden (IlFalse).
redrawA Boolean value specifying whether the tree gadget should be redrawn.
See also
isShowingPicture(), showLabel().

◆ shrink()

virtual void IlvTreeGadget::shrink ( IlvTreeGadgetItem item)
protectedvirtual

Is called by the interactor when an item is shrunk.

The default implementation calls the Shrink callback.

Parameters
itemThe shrunk item.
See also
ShrinkCallbackType, shrinkItem().

◆ ShrinkCallbackType()

static IlSymbol* IlvTreeGadget::ShrinkCallbackType ( )
static

Returns the callback type for the Shrink callback.

The Shrink callback is called when an item is shrunk.

See also
IlvGraphic::setCallback(), IlvTreeGadgetItem::shrink(), shrinkItem().

◆ shrinkItem()

void IlvTreeGadget::shrinkItem ( IlvTreeGadgetItem item,
IlBoolean  redraw = IlTrue 
)

Shrinks the specified item so that its children are no longer visible.

Parameters
itemThe item to be shrunk.
redrawA Boolean value specifying whether the tree gadget should be redrawn.
See also
IlvTreeGadgetItem::shrink().

◆ sort()

virtual void IlvTreeGadget::sort ( IlvTreeGadgetItem item = 0,
IlUInt  levels = (IlUInt) -1,
IlvTreeGadgetItemCompareFunction  func = 0 
)
virtual

Sorts the children of the specified item.

Runs the sorting algorithm on all the children of 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
itemThe item whose children are going to be sorted.
levelsAn integer value specifying the depth of the sorting algorithm.
funcA sorting function.
See also
IlvTreeGadgetItem::sortChildren(), IlvTreeGadgetItemCompareFunction, compareItems().

Reimplemented from IlvTreeGadgetItemHolder.

◆ useToolTips()

void IlvTreeGadget::useToolTips ( IlBoolean  value = IlTrue)

Specifies whether the tree gadget should display tooltips.

A tooltip is displayed when the cursor remains over a partially visible item for a short while.

Parameters
valueA Boolean value specifying whether the tree gadget should display tooltips (IlTrue) or not (IlFalse).
See also
hasToolTips().