Views
Data Access Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions
IliTreeClassesGadget Class Reference

Gadget class. More...

#include <ilviews/dataccess/gadgets/repview.h>

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

Public Member Functions

 IliTreeClassesGadget (IlvDisplay *display, const IlvRect &rect, IlBoolean enableExpand=IlFalse, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Initializes a tree gadget to display a list of classes with their data if the parameter enableExpand is IlTrue. More...
 
virtual void build ()
 Builds the tree, then displays it. More...
 
void enableExpand (IlBoolean enable)
 Enables or disables the display of data for the classes. More...
 
virtual char ** getClassesList (IlInt &count)
 Returns the class names list. More...
 
IliGetClassesListCallback getClassesListCallback () const
 Returns the callback used to get the list of classes. More...
 
IlAny getClassesListCallbackData () const
 Returns the user data used to get the list of classes. More...
 
virtual char ** getDataList (const char *cl, IlInt &count)
 Returns the list of data for a class. More...
 
IliGetDataListCallback getDataListCallback () const
 Returns the callback used to get the list of data for a class. More...
 
IlAny getDataListCallbackData () const
 Returns the user data used to get the list of data for a class. More...
 
IliTreeEventCallback getDragDropCallback ()
 Returns the callback used to handle the drag-and-drop event. More...
 
IlAny getDragDropCallbackData ()
 Returns the user data used to handle the drag-and-drop event. More...
 
IlBoolean isExpandEnabled () const
 Returns the display status of data for the classes. More...
 
void setClassesListCallback (IliGetClassesListCallback cb, IlAny any=0)
 Sets the callback used to get the list of classes. More...
 
void setDataListCallback (IliGetDataListCallback cb, IlAny any=0)
 Sets the callback used to get the list of data for a class. More...
 
void setDragDropCallback (IliTreeEventCallback cb, IlAny any=0)
 Sets the callback to handle the drag-and-drop event. More...
 

Detailed Description

Gadget class.

Library: dbgadget

The IliTreeClassesGadget class defines a tree gadget that displays the list of classes. For each class, the tree gadget can display the list of data. This class is a generic class. For example, it can be used to display a list of SQL tables (classes) and for each table, the list of columns with their type (data).

See also
IliRepositoryService.

Constructor & Destructor Documentation

◆ IliTreeClassesGadget()

IliTreeClassesGadget::IliTreeClassesGadget ( IlvDisplay display,
const IlvRect rect,
IlBoolean  enableExpand = IlFalse,
IlUShort  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)

Initializes a tree gadget to display a list of classes with their data if the parameter enableExpand is IlTrue.

Parameters
displayThe display.
rectThe location.
enableExpandThe enable-expand flag.
thicknessThe border thickness.
paletteThe palette.

Member Function Documentation

◆ build()

virtual void IliTreeClassesGadget::build ( )
virtual

Builds the tree, then displays it.

If your list of classes or the data of a class changes, you must call this function to rebuild the tree. This function calls the function getClassesList to build the list of classes.

◆ enableExpand()

void IliTreeClassesGadget::enableExpand ( IlBoolean  enable)

Enables or disables the display of data for the classes.

Parameters
enableThe display is enabled if the value is IlTrue.

◆ getClassesList()

virtual char** IliTreeClassesGadget::getClassesList ( IlInt count)
virtual

Returns the class names list.

By default, this function calls the defined callback if there is one.

Parameters
countContains the number of classes.
Returns
The list of class names.

◆ getClassesListCallback()

IliGetClassesListCallback IliTreeClassesGadget::getClassesListCallback ( ) const

Returns the callback used to get the list of classes.

Returns
The callback.

◆ getClassesListCallbackData()

IlAny IliTreeClassesGadget::getClassesListCallbackData ( ) const

Returns the user data used to get the list of classes.

Returns
The user data.

◆ getDataList()

virtual char** IliTreeClassesGadget::getDataList ( const char *  cl,
IlInt count 
)
virtual

Returns the list of data for a class.

By default, this function calls the defined callback if there is one. This function is called when you expand a class for the first time.

Parameters
clThe class name
countContains the number of data.
Returns
The list of data.

◆ getDataListCallback()

IliGetDataListCallback IliTreeClassesGadget::getDataListCallback ( ) const

Returns the callback used to get the list of data for a class.

Returns
The callback.

◆ getDataListCallbackData()

IlAny IliTreeClassesGadget::getDataListCallbackData ( ) const

Returns the user data used to get the list of data for a class.

Returns
The user data.

◆ getDragDropCallback()

IliTreeEventCallback IliTreeClassesGadget::getDragDropCallback ( )

Returns the callback used to handle the drag-and-drop event.

Returns
The callback.

◆ getDragDropCallbackData()

IlAny IliTreeClassesGadget::getDragDropCallbackData ( )

Returns the user data used to handle the drag-and-drop event.

Returns
The user data.

◆ isExpandEnabled()

IlBoolean IliTreeClassesGadget::isExpandEnabled ( ) const

Returns the display status of data for the classes.

The default value is IlTrue.

Returns
The display status.

◆ setClassesListCallback()

void IliTreeClassesGadget::setClassesListCallback ( IliGetClassesListCallback  cb,
IlAny  any = 0 
)

Sets the callback used to get the list of classes.

Parameters
cbThe callback.
anyThe user data.

◆ setDataListCallback()

void IliTreeClassesGadget::setDataListCallback ( IliGetDataListCallback  cb,
IlAny  any = 0 
)

Sets the callback used to get the list of data for a class.

Parameters
cbThe callback.
anyThe user data.

◆ setDragDropCallback()

void IliTreeClassesGadget::setDragDropCallback ( IliTreeEventCallback  cb,
IlAny  any = 0 
)

Sets the callback to handle the drag-and-drop event.

Parameters
cbThe callback.
anyThe user data.