Gadget class. More...
#include <ilviews/dataccess/gadgets/gadset.h>
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... | |
IlvGadget * | getFocusObject () 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... | |
IlvGadget * | getObject (const char *name) const |
Returns a gadget. More... | |
IlvGadget * | getObject (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... | |
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.
IliGadgetSet::IliGadgetSet | ( | IlvDisplay * | display, |
const IlvRect & | rect, | ||
IlUShort | thickness = IlvDefaultGadgetThickness , |
||
IlvPalette * | palette = 0 |
||
) |
Initializes an empty gadget set.
display | The display. |
rect | The location. |
thickness | The border thickness. |
palette | The palette. |
Adds a gadget to the gadget set.
obj | The gadget. |
visible | The gadget visibility. The gadget set becomes the owner of the gadget. |
void IliGadgetSet::enableToolTip | ( | ) |
Enables tooltip display.
The tooltip is displayed if the gadget under the mouse cursor has a tooltip, otherwise nothing is displayed.
IlUInt IliGadgetSet::getCardinal | ( | ) | const |
Returns the number of gadgets in the gadget set.
IlvGadget* IliGadgetSet::getFocusObject | ( | ) | const |
Returns the focus gadget of the gadget set or 0
if no focus gadget is defined.
0
if no focus gadget is defined. Returns the position of a gadget in the gadget set.
g | The gadget. |
IlvGadget* IliGadgetSet::getObject | ( | const char * | name | ) | const |
Returns a gadget.
name | The gadget name. |
0
if no such gadget is found. Returns a gadget.
index | The gadget position. |
Returns IlTrue
if gadget is sensitive to user interaction.
obj | The gadget. |
IlTrue
if gadget is sensitive to user interaction. Returns IlTrue
if the gadget parameter belongs to the gadget set and if it is visible.
IlTrue
if the gadget parameter belongs to the gadget set and if it is visible.
|
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.
obj | The gadget. |
Reimplemented in IliDbNavigator.
Removes a gadget from the gadget set.
obj | The gadget. |
deleteIt | If IlTrue , the gadget is deleted. |
Enables/disables user interaction.
obj | The gadget. |
active | If IlTrue , the gadget becomes sensitive to user interaction. Otherwise, it is not sensitive to user interaction. |