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

Gadget class. More...

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

Inheritance diagram for IliGadgetSet:
IlvGadget IlvSimpleGraphic IlvStylable IlvGraphic IlvValueInterface IliDbNavigator IliToggleSelector

Public Member Functions

 IliGadgetSet (IlvDisplay *display, const IlvRect &rect, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Initializes an empty gadget set. More...
 
virtual void addObject (IlvGadget *obj, IlBoolean visible=IlTrue)
 Adds a gadget to the gadget set. More...
 
void disableToolTip ()
 Disables tooltip display.
 
void enableToolTip ()
 Enables tooltip display. More...
 
IlUInt getCardinal () const
 Returns the number of gadgets in the gadget set. More...
 
IlvGadgetgetFocusObject () const
 Returns the focus gadget of the gadget set or 0 if no focus gadget is defined. More...
 
IlInt getIndex (IlvGadget *g) const
 Returns the position of a gadget in the gadget set. More...
 
IlvGadgetgetObject (const char *name) const
 Returns a gadget. More...
 
IlvGadgetgetObject (IlUInt index) const
 Returns a gadget. More...
 
IlBoolean isObjectSensitive (IlvGadget *obj) const
 Returns IlTrue if gadget is sensitive to user interaction. More...
 
IlBoolean isVisible (const IlvGadget *) const
 Returns IlTrue if the gadget parameter belongs to the gadget set and if it is visible. More...
 
virtual void objectReceivedEvent (IlvGadget *obj)
 Called when a gadget received an event. More...
 
virtual void removeObject (IlvGadget *obj, IlBoolean deleteIt=IlTrue)
 Removes a gadget from the gadget set. More...
 
virtual IlBoolean setFocusObject (IlvGadget *obj)
 Sets the focus gadget. More...
 
void setObjectSensitive (IlvGadget *obj, IlBoolean active)
 Enables/disables user interaction. More...
 
void setVisible (IlvGadget *obj, IlBoolean visible)
 Shows/Hides a gadget. More...
 

Detailed Description

Gadget class.

Library: dbgadget

The IliGadgetSet defines a gadget that contains other gadgets. Each gadget is part of a gadget set which has:

In addition, one of the gadgets in a gadget set can be the focus gadget. A focus gadget is the gadget that will receive the focus if the gadget set is given the focus.

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 IlvGadget.

Constructor & Destructor Documentation

◆ IliGadgetSet()

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

Initializes an empty gadget set.

Parameters
displayThe display.
rectThe location.
thicknessThe border thickness.
paletteThe palette.

Member Function Documentation

◆ addObject()

virtual void IliGadgetSet::addObject ( IlvGadget obj,
IlBoolean  visible = IlTrue 
)
virtual

Adds a gadget to the gadget set.

Parameters
objThe gadget.
visibleThe gadget visibility. The gadget set becomes the owner of the gadget.

◆ enableToolTip()

void IliGadgetSet::enableToolTip ( )

Enables tooltip display.

The tooltip is displayed if the gadget under the mouse cursor has a tooltip, otherwise nothing is displayed.

◆ getCardinal()

IlUInt IliGadgetSet::getCardinal ( ) const

Returns the number of gadgets in the gadget set.

Returns
The count.

◆ getFocusObject()

IlvGadget* IliGadgetSet::getFocusObject ( ) const

Returns the focus gadget of the gadget set or 0 if no focus gadget is defined.

Returns
The focus gadget of the gadget set or 0 if no focus gadget is defined.

◆ getIndex()

IlInt IliGadgetSet::getIndex ( IlvGadget g) const

Returns the position of a gadget in the gadget set.

Parameters
gThe gadget.
Returns
The position.

◆ getObject() [1/2]

IlvGadget* IliGadgetSet::getObject ( const char *  name) const

Returns a gadget.

Parameters
nameThe gadget name.
Returns
The gadget or 0 if no such gadget is found.

◆ getObject() [2/2]

IlvGadget* IliGadgetSet::getObject ( IlUInt  index) const

Returns a gadget.

Parameters
indexThe gadget position.
Returns
The gadget.

◆ isObjectSensitive()

IlBoolean IliGadgetSet::isObjectSensitive ( IlvGadget obj) const

Returns IlTrue if gadget is sensitive to user interaction.

Parameters
objThe gadget.
Returns
IlTrue if gadget is sensitive to user interaction.

◆ isVisible()

IlBoolean IliGadgetSet::isVisible ( const IlvGadget ) const

Returns IlTrue if the gadget parameter belongs to the gadget set and if it is visible.

Returns
IlTrue if the gadget parameter belongs to the gadget set and if it is visible.

◆ objectReceivedEvent()

virtual void IliGadgetSet::objectReceivedEvent ( IlvGadget obj)
virtual

Called when a gadget received an event.

The callbacks of the gadget are called before this function. For example, if the gadget is a button, the callback of the button is called before this function. By default this function do nothing. In the IliDbNavigator class, this function calls the main callback.

Parameters
objThe gadget.

Reimplemented in IliDbNavigator.

◆ removeObject()

virtual void IliGadgetSet::removeObject ( IlvGadget obj,
IlBoolean  deleteIt = IlTrue 
)
virtual

Removes a gadget from the gadget set.

Parameters
objThe gadget.
deleteItIf IlTrue, the gadget is deleted.

◆ setFocusObject()

virtual IlBoolean IliGadgetSet::setFocusObject ( IlvGadget obj)
virtual

Sets the focus gadget.

Parameters
objThe gadget.

Reimplemented in IliToggleSelector.

◆ setObjectSensitive()

void IliGadgetSet::setObjectSensitive ( IlvGadget obj,
IlBoolean  active 
)

Enables/disables user interaction.

Parameters
objThe gadget.
activeIf IlTrue, the gadget becomes sensitive to user interaction. Otherwise, it is not sensitive to user interaction.

◆ setVisible()

void IliGadgetSet::setVisible ( IlvGadget obj,
IlBoolean  visible 
)

Shows/Hides a gadget.

Parameters
objThe gadget.
visibleIf IlTrue, the gadget is visible.