The base class for all the gadgets classes. More...
#include <ilviews/base/gadget.h>
Public Member Functions | |
IlvGadget (IlvDisplay *display, const IlvRect &rect, IlUShort thickness=2, IlvPalette *palette=0) | |
Constructor. More... | |
void | addEnterGadgetCallback (IlSymbol *cbName) |
Adds a named Enter Gadget callback. More... | |
void | addEnterGadgetCallback (IlSymbol *cbName, IlAny arg) |
Adds a named Enter Gadget callback. More... | |
void | addEnterGadgetCallback (IlvGraphicCallback cb) |
Adds an Enter Gadget callback. More... | |
void | addEnterGadgetCallback (IlvGraphicCallback cb, IlAny arg) |
Adds an Enter Gadget callback. More... | |
void | addFocusInCallback (IlSymbol *cbName) |
Adds a named Focus In callback. More... | |
void | addFocusInCallback (IlSymbol *cbName, IlAny arg) |
Adds a named Focus In callback. More... | |
void | addFocusInCallback (IlvGraphicCallback cb) |
Adds a Focus In callback. More... | |
void | addFocusInCallback (IlvGraphicCallback cb, IlAny arg) |
Adds a Focus In callback. More... | |
void | addFocusOutCallback (IlSymbol *cbName) |
Adds a named Focus Out callback. More... | |
void | addFocusOutCallback (IlSymbol *cbName, IlAny arg) |
Adds a named Focus Out callback. More... | |
void | addFocusOutCallback (IlvGraphicCallback cb) |
Adds a Focus Out callback. More... | |
void | addFocusOutCallback (IlvGraphicCallback cb, IlAny arg) |
Adds a Focus Out callback. More... | |
void | addLeaveGadgetCallback (IlSymbol *cbName) |
Adds a named Leave Gadget callback. More... | |
void | addLeaveGadgetCallback (IlSymbol *cbName, IlAny arg) |
Adds a named Leave Gadget callback. More... | |
void | addLeaveGadgetCallback (IlvGraphicCallback cb) |
Adds a Leave Gadget callback. More... | |
void | addLeaveGadgetCallback (IlvGraphicCallback cb, IlAny arg) |
Adds a Leave Gadget callback. More... | |
virtual void | applyTransform (const IlvTransformer *) |
Applies a transformation function to the graphic object. More... | |
virtual void | boundingBox (IlvRect &, const IlvTransformer *=0) const |
Retrieves the bounding box of the graphic object. More... | |
void | callCallback () |
Calls the Main callback of the gadget. More... | |
virtual IlBoolean | classFocusable () const |
Indicates whether the gadget instance can have the focus. More... | |
virtual IlBoolean | contains (const IlvPoint &, const IlvPoint &, const IlvTransformer *=0) const |
Checks whether a point is in the object. More... | |
virtual void | draw (IlvPort *, const IlvTransformer *=0, const IlvRegion *=0) const |
Draws the graphic object. More... | |
virtual void | drawBackground (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const |
Called to draw the gadget's background. More... | |
virtual void | drawContents (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const |
Called to draw the gadget's contents. More... | |
virtual void | drawFrame (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const |
Called to draw the gadget's frame. More... | |
virtual void | enterGadget () |
Called when the mouse enters the bounding box of the gadget. More... | |
virtual void | fitToContents (IlvDirection direction=(IlvDirection)(IlvHorizontal|IlvVertical)) |
Resizes the gadget to fit its contents. More... | |
virtual void | focusIn () |
Called when the gadget receives the keyboard focus. More... | |
virtual void | focusOut () |
Called when the gadget loses the keyboard focus. More... | |
virtual IlvIntensity | getAlpha () const |
Retrieves the alpha component. More... | |
virtual IlvAntialiasingMode | getAntialiasingMode () const |
Retrieves the anti-aliasing mode. More... | |
virtual IlUInt | getCallbackTypes (const char *const **, const IlSymbol *const **) const |
Gets the number of register callback types for the object. More... | |
IlvGraphicCallback | getEnterGadgetCallback () const |
Returns a pointer to the first unnamed callback in the Enter Gadget callback list. More... | |
IlSymbol * | getEnterGadgetCallbackName () const |
Returns the name of the first named callback in the Enter Gadget callback list. More... | |
IlvGraphicCallback | getFocusInCallback () const |
Returns the first unnamed callback in the Focus In callback list. More... | |
IlSymbol * | getFocusInCallbackName () const |
Returns the name of the first named callback in the Focus In callback list. More... | |
IlvGraphicCallback | getFocusOutCallback () const |
Returns a pointer to the first unnamed callback in the Focus Out callback list. More... | |
IlSymbol * | getFocusOutCallbackName () const |
Returns the name of the first named callback in the Focus Out callback list. More... | |
virtual IlvPalette * | getInsensitivePalette () const |
Returns the palette used to display a nonsensitive gadget. More... | |
IlvGraphicCallback | getLeaveGadgetCallback () const |
Returns a pointer to the first unnamed callback in the Leave Gadget callback list. More... | |
IlSymbol * | getLeaveGadgetCallbackName () const |
Returns the name of the first named callback in the Leave Gadget callback list. More... | |
virtual IlvLookFeelHandler * | getLookFeelHandler () const |
Returns the look & feel handler used by this object. More... | |
virtual void | getOuterStylableSize (IlvDim &, IlvDim &) const |
Returns the size of the outer stylable if any. More... | |
virtual IlvPalette * | getSelectionPalette () const |
Returns the palette used to draw the background of the selected items in the gadget. More... | |
virtual IlvPalette * | getSelectionTextPalette () const |
Returns the palette used to draw the text of the selected items in the gadget. More... | |
virtual const char * | getStylableClassName () const |
Returns the class name of this object. More... | |
virtual IlvDisplay * | getStylableDisplay () const |
Returns the display for this object. More... | |
virtual const char * | getStylableName () const |
Returns the name of this object. More... | |
virtual void | getStylableSize (IlvDim &, IlvDim &) const |
Returns the size of this object. More... | |
virtual const IlSymbol *const * | getStylableTags (IlUInt &) const |
Returns the tags of this object. More... | |
virtual IlvStylist * | getStylist () const |
Returns the stylist for this object. More... | |
IlUShort | getThickness () const |
Returns the thickness of the gadget. More... | |
IlvTransformer * | getTransformer () const |
Returns the transformer used to draw the gadget. More... | |
virtual IlBoolean | handleEvent (IlvEvent &event) |
Handles the events received by the gadget. More... | |
virtual void | invert (IlBoolean=IlFalse) |
Highlights the object. More... | |
IlBoolean | isActive () const |
Indicates whether the gadget is active. More... | |
IlBoolean | isInverted () const |
Indicates whether the gadget is set to the inverted state. More... | |
IlBoolean | isShowingFrame () const |
Returns IlTrue if the frame of the gadget is drawn. More... | |
IlBoolean | isTransparent () const |
Indicates whether the gadget is transparent. More... | |
virtual void | leaveGadget () |
Called when the mouse leaves the bounding box of the gadget. More... | |
virtual void | reDraw () const |
Redraws the gadget. | |
void | setActive (IlBoolean active) |
Specifies whether the gadget should be active. More... | |
virtual void | setAlpha (IlvIntensity) |
Sets the alpha value of the object. More... | |
virtual void | setAntialiasingMode (IlvAntialiasingMode) |
Sets the anti-aliasing mode of the object. More... | |
virtual void | setArcMode (IlvArcMode) |
Sets the arc mode of the object. More... | |
virtual void | setBackground (IlvColor *) |
Sets the background color of the object. More... | |
virtual void | setColorPattern (IlvColorPattern *) |
Sets the color pattern of the object. More... | |
void | setEnterGadgetCallback (IlSymbol *cbName) |
Sets a named Enter Gadget callback. More... | |
void | setEnterGadgetCallback (IlSymbol *cbName, IlAny arg) |
Sets a named Enter Gadget callback. More... | |
void | setEnterGadgetCallback (IlvGraphicCallback cb) |
Sets an Enter Gadget callback. More... | |
void | setEnterGadgetCallback (IlvGraphicCallback cb, IlAny arg) |
Sets an Enter Gadget callback. More... | |
virtual void | setFillRule (IlvFillRule) |
Sets the fill rule of the object. More... | |
virtual void | setFillStyle (IlvFillStyle) |
Sets the fill style of the object. More... | |
void | setFocusInCallback (IlSymbol *cbName) |
Sets a named Focus In callback. More... | |
void | setFocusInCallback (IlSymbol *cbName, IlAny arg) |
Sets a named Focus In callback. More... | |
void | setFocusInCallback (IlvGraphicCallback cb) |
Sets a Focus In callback. More... | |
void | setFocusInCallback (IlvGraphicCallback cb, IlAny arg) |
Sets a Focus In callback. More... | |
void | setFocusOutCallback (IlSymbol *cbName) |
Sets a named Focus Out callback. More... | |
void | setFocusOutCallback (IlSymbol *cbName, IlAny arg) |
Sets a named Focus Out callback. More... | |
void | setFocusOutCallback (IlvGraphicCallback cb) |
Sets a Focus Out callback. More... | |
void | setFocusOutCallback (IlvGraphicCallback cb, IlAny arg) |
Sets a Focus Out callback. More... | |
virtual void | setFont (IlvFont *) |
Sets the font of the object. More... | |
virtual void | setForeground (IlvColor *) |
Sets the foreground color of the object. More... | |
virtual void | setGradientPattern (IlvGradientPattern *) |
Sets the gradient pattern of the object. More... | |
virtual void | setHolder (IlvGraphicHolder *holder) |
Sets the specified holder to the gadget. More... | |
void | setLeaveGadgetCallback (IlSymbol *cbName) |
Sets a named Leave Gadget callback. More... | |
void | setLeaveGadgetCallback (IlSymbol *cbName, IlAny arg) |
Sets a named Leave Gadget callback. More... | |
void | setLeaveGadgetCallback (IlvGraphicCallback cb) |
Sets a Leave Gadget callback. More... | |
void | setLeaveGadgetCallback (IlvGraphicCallback cb, IlAny arg) |
Sets a Leave Gadget callback. More... | |
virtual void | setLineStyle (IlvLineStyle *) |
Sets the line style of the object. More... | |
virtual void | setLineWidth (IlUShort) |
Sets the line width of the object. More... | |
void | setLookFeelHandler (IlvLookFeelHandler *handler) |
Sets the look and feel handler of this gadget. More... | |
virtual void | setMode (IlvDrawMode) |
Sets the drawing mode of the object temporarily. More... | |
virtual void | setOverwrite (IlBoolean) |
Sets an overwrite mode that modifies how the drawing member functions operate. More... | |
virtual void | setPalette (IlvPalette *) |
Sets the internal palette. More... | |
virtual void | setPattern (IlvPattern *) |
Sets the pattern of the object. More... | |
virtual void | setThickness (IlUShort thickness) |
Sets the thickness of the gadget. More... | |
virtual void | setTransparent (IlBoolean value) |
Specifies whether the gadget should be transparent. More... | |
virtual void | showFrame (IlBoolean show) |
Specifies whether the frame of the gadget should be shown or hidden. More... | |
virtual void | updateLook () |
Called to update the look and feel of the gadget. | |
virtual IlBoolean | useDefaultColors () const |
Indicates whether the gadget uses the default colors. More... | |
virtual void | useDefaultSize (IlBoolean value) |
Specifies whether the gadget should use the default size. More... | |
virtual IlBoolean | usesDefaultButtonKeys () const |
Indicates whether the gadget handles the default button keys. More... | |
IlBoolean | usesDefaultSize () const |
Indicates whether the gadget uses the default size. More... | |
Public Member Functions inherited from IlvSimpleGraphic | |
IlvSimpleGraphic (IlvDisplay *display, IlvPalette *palette=0) | |
Initializes a new IlvSimpleGraphic . More... | |
virtual | ~IlvSimpleGraphic () |
Destructor. More... | |
virtual void | applyResources (const char *, const char *, const char *, const char *, IlvDisplay *=0) |
Applies resources on a graphic object. More... | |
IlvIntensity | getAlpha () const |
Retrieves the alpha value. More... | |
IlvAntialiasingMode | getAntialiasingMode () const |
Retrieves the anti-aliasing mode. More... | |
IlvArcMode | getArcMode () const |
Retrieves the arc mode. More... | |
IlvColor * | getBackground () const |
Retrieves the background color. More... | |
IlvColorPattern * | getColorPattern () const |
Retrieves the color pattern. More... | |
virtual IlvDisplay * | getDisplay () const |
Retrieves the IlvDisplay instance. More... | |
IlvFillRule | getFillRule () const |
Retrieves the fill rule. More... | |
IlvFillStyle | getFillStyle () const |
Retrieves the fill style. More... | |
IlvFont * | getFont () const |
Retrieves the font. More... | |
IlvColor * | getForeground () const |
Retrieves the foreground color. More... | |
IlvGradientPattern * | getGradientPattern () const |
Retrieves the gradient pattern. More... | |
IlvLineStyle * | getLineStyle () const |
Retrieves the line style. More... | |
IlUShort | getLineWidth () const |
Retrieves the line width. More... | |
virtual int | getLookupStringInputMethod (IlvEvent &event, char *bufferReturn, int bytesBuffer, int *statusReturn) |
Gets the preedit string from an input method. More... | |
IlvDrawMode | getMode () const |
Retrieves the draw mode. More... | |
IlBoolean | getOverwrite () const |
Retrieves the overwrite mode. More... | |
IlvPalette * | getPalette () const |
Retrieves the internal palette value. More... | |
IlvPattern * | getPattern () const |
Retrieves the pattern. More... | |
virtual void | registerInputMethod () const |
Controls the connection of a graphic object to an input method. More... | |
virtual void | setFocusValuesInputMethod (IlUShort count, const IlvImValue *values) const |
Controls the interaction between a simple graphic object and an input method. More... | |
virtual void | setValuesInputMethod (IlUShort count, const IlvImValue *values) const |
Controls the interaction between a graphic object and an input method. More... | |
virtual void | unRegisterInputMethod () const |
Controls the disconnection of a graphic object from an input method. More... | |
virtual void | unsetFocusInputMethod () const |
Controls the interaction between a graphic object and an input method. More... | |
Public Member Functions inherited from IlvGraphic | |
void | addCallback (const IlSymbol *callbackType, const IlSymbol *callbackName, const IlSymbol *script=0) |
Adds a callback function to a callback list. More... | |
void | addCallback (const IlSymbol *callbackType, IlvGraphicCallback callback) |
Adds a callback function to a callback list. More... | |
void | addCallback (const IlSymbol *callbackType, IlvGraphicCallback callbackName, IlAny data) |
Adds a callback function to a callback list. More... | |
void | addClassProperty (const IlSymbol *key, IlAny value) |
Adds a property to this object's class. More... | |
void | addProperty (const IlSymbol *key, IlAny value) |
Adds a specific property to the object. More... | |
void | addTag (const IlSymbol *tag) |
Adds a tag. More... | |
virtual void | apply (IlvApplyObject function, IlAny arg) |
Applies a function to objects that compose another object. More... | |
IlBoolean | applyAttribute (const char *attributeClassName, const char *value, IlAny checkData=0) const |
Applies attributes. More... | |
IlBoolean | applyAttribute (const char *attributeClassName, IlFloat value, IlAny checkData=0) const |
Applies attributes. More... | |
IlBoolean | applyAttribute (const char *attributeClassName, IlInt value, IlAny checkData=0) const |
Applies attributes. More... | |
virtual void | applyReferences (IlvApplyObject function, IlAny arg) |
Applies a function to objects that are referenced by another object. More... | |
virtual void | callCallbacks (const IlSymbol *callbackType) |
Calls every callback of a given type. More... | |
const char * | className () const |
Returns the class name of an object. More... | |
virtual void | computeFocusRegion (IlvRegion &r, const IlvTransformer *t=0) const |
Computes the region needed for the drawing of the focus. More... | |
IlBoolean | contains (const IlvPoint &p) const |
Checks whether a point is in the object. More... | |
virtual IlvGraphic * | copy () const =0 |
Copies this object. More... | |
void | draw (IlvPort *dst, const IlvTransformer *t, const IlvRect *clip) const |
Draws a graphic object. More... | |
virtual void | drawFocus (IlvPort *dst, const IlvPalette *palette, const IlvTransformer *t=0, const IlvRegion *clip=0) const |
Draws additional drawings for an object that has the keyboard focus. More... | |
virtual void | getAccessors (const IlSymbol *const **, const IlvValueTypeClass *const **, IlUInt &) const |
Retrieves the list of available accessors of an object. More... | |
IlvGraphicCallback | getCallback () const |
Gets the main callback function. More... | |
IlvGraphicCallback | getCallback (const IlSymbol *callbackType) const |
Gets a callback. More... | |
IlAny | getCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName) const |
Gets a callback user data. More... | |
IlAny | getCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback) const |
Gets a callback user data. More... | |
IlSymbol * | getCallbackName () const |
Gets the symbol that identifies the main callback. More... | |
IlSymbol * | getCallbackName (const IlSymbol *callbackType) const |
Gets the name of a callback. More... | |
virtual IlvGraphic * | getChildAt (IlUInt index) const |
Returns the sub-object of the graphic object specified by index. More... | |
virtual IlvGraphic * | getChildByName (const char *name) const |
Returns the sub-object of the graphic object specified by a name. More... | |
virtual IlUInt | getChildCount () const |
Returns the number of children of this graphic object. More... | |
virtual IlInt | getChildIndex (const IlvGraphic *object) const |
Returns the index of the specified sub-object in this graphic object. More... | |
virtual IlvGraphic *const * | getChildren (IlUInt &count) const |
Returns an array containing the sub-objects of this graphic object. More... | |
virtual IlvClassInfo * | getClassInfo () const |
Gets class information. More... | |
IlAny | getClassProperty (const IlSymbol *key, IlBoolean checkParent=IlFalse) const |
Retrieves the indicated property value in the class of this object. More... | |
IlAny | getClientData () const |
Gets client data. More... | |
virtual const char * | getDefaultInteractor () const |
Gets the name of the default interactor for this object. More... | |
virtual IlvGraphicHolder * | getHolder () const |
Gets a pointer to an object's holder. More... | |
IlvInteractor * | getInteractor () const |
Returns the interactor associated with the current object. More... | |
const char * | getName () const |
Gets the name of the object. More... | |
IlvNamedProperty * | getNamedProperty (const IlSymbol *name) const |
Gets a named property. More... | |
IlSymbol * | getNextFocusGraphic () const |
Gets the next object in the focus chain. More... | |
IlSymbol * | getPreviousFocusGraphic () const |
Gets the previous object in the focus chain. More... | |
IlAny | getProperty (const IlSymbol *key) const |
Gets a property. More... | |
IlvSmartSet * | getSmartSet () const |
Gets the smart set object containing this graphic object. More... | |
const IlSymbol *const * | getTags (IlUInt &count) const |
Returns all the tags applied to this object. More... | |
IlvDim | h () const |
Gets the height value of the object. More... | |
void | h (IlvDim h) |
Sets the height value of the object. More... | |
IlBoolean | hasCallback (const IlSymbol *callbackType, const IlSymbol *callbackName) const |
Checks whether a callback function is in a callback list. More... | |
IlBoolean | hasCallback (const IlSymbol *callbackType, IlvGraphicCallback callback) const |
Checks whether a callback function is in a callback list. More... | |
IlBoolean | hasCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName) const |
Checks whether a callback function has user data. More... | |
IlBoolean | hasCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback) const |
Checks whether a callback function has user data. More... | |
const IlvClassInfo * | hasClassProperty (const IlSymbol *key, IlBoolean s=IlFalse) const |
Checks for a class where the keyed property exists. More... | |
IlBoolean | hasProperty (const IlSymbol *key) const |
Checks whether the object has a particular property. More... | |
IlBoolean | hasTag (const IlSymbol *tag) const |
Checks whether the object has a specific tag. More... | |
IlBoolean | inside (const IlvRect &r) const |
Determines whether a rectangle is inside the bounding box. More... | |
IlBoolean | inside (const IlvRect &r, const IlvRect &tr, const IlvTransformer *t=0) const |
Determines whether an object with transformation applied is inside the bounding box. More... | |
virtual IlBoolean | inside (const IlvRegion &r, const IlvTransformer *t=0) const |
Determines whether an object with transformation applied is inside the bounding box. More... | |
IlBoolean | intersects (const IlvRect &r) const |
Checks whether a rectangle intersects the bounding box. More... | |
IlBoolean | intersects (const IlvRect &r, const IlvRect &tr, const IlvTransformer *t=0) const |
Checks whether a rectangle intersects the bounding box with transformation applied. More... | |
virtual IlBoolean | intersects (const IlvRegion &r, const IlvTransformer *t=0) const |
Checks whether a region intersects the bounding box with transformation applied. More... | |
IlBoolean | isFirstFocusGraphic () const |
Checks whether the object is first in the focus chain. More... | |
IlBoolean | isFocusable () const |
Checks whether the object can receive the keyboard focus. More... | |
IlBoolean | isInSmartSet () const |
Checks whether a graphic object belongs to a smart set. More... | |
IlBoolean | isLastFocusGraphic () const |
Checks whether the object is last in the focus chain. More... | |
IlBoolean | isSensitive () const |
Checks whether the object is sensitive. More... | |
IlBoolean | isSubtypeOf (const char *parentClass) const |
Checks whether this object's class is a subclass of a given parent class. More... | |
IlBoolean | isSubtypeOf (const IlvClassInfo *classInfo) const |
Checks whether this object's class is a subclass. More... | |
void | move (const IlvPoint &p) |
Moves the graphic object. More... | |
virtual void | move (IlvPos x, IlvPos y) |
Moves the graphic object. More... | |
void | moveResize (const IlvRect &size) |
Moves and resizes a graphic object. More... | |
virtual IlBoolean | needsInputContext () const |
Indicates whether the graphic instance can connect to an input method for locale dependent input. More... | |
virtual void | print (std::ostream &out, int level=0) const |
Prints for debugging purposes. More... | |
void | removeCallback (const IlSymbol *callbackType, const IlSymbol *callbackName) |
Removes a callback function from a callback list. More... | |
void | removeCallback (const IlSymbol *callbackType, IlvGraphicCallback callback) |
Removes a callback function from a callback list. More... | |
IlBoolean | removeClassProperty (const IlSymbol *key) |
Removes a property from this object's class. More... | |
void | removeInteractor () |
Removes the interactor from the current object. More... | |
IlvNamedProperty * | removeNamedProperty (IlSymbol *name) |
Removes a named property from the object. More... | |
IlBoolean | removeProperty (const IlSymbol *key) |
Removes a property from the object. More... | |
void | removeTag (const IlSymbol *tag) |
Removes a tag. More... | |
IlBoolean | replaceClassProperty (const IlSymbol *key, IlAny value) |
Replaces a property in this object's class. More... | |
IlBoolean | replaceProperty (const IlSymbol *key, IlAny value) |
Replaces a property. More... | |
virtual void | resize (IlvDim newW, IlvDim newH) |
Resizes a graphic object. More... | |
virtual void | rotate (const IlvPoint ¢er, IlFloat angle) |
Rotates a graphic object. More... | |
virtual void | scale (IlFloat zoomX, IlFloat zoomY) |
Scales the graphic object. More... | |
void | setCallback (const IlSymbol *callbackType, const IlSymbol *callbackName, const IlSymbol *script=0) |
Removes all previously set callbacks. More... | |
void | setCallback (const IlSymbol *callbackType, IlvGraphicCallback callback) |
Sets a new callback. More... | |
void | setCallback (const IlSymbol *callbackType, IlvGraphicCallback callbackName, IlAny data) |
Removes all previously set callbacks. More... | |
void | setCallback (IlvGraphicCallback callback, IlAny data) |
Sets the main callback function. More... | |
void | setCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName, IlAny data) |
Sets the callback user data for a callback function. More... | |
void | setCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback, IlAny data) |
Sets the callback user data for a callback function. More... | |
void | setCallbackName (const IlSymbol *callbackName) |
Sets the symbol that identifies the main callback. More... | |
void | setClientData (IlAny clientData) |
Sets client data. More... | |
void | setFirstFocusGraphic () |
Sets the object to be first in the focus chain. | |
void | setFocusable (IlBoolean value) |
Set the focusable state of the object. More... | |
IlBoolean | setInteractor (const char *name) |
Attaches an interactor to this graphic object. More... | |
IlBoolean | setInteractor (IlvInteractor *inter) |
Attaches an interactor to the current object. More... | |
void | setLastFocusGraphic () |
Sets the object to be last in the focus chain. | |
virtual void | setName (const char *name) |
Sets the name of the object. More... | |
IlvNamedProperty * | setNamedProperty (IlvNamedProperty *property) |
Sets a named property on the object. More... | |
virtual void | setNeedsInputContext (IlBoolean val) |
Specifies whether the graphic object should have locale dependent input. More... | |
void | setNextFocusGraphic (IlSymbol *name) |
Sets the object to be next in the focus chain. More... | |
void | setPreviousFocusGraphic (IlSymbol *name) |
Sets an object as previous in the focus chain. More... | |
void | setProperty (const IlSymbol *key, IlAny value) |
Sets a property of the object to a value. More... | |
virtual void | setSensitive (IlBoolean value) |
Sets the sensitivity of the object. More... | |
virtual void | symmetry (IlvDirection axis) |
Flips a graphic object. More... | |
virtual void | translate (IlvPos dx, IlvPos dy) |
Applies a transformation function on a graphic object. More... | |
IlvDim | w () const |
Gets the width value of the object. More... | |
void | w (IlvDim w) |
Sets the width value of the object. More... | |
virtual void | write (IlvOutputFile &output) const =0 |
Writes an object description to a file. More... | |
IlvPos | x () const |
Gets the x coordinate value of the object. More... | |
void | x (IlvPos x) |
Sets the x coordinate value of the object. More... | |
IlvPos | y () const |
Gets the y coordinate value of the object. More... | |
void | y (IlvPos y) |
Sets the y coordinate value of the object. More... | |
virtual IlBoolean | zoomable () const |
Checks whether this object is zoomable. More... | |
Public Member Functions inherited from IlvValueInterface | |
virtual IlBoolean | applyValue (const IlvValue &value) |
Apply an accessor. More... | |
virtual IlBoolean | changeValue (const IlvValue &val) |
Changes the value of an accessor. More... | |
virtual IlBoolean | changeValues (const IlvValue *values, IlUShort count=0) |
Changes several accessor values simultaneously. More... | |
virtual IlvValue & | queryValue (IlvValue &val) const |
Retrieves an accessor value. More... | |
virtual void | queryValues (IlvValue *values, IlUShort count) const |
Retrieves multiple accessor values simultaneously. More... | |
Public Member Functions inherited from IlvStylable | |
IlvStylable () | |
Constructor. | |
virtual const IlvStylable * | getStylableParent () const |
Returns the parent of this object in the style hierarchy. More... | |
Static Public Member Functions | |
static IlSymbol * | EnterGadgetSymbol () |
Returns the symbol of the Enter Gadget callback list. More... | |
static IlSymbol * | FocusInSymbol () |
Returns the symbol of the Focus In callback list. More... | |
static IlSymbol * | FocusOutSymbol () |
Returns the symbol of the Focus Out callback list. More... | |
static IlSymbol * | LeaveGadgetSymbol () |
Returns the symbol of the Leave Gadget callback list. More... | |
Static Public Member Functions inherited from IlvGraphic | |
static void | AddProperty (const IlSymbol *key, IlAny value) |
Adds a property to this object's class. More... | |
static void | AddToCallbackTypeList (IlUInt &count, const char *const **names, const IlSymbol *const **types, const char *newName, const IlSymbol *newType) |
Adds a callback to a list. More... | |
static void | AllowZoom (IlBoolean az) |
Sets or inhibits zooming. More... | |
static IlvClassInfo * | ClassInfo () const |
Gets class information. More... | |
static IlAny | GetProperty (const IlSymbol *key, IlBoolean checkSuperClass=IlFalse) |
Retrieves the property value associated with the key in this object's class. More... | |
static const IlvClassInfo * | HasProperty (const IlSymbol *key, IlBoolean checkSuperClass=IlFalse) |
Checks for the existence of a property for this object's class hierarchy. More... | |
static IlBoolean | IsZoomAllowed () |
Checks whether zoomable objects can display themselves when zooming out. More... | |
static IlvGraphic * | read (IlvInputFile &file, IlvPalette *palette) |
Reads an object description from a file. More... | |
static IlBoolean | RemoveProperty (const IlSymbol *key) |
Removes a property from this object's class. More... | |
static IlBoolean | ReplaceProperty (const IlSymbol *key, IlAny value) |
Replaces a property in this object's class. More... | |
The base class for all the gadgets classes.
Library: views
The IlvGadget
class is the base class for all the gadget classes. It implements all basic features of the gadgets, such as a built-in event handling mechanism and different look-and-feels.
The IlvGadget
class contains the method handleEvent()
specifically designed for handling user events. This means that, unlike other graphic objects, gadgets do not have to be associated with an interactor to react to user events.
IlvGraphicHolder
.Name | Type | Equivalent methods |
---|---|---|
showFrame | Boolean | isShowingFrame() , showFrame() |
thickness | UInt | getThickness() , setThickness() |
active | Boolean | isActive() , setActive() |
transparent | Boolean | isTransparent() , setTransparent() |
focusable | Boolean | isFocusable() , setFocusable() |
Name | Return type | Equivalent methods |
---|---|---|
redraw() | Void | reDraw() |
fitToContents() | Void | fitToContents() . See [1] below |
[1] : if the graphic object has a holder, using this method accessor is equivalent to call to fitToContents()
through IlvGraphicHolder::applyToObject()
.
IlvGadget::IlvGadget | ( | IlvDisplay * | display, |
const IlvRect & | rect, | ||
IlUShort | thickness = 2 , |
||
IlvPalette * | palette = 0 |
||
) |
Constructor.
Initializes a new instance of the IlvGagdet
class.
display | The connection to the display. |
rect | The size and position of the gadget. |
thickness | The thickness of the gadget. |
palette | The palette used by the gadget. |
void IlvGadget::addEnterGadgetCallback | ( | IlSymbol * | cbName | ) |
Adds a named Enter Gadget callback.
Adds cbName to the Enter Gadget callback list.
An Enter Gadget callback is invoked when the mouse enters the gadget, even if the gadget does not have the keyboard focus.
cbName | The name of the new callback. |
Adds a named Enter Gadget callback.
Adds cbName to the Enter Gadget callback list.
When invoked, the callback function receives the user parameter arg.
An Enter Gadget callback is invoked when the mouse enters the gadget, even if the gadget does not have the keyboard focus.
cbName | The name of the new callback. |
arg | The callback argument. |
void IlvGadget::addEnterGadgetCallback | ( | IlvGraphicCallback | cb | ) |
Adds an Enter Gadget callback.
Adds cb to the Enter Gadget callback list.
An Enter Gadget callback is invoked when the mouse enters the gadget, even if the gadget does not have the keyboard focus.
cb | The new callback. |
void IlvGadget::addEnterGadgetCallback | ( | IlvGraphicCallback | cb, |
IlAny | arg | ||
) |
Adds an Enter Gadget callback.
Adds cb to the Enter Gadget callback list.
When invoked, the callback function receives the user parameter arg.
An Enter Gadget callback is invoked when the mouse enters the gadget, even if the gadget does not have the keyboard focus.
cb | The new callback. |
arg | The callback argument. |
void IlvGadget::addFocusInCallback | ( | IlSymbol * | cbName | ) |
Adds a named Focus In callback.
Adds cbName to the Focus In callback list.
A Focus In callback is invoked when the gadget gets the keyboard focus.
cbName | The name of the new callback. |
Adds a named Focus In callback.
Adds cbName to the Focus In callback list.
When invoked, the callback function receives the user parameter arg.
A Focus In callback is invoked when the gadget gets the keyboard focus.
cbName | The name of the new callback. |
arg | The callback argument. |
void IlvGadget::addFocusInCallback | ( | IlvGraphicCallback | cb | ) |
Adds a Focus In callback.
Adds callback to the Focus In callback list.
A Focus In callback is invoked when the gadget gets the keyboard focus.
cb | The new callback. |
focusIn()
, setFocusInCallback()
, getFocusInCallback()
. void IlvGadget::addFocusInCallback | ( | IlvGraphicCallback | cb, |
IlAny | arg | ||
) |
Adds a Focus In callback.
Adds cb to the Focus In callback list.
When invoked, the callback function receives the user parameter arg.
A Focus In callback is invoked when the gadget gets the keyboard focus.
cb | The new callback. |
arg | The callback argument. |
focusIn()
, setFocusInCallback()
, getFocusInCallback()
. void IlvGadget::addFocusOutCallback | ( | IlSymbol * | cbName | ) |
Adds a named Focus Out callback.
Adds cbName to the Focus Out callback list.
A Focus Out callback is invoked when the gadget loses the keyboard focus.
cbName | The name of the new callback. |
Adds a named Focus Out callback.
Adds cbName to the Focus Out callback list.
When invoked, the callback function receives the user parameter arg.
A Focus Out callback is invoked when the gadget loses the keyboard focus.
cbName | The name of the new callback. |
arg | The callback argument. |
void IlvGadget::addFocusOutCallback | ( | IlvGraphicCallback | cb | ) |
Adds a Focus Out callback.
Adds cb to the Focus Out callback list.
A Focus Out callback is invoked when the gadget loses the keyboard focus.
cb | The new callback. |
focusOut()
,\ setFocusOutCallback()
, getFocusOutCallback()
. void IlvGadget::addFocusOutCallback | ( | IlvGraphicCallback | cb, |
IlAny | arg | ||
) |
Adds a Focus Out callback.
Adds cb to the Focus Out callback list.
When invoked, the callback function receives the user parameter arg.
A Focus Out callback is invoked when the gadget loses the keyboard focus.
cb | The new callback. |
arg | The callback argument. |
focusOut()
, setFocusOutCallback()
, getFocusOutCallback()
. void IlvGadget::addLeaveGadgetCallback | ( | IlSymbol * | cbName | ) |
Adds a named Leave Gadget callback.
Adds cbName to the Leave Gadget callback list.
A Leave Gadget callback is invoked when the mouse leaves the gadget, whether the gadget has the keyboard focus or not.
cbName | The name of the new callback. |
Adds a named Leave Gadget callback.
Adds cbName to the Leave Gadget callback list.
When invoked, the callback function receives the user parameter arg.
A Leave Gadget callback is invoked when the mouse leaves the gadget, whether the gadget has the keyboard focus or not.
cbName | The name of the new callback. |
arg | The callback argument. |
void IlvGadget::addLeaveGadgetCallback | ( | IlvGraphicCallback | cb | ) |
Adds a Leave Gadget callback.
Adds cb to the Leave Gadget callback list.
A Leave Gadget callback is invoked when the mouse leaves the gadget, whether the gadget has the keyboard focus or not.
cb | The new callback. |
void IlvGadget::addLeaveGadgetCallback | ( | IlvGraphicCallback | cb, |
IlAny | arg | ||
) |
Adds a Leave Gadget callback.
Adds cb to the Leave Gadget callback list.
When invoked, the callback function receives the user parameter arg.
A Leave Gadget callback is invoked when the mouse leaves the gadget, whether the gadget has the keyboard focus or not.
cb | The new callback. |
arg | The callback argument. |
|
virtual |
Applies a transformation function to the graphic object.
Applies the transformer t to the shape of the object. Unless the transformation is a scaling operation, the result of applying it to certain objects can be insignificant. For example, applying a non-scaling transformer to an IlvRectangle
object is meaningless, since the rectangle remains a rectangle. On the other hand, meaningful transformations can be applied to objects that are instances of types such as IlvLine
or IlvPolyPoints
.
applyTransform()
is one of the most important method to be rewritten for classes derived from IlvGraphic
, since it is called by the resize()
, move()
, moveResize()
, scale()
, etc., methods.t | The transformer value. If 0 , no transformation is performed. |
Implements IlvGraphic.
|
virtual |
Retrieves the bounding box of the graphic object.
Sets bbox, the rectangle reference parameter, to be the bounding box of the object. Since the object can appear within a transformed environment (for example, in a multiview editor), an IlvTransformer
object occurs as an optional parameter in order to compute the bounding box in the coordinate system of the transformed environment.
bbox | The bounding box to be set. |
t | A transformer value or 0 if there is no transformation. |
Implements IlvGraphic.
void IlvGadget::callCallback | ( | ) |
Calls the Main callback of the gadget.
Calls the Main callback types. The callCallback()
method is equivalent to a call to callCallbacks(CallbackSymbol())
. CallbackSymbol()
is a member function of IlvGraphic
that returns the IlSymbol
instance corresponding to the Main callback.
The notions of Main and Secondary callbacks are kept for backward compatibility.
IlvGraphic::callCallbacks()
.
|
virtual |
Indicates whether the gadget instance can have the focus.
Should be overridden to return IlTrue
in all the subclasses that must handle the keyboard focus. The default implementation returns IlFalse
.
IlvGraphic::setFocusable()
. Reimplemented from IlvGraphic.
|
virtual |
Checks whether a point is in the object.
Checks whether the coordinates are located in the shape of this object. A transformation parameter allows you to use the view's coordinate system for this test.
p | The point to be tested. |
tp | The transformed point obtained by applying the transformer t to the point p. |
t | A transformer value, or 0 if there is no transformation. |
IlTrue
when the point p lies inside the outline of the object. Reimplemented from IlvGraphic.
|
virtual |
Draws the graphic object.
Draws the object in the given IlvPort
using the transformer t.
dst | The destination port this object is drawn onto. |
t | The transformer value. If 0 , no transformation is performed. |
clip | The clipping region, relative to the transformed object, or 0 if none. |
Implements IlvGraphic.
|
virtual |
Called to draw the gadget's background.
This method is the first to be called in the gadget drawing mechanism. However, if the gadget has been set as transparent using the method setTransparent()
, this method will not be called.
drawContents()
, IlvGadget::drawFrame()
.
|
virtual |
Called to draw the gadget's contents.
This method is called just after drawing the gadget's background, and just before drawing the gadget's frame.
|
virtual |
Called to draw the gadget's frame.
This method is the last to be called in the gadget drawing mechanism. However, if the method showFrame()
has been called with IlFalse
as parameter, this method will not be called.
|
virtual |
Called when the mouse enters the bounding box of the gadget.
Called when the mouse enters the bounding box of the gadget. The default implementation invokes the Enter Gadget callback.
setEnterGadgetCallback()
.
|
static |
Returns the symbol of the Enter Gadget callback list.
|
virtual |
Resizes the gadget to fit its contents.
Resizes the gadget to fit its contents horizontally or vertically, or in both directions, depending on the value of direction.
direction | The direction in which the gadget should be resized. Valid values are: IlvHorizontal , IlvVertical , or (IlvHorizontal|IlvVertical) . |
|
virtual |
Called when the gadget receives the keyboard focus.
Called when the gadget receives an event whose type is IlvKeyboardFocusIn
. The default implementation invokes the Focus In callback.
|
static |
Returns the symbol of the Focus In callback list.
|
virtual |
Called when the gadget loses the keyboard focus.
Called when the gadget receives an event whose type is IlvKeyboardFocusOut
. The default implementation invokes the Focus Out callback.
|
static |
Returns the symbol of the Focus Out callback list.
|
virtual |
Retrieves the alpha component.
Reimplemented from IlvGraphic.
|
virtual |
Retrieves the anti-aliasing mode.
Reimplemented from IlvGraphic.
|
virtual |
Gets the number of register callback types for the object.
Returns the number of register callback types for this object. If you provide a non-0
pointer to an array of strings in the parameter names, it is set on return to point to an array of strings that describe each of the callback types. Some of these descriptions may be 0
. You must not modify nor delete this array.
If you provide a non-0
pointer to an array of symbols in the parameter types, it is set on return to point to an array of symbols that define each of the callback types. You must not modify nor delete this array. If you create a new callback type and want it returned by a call to getCallbackTypes()
, you can use the static member function AddToCallbackTypeList()
, which follows.
names | An array of strings. |
types | An array of symbols. |
Reimplemented from IlvGraphic.
IlvGraphicCallback IlvGadget::getEnterGadgetCallback | ( | ) | const |
Returns a pointer to the first unnamed callback in the Enter Gadget callback list.
The Enter Gadget callback is invoked when the mouse enters the gadget, even if the gadget does not have the keyboard focus.
IlSymbol* IlvGadget::getEnterGadgetCallbackName | ( | ) | const |
Returns the name of the first named callback in the Enter Gadget callback list.
The Enter Gadget callback is invoked when the mouse enters a gadget, even if the gadget does not have the keyboard focus.
IlvGraphicCallback IlvGadget::getFocusInCallback | ( | ) | const |
Returns the first unnamed callback in the Focus In callback list.
A Focus In callback is invoked when the gadget gets the keyboard focus.
focusIn()
, setFocusInCallback()
, addFocusInCallback()
. IlSymbol* IlvGadget::getFocusInCallbackName | ( | ) | const |
Returns the name of the first named callback in the Focus In callback list.
A Focus In callback is invoked when the gadget gets the keyboard focus.
focusIn()
, setFocusInCallback()
, addFocusInCallback()
. IlvGraphicCallback IlvGadget::getFocusOutCallback | ( | ) | const |
Returns a pointer to the first unnamed callback in the Focus Out callback list.
A Focus Out callback is invoked when the gadget loses the keyboard focus.
focusOut()
, setFocusOutCallback()
, addFocusOutCallback()
. IlSymbol* IlvGadget::getFocusOutCallbackName | ( | ) | const |
Returns the name of the first named callback in the Focus Out callback list.
A Focus Out callback is invoked when the gadget loses the keyboard focus.
focusIn()
, setFocusOutCallback()
, addFocusOutCallback()
.
|
virtual |
Returns the palette used to display a nonsensitive gadget.
This palette is created by combining a specific pattern with the background color of the object.
IlvGraphicCallback IlvGadget::getLeaveGadgetCallback | ( | ) | const |
Returns a pointer to the first unnamed callback in the Leave Gadget callback list.
A Leave Gadget callback is invoked when the mouse leaves the gadget, whether the gadget has the keyboard focus or not.
IlSymbol* IlvGadget::getLeaveGadgetCallbackName | ( | ) | const |
Returns the name of the first named callback in the Leave Gadget callback list.
A Leave Gadget callback is invoked when the mouse leaves the gadget, whether the gadget has the keyboard focus or not.
|
virtual |
Returns the look & feel handler used by this object.
The default implementation returns the look & feel handler of the display connected to this object.
Reimplemented from IlvSimpleGraphic.
Returns the size of the outer stylable if any.
When a stylable is part of another one, this information allows for instance to compute relative sizes or placement.
If the stylable is not part of another one, this function returns the same results than getStylableSize()
.
w | The width of the container stylable. |
h | The height of the container stylable. |
Reimplemented from IlvStylable.
|
virtual |
Returns the palette used to draw the background of the selected items in the gadget.
Returns the palette used to draw the background of the items making up the gadget when they are selected.
|
virtual |
Returns the palette used to draw the text of the selected items in the gadget.
Returns the palette used to draw the text of the items making up the gadgets when they are selected.
|
virtual |
Returns the class name of this object.
Reimplemented from IlvStylable.
|
virtual |
Returns the display for this object.
Implements IlvStylable.
|
virtual |
Returns the name of this object.
0
if it has none. This name may be used as the identifier discriminant in style sheets. Reimplemented from IlvStylable.
Returns the size of this object.
It can be used for computing sizes relative to the object (image position, borders,...).
w | The width of the stylable. |
h | The height of the stylable. |
Reimplemented from IlvStylable.
Returns the tags of this object.
nTags | the number of tags for this object (which is also the size of the returned array). |
IlPoolOf(Pointer)
and should not be deleted or modified. If there is no tags on this object, this function returns 0
(and nTags is set to 0
).. Reimplemented from IlvStylable.
|
virtual |
Returns the stylist for this object.
0
if there is none. Implements IlvStylable.
IlUShort IlvGadget::getThickness | ( | ) | const |
IlvTransformer* IlvGadget::getTransformer | ( | ) | const |
Returns the transformer used to draw the gadget.
0
(identity transformation). Handles the events received by the gadget.
Unlike other graphic objects, gadgets can handle mouse and keyboard events using this method. The method should return IlFalse
if the event is not handled by the gadget. In this case, the event can be dispatched to another object.
event | The event sent to the gadget. |
IlTrue
if the event has been handled by the gadget or IlFalse
if it is not the case. isActive()
. Highlights the object.
Highlights the object. It is implemented as swapping the foreground and background colors of the object, but can have other implementations in derived subclasses. The parameter temp controls the way you toggle between the background and the foreground. If temp is omitted or is IlFalse
, then a new palette is computed by calling the IlvDisplay::getPalette()
method. If temp is IlTrue
, the object palette is inverted, and thus all the objects referencing this palette will be affected.
temp | If IlTrue , highlights the object. |
Reimplemented from IlvSimpleGraphic.
IlBoolean IlvGadget::isActive | ( | ) | const |
Indicates whether the gadget is active.
IlTrue
if the gadget is active and IlFalse
if it is not. setActive()
, IlvGraphic::isSensitive()
. IlBoolean IlvGadget::isInverted | ( | ) | const |
Indicates whether the gadget is set to the inverted state.
IlFalse
when the gadget is in the default state and IlTrue
otherwise. A button, for example, is in the default state when it is not clicked. IlvGraphic::invert()
. IlBoolean IlvGadget::isShowingFrame | ( | ) | const |
Returns IlTrue
if the frame of the gadget is drawn.
IlTrue
if the frame of the gadget is drawn. In this case, the method IlvGadget::drawFrame()
is called after the gadget has been drawn. IlvGadget::showFrame()
, IlvGadget::drawFrame()
. IlBoolean IlvGadget::isTransparent | ( | ) | const |
Indicates whether the gadget is transparent.
IlTrue
if the gadget is transparent or IlFalse
if it is not. A transparent gadget lets the window background show through it. setTransparent()
.
|
virtual |
Called when the mouse leaves the bounding box of the gadget.
Called when the mouse leaves the bounding box of the gadget. The default implementation invokes the Leave Gadget callback.
setLeaveGadgetCallback()
.
|
static |
Returns the symbol of the Leave Gadget callback list.
void IlvGadget::setActive | ( | IlBoolean | active | ) |
Specifies whether the gadget should be active.
Unlike other graphic objects, gadgets do not have to be associated with an interactor to react to events. Gadgets handle events using their own handleEvent()
method.
When IlvGadget::setActive()
is invoked with IlFalse
, user events are not sent to the gadget.
An active gadget differs from a sensitive one in that its screen representation remains the same when its state changes. In others word an active gadget cannot be distinguished from a nonactive one, whereas a sensitive gadget becomes dimmed when it is set to nonsensitive. However, in both cases, events are not sent to the method handleEvent()
of the gadget.
active | Specifies whether the gadget should be active (IlTrue ) or not (IlFalse ). |
isActive()
, IlvGraphic::setSensitive()
.
|
virtual |
Sets the alpha value of the object.
alpha | The new alpha value. |
Reimplemented from IlvSimpleGraphic.
|
virtual |
Sets the anti-aliasing mode of the object.
mode | The new anti-aliasing mode. |
Reimplemented from IlvSimpleGraphic.
|
virtual |
Sets the arc mode of the object.
mode | The new arc mode. |
Reimplemented from IlvSimpleGraphic.
|
virtual |
Sets the background color of the object.
Sets the background color of the object.
background | The new background color. |
Reimplemented from IlvSimpleGraphic.
|
virtual |
Sets the color pattern of the object.
Sets the color pattern of the object.
pattern | The new color pattern. |
Reimplemented from IlvSimpleGraphic.
void IlvGadget::setEnterGadgetCallback | ( | IlSymbol * | cbName | ) |
Sets a named Enter Gadget callback.
Removes all the existing Enter Gadget callbacks before adding cbName to the Enter Gadget callback list.
An Enter Gadget callback is invoked when the mouse enters the gadget, even if the gadget does not have the keyboard focus.
cbName | The name of the new callback. |
Sets a named Enter Gadget callback.
Removes all the existing Enter Gadget callbacks before adding cbName to the Enter Gadget callback list.
When invoked, the callback function receives the user parameter arg.
An Enter Gadget callback is invoked when the mouse enters the gadget, even if the gadget does not have the keyboard focus.
cbName | The name of the new callback. |
arg | The callback argument. |
void IlvGadget::setEnterGadgetCallback | ( | IlvGraphicCallback | cb | ) |
Sets an Enter Gadget callback.
Removes all the existing Enter Gadget callbacks before adding cb to the Enter Gadget callback list.
An Enter Gadget callback is invoked when the mouse enters the gadget, even if the gadget does not have the keyboard focus.
cb | The new callback. |
void IlvGadget::setEnterGadgetCallback | ( | IlvGraphicCallback | cb, |
IlAny | arg | ||
) |
Sets an Enter Gadget callback.
Removes all the existing Enter Gadget callbacks before adding cb to the Enter Gadget callback list.
When invoked, the callback function receives the user parameter arg.
An Enter Gadget callback is invoked when the mouse enters the gadget, even if the gadget does not have the keyboard focus.
cb | The new callback. |
arg | The callback argument. |
|
virtual |
Sets the fill rule of the object.
rule | The new fill rule. |
Reimplemented from IlvSimpleGraphic.
|
virtual |
Sets the fill style of the object.
style | The new fill style. |
Reimplemented from IlvSimpleGraphic.
void IlvGadget::setFocusInCallback | ( | IlSymbol * | cbName | ) |
Sets a named Focus In callback.
Removes all the existing Focus In callbacks before adding cbName to the Focus In callback list.
A Focus In callback is invoked when the gadget gets the keyboard focus.
cbName | The name of the new callback. |
Sets a named Focus In callback.
Removes all the existing Focus In callbacks before adding cbName to the Focus In callback list.
When invoked, the callback function receives the user parameter arg.
A Focus In callback is called when the gadget gets the keyboard focus.
cbName | The name of the new callback. |
arg | The callback argument. |
void IlvGadget::setFocusInCallback | ( | IlvGraphicCallback | cb | ) |
Sets a Focus In callback.
Removes all the existing Focus In callbacks before adding cb to the Focus In callback list.
A Focus In callback is invoked when the gadget gets the keyboard focus.
cb | The new callback. |
focusIn()
, addFocusInCallback()
, getFocusInCallback()
. void IlvGadget::setFocusInCallback | ( | IlvGraphicCallback | cb, |
IlAny | arg | ||
) |
Sets a Focus In callback.
Removes all the existing Focus In callbacks before adding cb to the Focus In callback list.
When invoked, the callback function receives the user parameter arg.
A Focus In callback is invoked when the gadget gets the keyboard focus.
cb | The new callback. |
arg | The callback argument. |
focusIn()
, addFocusInCallback()
, getFocusInCallback()
. void IlvGadget::setFocusOutCallback | ( | IlSymbol * | cbName | ) |
Sets a named Focus Out callback.
Removes all the existing Focus Out callbacks before adding cbName to the Focus Out callback list.
A Focus Out callback is invoked when the gadget loses the keyboard focus.
cbName | The name of the new callback. |
Sets a named Focus Out callback.
Removes all the existing Focus Out callbacks before adding cbName to the Focus Out callback list.
When invoked, the callback function, receives the user parameter arg.
A Focus Out callback is invoked when the gadget loses the keyboard focus.
cbName | The name of the new callback. |
arg | The callback argument. |
void IlvGadget::setFocusOutCallback | ( | IlvGraphicCallback | cb | ) |
Sets a Focus Out callback.
Removes all the existing Focus Out callbacks before adding cb to the Focus Out callback list.
A Focus Out callback is invoked when the gadget loses the keyboard focus.
cb | The new callback. |
focusIn()
, addFocusOutCallback()
, getFocusOutCallback()
. void IlvGadget::setFocusOutCallback | ( | IlvGraphicCallback | cb, |
IlAny | arg | ||
) |
Sets a Focus Out callback.
Removes all the existing Focus Out callbacks before adding cb to the Focus Out callback list.
When invoked, the callback function receives the user parameter arg.
A Focus Out callback is invoked when the gadget loses the keyboard focus.
cb | The new callback. |
arg | The callback argument. |
focusOut()
, addFocusOutCallback()
, getFocusOutCallback()
.
|
virtual |
|
virtual |
Sets the foreground color of the object.
Sets the foreground color of the object.
foreground | The new foreground color. |
Reimplemented from IlvSimpleGraphic.
|
virtual |
Sets the gradient pattern of the object.
Sets the gradient pattern of the object.
pattern | The new gradient pattern. |
Reimplemented from IlvSimpleGraphic.
|
virtual |
Sets the specified holder to the gadget.
Called each time the gadget is added to or removed from a holder.
holder | The holder set to the gadget. |
IlvGraphic::getHolder()
. Reimplemented from IlvSimpleGraphic.
void IlvGadget::setLeaveGadgetCallback | ( | IlSymbol * | cbName | ) |
Sets a named Leave Gadget callback.
Removes all the existing Leave Gadget callbacks before adding cbName to the Leave Gadget callback list.
A Leave Gadget callback is invoked when the mouse leaves the gadget, whether the gadget has the keyboard focus or not.
cbName | The name of the new callback. |
Sets a named Leave Gadget callback.
Removes all the existing Leave Gadget callbacks before adding cbName to the Leave Gadget callback list.
When invoked, the callback function receives the user parameter arg.
A Leave Gadget callback is invoked when the mouse leaves the gadget, whether the gadget has the keyboard focus or not.
cbName | The name of the new callback. |
arg | The callback argument. |
void IlvGadget::setLeaveGadgetCallback | ( | IlvGraphicCallback | cb | ) |
Sets a Leave Gadget callback.
Removes all the existing Leave Gadget callbacks before adding cb to the Leave Gadget callback list.
A Leave Gadget callback is invoked when the mouse leaves the gadget, whether the gadget has the keyboard focus or not.
cb | The new callback. |
void IlvGadget::setLeaveGadgetCallback | ( | IlvGraphicCallback | cb, |
IlAny | arg | ||
) |
Sets a Leave Gadget callback.
Removes all the existing Leave Gadget callbacks before adding cb to the Leave Gadget callback list.
When invoked, the callback function receives the user parameter arg.
A Leave Gadget callback is invoked when the mouse leaves the gadget, whether the gadget has the keyboard focus or not.
cb | The new callback. |
arg | The callback argument. |
|
virtual |
Sets the line style of the object.
style | The new line style. |
Reimplemented from IlvSimpleGraphic.
|
virtual |
Sets the line width of the object.
width | The new line width. |
Reimplemented from IlvSimpleGraphic.
void IlvGadget::setLookFeelHandler | ( | IlvLookFeelHandler * | handler | ) |
Sets the look and feel handler of this gadget.
handler | The new look and feel handler. |
|
virtual |
Sets the drawing mode of the object temporarily.
Changing the IlvDrawMode
attribute of an object is considered a temporary operation. You have to set the mode to its default value when you no longer need another mode different from the value IlvModeSet
. The drawing mode information is passed to the palette of the graphic object (see the IlvPalette::setOverwrite()
method for more details).
mode | The drawing mode to be set. |
Reimplemented from IlvSimpleGraphic.
|
virtual |
Sets an overwrite mode that modifies how the drawing member functions operate.
Modifies the way the drawing member functions operate. The information is passed to the palette of the graphic object (see the IlvPalette::setOverwrite()
method for more details).
over | If IlFalse , sets selective hidden drawing operations. |
Reimplemented from IlvSimpleGraphic.
|
virtual |
Sets the internal palette.
The previous palette is unlocked, and palette is locked.
palette | The new palette of this object. |
Reimplemented from IlvSimpleGraphic.
|
virtual |
Sets the pattern of the object.
Sets the pattern of the object.
pattern | The new pattern. |
Reimplemented from IlvSimpleGraphic.
|
virtual |
Sets the thickness of the gadget.
The thickness is used to give a three-dimensional effect to the gadget.
Note that this setting applies only to the Motif look-and-feel.
thickness | The thickness of the gadget. |
getThickness()
.
|
virtual |
Specifies whether the gadget should be transparent.
value | Indicates whether the gadget should be transparent (IlTrue ) or not (IlFalse ). |
isTransparent()
.
|
virtual |
Specifies whether the frame of the gadget should be shown or hidden.
show | Specifies whether the frame of the gadget should be shown (IlTrue ) or hidden (IlFalse ). |
|
virtual |
Indicates whether the gadget uses the default colors.
When this method returns IlTrue
, the gadget is drawn with the default colors defined by the current look-and-feel and with its own palette. The default implementation returns IlTrue
if the main palette of the gadget has the same background and foreground colors as the default palette of the display.
IlTrue
if the gadget uses default colors or IlFalse
if it does not.
|
virtual |
Specifies whether the gadget should use the default size.
If value is set to IlTrue
, the gadget uses the default size. Otherwise, it uses the size stored in the gadget.
In the IlvScrollBar
implementation of this method, the default size is that of the system font on Windows and 17 pixels on UNIX.
In the IlvToggle
and IlvColoredToggle
implementations of this method, the default size is that of the system font on Windows. On UNIX, it is 16 pixels in the Motif look-and-feel, and 14 pixels in the Windows look-and-feel.
The default size applies only to the check box. If the size of the check box is set to 0
, the drawing member functions draw the check box using the default size.
value | Specifies whether the gadget should use its default size (IlTrue ) or not (IlFalse ). |
usesDefaultSize()
.
|
virtual |
Indicates whether the gadget handles the default button keys.
Called by the gadget holder to know whether this gadget handles the keys usually reserved for the default button mechanism, that is, IlvReturn
and IlvEscape
. If it returns IlTrue
, the default button mechanism is disabled when this gadget has the focus.
IlTrue
if the gadget handles the default button keys and IlFalse
otherwise.. IlvGadgetContainer::setDefaultButton()
. IlBoolean IlvGadget::usesDefaultSize | ( | ) | const |
Indicates whether the gadget uses the default size.
IlTrue
if this gadget uses the default size or IlFalse
if it does not. useDefaultSize()
.