rwlogo

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
List of all members | Public Member Functions | Static Public Member Functions
IlvGadget Class Reference

The base class for all the gadgets classes. More...

#include <ilviews/base/gadget.h>

Inheritance diagram for IlvGadget:
IlvSimpleGraphic IlvStylable IlvGraphic

Public Member Functions

 IlvGadget (IlvDisplay *display, const IlvRect &rect, IlUShort thickness=2, IlvPalette *palette=0)
 Constructor. More...
 
void addEnterGadgetCallback (IlvGraphicCallback callback)
 Adds an Enter Gadget callback. More...
 
void addEnterGadgetCallback (IlSymbol *callbackName)
 Adds a named Enter Gadget callback. More...
 
void addEnterGadgetCallback (IlvGraphicCallback callback, IlAny arg)
 Adds an Enter Gadget callback. More...
 
void addEnterGadgetCallback (IlSymbol *callbackName, IlAny arg)
 Adds a named Enter Gadget callback. More...
 
void addFocusInCallback (IlvGraphicCallback callback)
 Adds a Focus In callback. More...
 
void addFocusInCallback (IlSymbol *callbackName)
 Adds a named Focus In callback. More...
 
void addFocusInCallback (IlvGraphicCallback callback, IlAny arg)
 Adds a Focus In callback. More...
 
void addFocusInCallback (IlSymbol *callbackName, IlAny arg)
 Adds a named Focus In callback. More...
 
void addFocusOutCallback (IlvGraphicCallback callback)
 Adds a Focus Out callback. More...
 
void addFocusOutCallback (IlSymbol *callbackName)
 Adds a named Focus Out callback. More...
 
void addFocusOutCallback (IlvGraphicCallback callback, IlAny arg)
 Adds a Focus Out callback. More...
 
void addFocusOutCallback (IlSymbol *callbackName, IlAny arg)
 Adds a named Focus Out callback. More...
 
void addLeaveGadgetCallback (IlvGraphicCallback callback)
 Adds a Leave Gadget callback. More...
 
void addLeaveGadgetCallback (IlSymbol *callbackName)
 Adds a named Leave Gadget callback. More...
 
void addLeaveGadgetCallback (IlvGraphicCallback callback, IlAny arg)
 Adds a Leave Gadget callback. More...
 
void addLeaveGadgetCallback (IlSymbol *callbackName, IlAny arg)
 Adds a named 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...
 
IlSymbolgetEnterGadgetCallbackName () 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...
 
IlSymbolgetFocusInCallbackName () 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...
 
IlSymbolgetFocusOutCallbackName () const
 Returns the name of the first named callback in the Focus Out callback list. More...
 
virtual IlvPalettegetInsensitivePalette () 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...
 
IlSymbolgetLeaveGadgetCallbackName () const
 Returns the name of the first named callback in the Leave Gadget callback list. More...
 
virtual IlvLookFeelHandlergetLookFeelHandler () const
 Returns the look & feel handler used by this object. More...
 
virtual IlvPalettegetSelectionPalette () const
 Returns the palette used to draw the background of the selected items in the gadget. More...
 
virtual IlvPalettegetSelectionTextPalette () 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 IlvDisplaygetStylableDisplay () const
 Returns the display for this object. More...
 
virtual const char * getStylableName () const
 Returns the name of this object. More...
 
virtual IlvStylistgetStylist () const
 Returns the stylist for this object. More...
 
IlUShort getThickness () const
 Returns the thickness of the gadget. More...
 
IlvTransformergetTransformer () 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 (IlvGraphicCallback callback)
 Sets an Enter Gadget callback. More...
 
void setEnterGadgetCallback (IlSymbol *callbackName)
 Sets a named Enter Gadget callback. More...
 
void setEnterGadgetCallback (IlvGraphicCallback callback, IlAny arg)
 Sets an Enter Gadget callback. More...
 
void setEnterGadgetCallback (IlSymbol *callbackName, IlAny arg)
 Sets a named 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 (IlvGraphicCallback callback)
 Sets a Focus In callback. More...
 
void setFocusInCallback (IlSymbol *callbackName)
 Sets a named Focus In callback. More...
 
void setFocusInCallback (IlvGraphicCallback callback, IlAny arg)
 Sets a Focus In callback. More...
 
void setFocusInCallback (IlSymbol *callbackName, IlAny arg)
 Sets a named Focus In callback. More...
 
void setFocusOutCallback (IlvGraphicCallback callback)
 Sets a Focus Out callback. More...
 
void setFocusOutCallback (IlSymbol *callbackName)
 Sets a named Focus Out callback. More...
 
void setFocusOutCallback (IlvGraphicCallback callback, IlAny arg)
 Sets a Focus Out callback. More...
 
void setFocusOutCallback (IlSymbol *callbackName, IlAny arg)
 Sets a named 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 (IlvGraphicCallback callback)
 Sets a Leave Gadget callback. More...
 
void setLeaveGadgetCallback (IlSymbol *callbackName)
 Sets a named Leave Gadget callback. More...
 
void setLeaveGadgetCallback (IlvGraphicCallback callback, IlAny arg)
 Sets a Leave Gadget callback. More...
 
void setLeaveGadgetCallback (IlSymbol *callbackName, IlAny arg)
 Sets a named 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 to the given palette value. 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)
 Constructor. 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...
 
IlvColorgetBackground () const
 Retrieves the background color. More...
 
IlvColorPatterngetColorPattern () const
 Retrieves the color pattern. More...
 
virtual IlvDisplaygetDisplay () const
 Retrieves the IlvDisplay instance. More...
 
IlvFillRule getFillRule () const
 Retrieves the fill rule. More...
 
IlvFillStyle getFillStyle () const
 Retrieves the fill style. More...
 
IlvFontgetFont () const
 Retrieves the font. More...
 
IlvColorgetForeground () const
 Retrieves the foreground color. More...
 
IlvGradientPatterngetGradientPattern () const
 Retrieves the gradient pattern. More...
 
IlvLineStylegetLineStyle () 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...
 
IlvPalettegetPalette () const
 Retrieves the internal palette value. More...
 
IlvPatterngetPattern () 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, IlvGraphicCallback callback)
 Adds a callback function to a callback list. More...
 
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 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, IlInt 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, const char *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 IlBoolean applyValue (const IlvValue &val)
 Apply an accessor. More...
 
virtual void callCallbacks (const IlSymbol *callbackType)
 Calls every callback of a given type. More...
 
virtual IlBoolean changeValue (const IlvValue &val)
 Changes the value of an accessor. More...
 
virtual IlBoolean changeValues (const IlvValue *values, IlUShort count)
 Changes several accessor values simultaneously. 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 IlvGraphiccopy () 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 **accessors, const IlvValueTypeClass *const **types, IlUInt &count) const
 Retrieves the list of available accessors of an object. More...
 
IlvGraphicCallback getCallback (const IlSymbol *callbackType) const
 Gets a callback. More...
 
IlvGraphicCallback getCallback () const
 Gets the main callback function. More...
 
IlAny getCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback) const
 Gets a callback user data. More...
 
IlAny getCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName) const
 Gets a callback user data. More...
 
IlSymbolgetCallbackName (const IlSymbol *callbackType) const
 Gets the name of a callback. More...
 
IlSymbolgetCallbackName () const
 Gets the symbol that identifies the main callback. More...
 
virtual IlvGraphicgetChildAt (IlUInt index) const
 Returns the sub-object of the graphic object specified by index. More...
 
virtual IlvGraphicgetChildByName (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 IlvClassInfogetClassInfo () 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 IlvGraphicHoldergetHolder () const
 Gets a pointer to an object's holder. More...
 
IlvInteractorgetInteractor () const
 Returns the interactor associated with the current object. More...
 
const char * getName () const
 Gets the name of the object. More...
 
IlvNamedPropertygetNamedProperty (const IlSymbol *name) const
 Gets a named property. More...
 
IlSymbolgetNextFocusGraphic () const
 Gets the next object in the focus chain. More...
 
IlSymbolgetPreviousFocusGraphic () const
 Gets the previous object in the focus chain. More...
 
IlAny getProperty (const IlSymbol *key) const
 Gets a property. More...
 
IlvSmartSetgetSmartSet () const
 Gets the smart set object containing this graphic 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, IlvGraphicCallback callback) const
 Checks whether a callback function is in a callback list. More...
 
IlBoolean hasCallback (const IlSymbol *callbackType, const IlSymbol *callbackName) const
 Checks whether a callback function is in a callback list. More...
 
IlBoolean hasCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback) const
 Checks whether a callback function has user data. More...
 
IlBoolean hasCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName) const
 Checks whether a callback function has user data. More...
 
const IlvClassInfohasClassProperty (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...
 
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 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...
 
IlBoolean inside (const IlvRect &r) const
 Determines whether a rectangle is inside the bounding box. 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 intersects (const IlvRect &r, const IlvRect &tr, const IlvTransformer *t=0) const
 Checks whether a rectangle intersects the bounding box with transformation applied. More...
 
IlBoolean intersects (const IlvRect &r) const
 Checks whether a rectangle intersects the bounding box. 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...
 
virtual void move (IlvPos x, IlvPos y)
 Moves the graphic object. More...
 
void move (const IlvPoint &p)
 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...
 
virtual IlvValuequeryValue (IlvValue &val) const
 Retrieves the value of an accessor. More...
 
virtual void queryValues (IlvValue *values, IlUShort count) const
 Retrieves multiple accessor values simultaneously. More...
 
void removeCallback (const IlSymbol *callbackType, IlvGraphicCallback callback)
 Removes a callback function from a callback list. More...
 
void removeCallback (const IlSymbol *callbackType, const IlSymbol *callbackName)
 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...
 
IlvNamedPropertyremoveNamedProperty (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 &center, IlFloat angle)
 Rotates a graphic object. More...
 
virtual void scale (IlFloat zoomX, IlFloat zoomY)
 Scales the graphic object. More...
 
void setCallback (const IlSymbol *callbackType, IlvGraphicCallback callback)
 Sets a new callback. 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 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, IlvGraphicCallback callback, IlAny data)
 Sets the callback user data for a callback function. More...
 
void setCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName, 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 (IlvInteractor *inter)
 Attaches an interactor to the current object. More...
 
IlBoolean setInteractor (const char *name)
 Attaches an interactor to this graphic 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...
 
IlvNamedPropertysetNamedProperty (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 IlvStylable
 IlvStylable ()
 Constructor.
 

Static Public Member Functions

static IlSymbolEnterGadgetSymbol ()
 Returns the symbol of the Enter Gadget callback list. More...
 
static IlSymbolFocusInSymbol ()
 Returns the symbol of the Focus In callback list. More...
 
static IlSymbolFocusOutSymbol ()
 Returns the symbol of the Focus Out callback list. More...
 
static IlSymbolLeaveGadgetSymbol ()
 Returns the symbol of the Leave Gadget callback list. More...
 

Detailed Description

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.

See Also
IlvGraphicHolder

Constructor & Destructor Documentation

IlvGadget::IlvGadget ( IlvDisplay display,
const IlvRect rect,
IlUShort  thickness = 2,
IlvPalette palette = 0 
)

Constructor.

Initializes a new instance of the IlvGagdet class.

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

Member Function Documentation

void IlvGadget::addEnterGadgetCallback ( IlvGraphicCallback  callback)

Adds an Enter Gadget callback.

Adds callback 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.

Parameters
callbackThe new callback.
See Also
enterGadget(), setEnterGadgetCallback(), getEnterGadgetCallback().
void IlvGadget::addEnterGadgetCallback ( IlSymbol callbackName)

Adds a named Enter Gadget callback.

Adds callbackName 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.

Parameters
callbackNameThe name of the new callback.
See Also
enterGadget(), setEnterGadgetCallback(), getEnterGadgetCallbackName().
void IlvGadget::addEnterGadgetCallback ( IlvGraphicCallback  callback,
IlAny  arg 
)

Adds an Enter Gadget callback.

Adds callback to the Enter Gadget callback list. The callback function, when invoked, 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.

Parameters
callbackThe new callback.
argThe callback argument.
See Also
enterGadget(), setEnterGadgetCallback(), getEnterGadgetCallback().
void IlvGadget::addEnterGadgetCallback ( IlSymbol callbackName,
IlAny  arg 
)

Adds a named Enter Gadget callback.

Adds callbackName to the Enter Gadget callback list. The callback function, when invoked, 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.

Parameters
callbackNameThe name of the new callback.
argThe callback argument.
See Also
enterGadget(), setEnterGadgetCallback(), getEnterGadgetCallbackName().
void IlvGadget::addFocusInCallback ( IlvGraphicCallback  callback)

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.

Parameters
callbackThe new callback.
See Also
focusIn(), setFocusInCallback(), getFocusInCallback().
void IlvGadget::addFocusInCallback ( IlSymbol callbackName)

Adds a named Focus In callback.

Adds callbackName to the Focus In callback list. A Focus In callback is invoked when the gadget gets the keyboard focus.

Parameters
callbackNameThe name of the new callback.
See Also
focusIn(), setFocusInCallback(), getFocusInCallbackName().
void IlvGadget::addFocusInCallback ( IlvGraphicCallback  callback,
IlAny  arg 
)

Adds a Focus In callback.

Adds callback to the Focus In callback list. The callback function, when invoked, receives the user parameter arg. A Focus In callback is invoked when the gadget gets the keyboard focus.

Parameters
callbackThe new callback.
argThe callback argument.
See Also
focusIn(), setFocusInCallback(), getFocusInCallback().
void IlvGadget::addFocusInCallback ( IlSymbol callbackName,
IlAny  arg 
)

Adds a named Focus In callback.

Adds callbackName to the Focus In callback list. The callback function, when invoked, receives the user parameter arg. A Focus In callback is invoked when the gadget gets the keyboard focus.

Parameters
callbackNameThe name of the new callback.
argThe callback argument.
See Also
focusIn(), setFocusInCallback(), getFocusInCallbackName().
void IlvGadget::addFocusOutCallback ( IlvGraphicCallback  callback)

Adds a Focus Out callback.

Adds callback to the Focus Out callback list. A Focus Out callback is invoked when the gadget loses the keyboard focus.

Parameters
callbackThe new callback.
See Also
focusOut(), setFocusOutCallback(), getFocusOutCallback().
void IlvGadget::addFocusOutCallback ( IlSymbol callbackName)

Adds a named Focus Out callback.

Adds callbackName to the Focus Out callback list. A Focus Out callback is invoked when the gadget loses the keyboard focus.

Parameters
callbackNameThe name of the new callback.
See Also
focusOut(), setFocusOutCallback(), getFocusOutCallbackName().
void IlvGadget::addFocusOutCallback ( IlvGraphicCallback  callback,
IlAny  arg 
)

Adds a Focus Out callback.

Adds callback to the Focus Out callback list. The callback function, when invoked, receives the user parameter arg. A Focus Out callback is invoked when the gadget loses the keyboard focus.

Parameters
callbackThe new callback.
argThe callback argument.
See Also
focusOut(), setFocusOutCallback(), getFocusOutCallback().
void IlvGadget::addFocusOutCallback ( IlSymbol callbackName,
IlAny  arg 
)

Adds a named Focus Out callback.

Adds callbackName to the Focus Out callback list. The callback function, when invoked, receives the user parameter arg. A Focus Out callback is invoked when the gadget loses the keyboard focus.

Parameters
callbackNameThe name of the new callback.
argThe callback argument.
See Also
focusOut(), setFocusOutCallback(), getFocusOutCallbackName().
void IlvGadget::addLeaveGadgetCallback ( IlvGraphicCallback  callback)

Adds a Leave Gadget callback.

Adds callback 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.

Parameters
callbackThe new callback.
See Also
leaveGadget(), setLeaveGadgetCallback(), getLeaveGadgetCallback().
void IlvGadget::addLeaveGadgetCallback ( IlSymbol callbackName)

Adds a named Leave Gadget callback.

Adds callbackName 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.

Parameters
callbackNameThe name of the new callback.
See Also
leaveGadget(), setLeaveGadgetCallback(), getLeaveGadgetCallbackName()
void IlvGadget::addLeaveGadgetCallback ( IlvGraphicCallback  callback,
IlAny  arg 
)

Adds a Leave Gadget callback.

Adds callback to the Leave Gadget callback list. The callback function, when invoked, 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.

Parameters
callbackThe new callback.
argThe callback argument.
See Also
leaveGadget(), setLeaveGadgetCallback(), getLeaveGadgetCallback()
void IlvGadget::addLeaveGadgetCallback ( IlSymbol callbackName,
IlAny  arg 
)

Adds a named Leave Gadget callback.

Adds callbackName to the Leave Gadget callback list. The callback function, when called, 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.

Parameters
callbackNameThe name of the new callback.
argThe callback argument.
See Also
leaveGadget(), setLeaveGadgetCallback(), getLeaveGadgetCallbackName().
virtual void IlvGadget::applyTransform ( const IlvTransformer t)
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.

Note
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.
Parameters
tThe transformer value. If 0, no transformation is performed.

Implements IlvGraphic.

virtual void IlvGadget::boundingBox ( IlvRect bbox,
const IlvTransformer t = 0 
) const
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. When there is no transformation, t is set to 0.

Parameters
bboxThe bounding box to be set.
tA 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.

See Also
IlvGraphic::callCallbacks().
virtual IlBoolean IlvGadget::classFocusable ( ) const
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.

Returns
The focusable state of the gadget.
See Also
IlvGraphic::setFocusable().

Reimplemented from IlvGraphic.

virtual IlBoolean IlvGadget::contains ( const IlvPoint p,
const IlvPoint tp,
const IlvTransformer t = 0 
) const
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.

Parameters
pThe point to be tested.
tpThe transformed point obtained by applying the transformer t to the point p.
tA transformer value, or 0 if there is no transformation.
Returns
IlTrue when the point p lies inside the outline of the object.

Reimplemented from IlvGraphic.

virtual void IlvGadget::draw ( IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const
virtual

Draws the graphic object.

Draws the object in the given IlvPort using the transformer t which might have the value 0. The clip parameter, which can also be 0, represents the clipping region relative to the transformed object.

Parameters
dstThe destination port.
tThe transformer value. If 0, no transformation is performed.
clipThe clipping region, or 0 if none.

Implements IlvGraphic.

virtual void IlvGadget::drawBackground ( IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const
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.

See Also
drawContents(), IlvGadget::drawFrame().
virtual void IlvGadget::drawContents ( IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const
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.

See Also
IlvGadget::drawFrame(), IlvGadget::drawBackground().
virtual void IlvGadget::drawFrame ( IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const
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.

See Also
IlvGadget::drawContents(), IlvGadget::drawBackground().
virtual void IlvGadget::enterGadget ( )
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.

See Also
setEnterGadgetCallback().
static IlSymbol* IlvGadget::EnterGadgetSymbol ( )
static

Returns the symbol of the Enter Gadget callback list.

Returns
The symbol of the Enter Gadget callback list.
See Also
enterGadget(), setEnterGadgetCallback(), IlvGraphic::setCallback().
virtual void IlvGadget::fitToContents ( IlvDirection  direction = (IlvDirection)(IlvHorizontal|IlvVertical))
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.

Parameters
directionThe direction in which the gadget should be resized. Valid values are: IlvHorizontal, IlvVertical, or (IlvHorizontal|IlvVertical).
virtual void IlvGadget::focusIn ( )
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.

See Also
setFocusInCallback(), IlvGraphicHolder::setFocus().
static IlSymbol* IlvGadget::FocusInSymbol ( )
static

Returns the symbol of the Focus In callback list.

Returns
The symbol of the Focus In callback list.
See Also
focusIn(), setFocusInCallback(), IlvGraphic::setCallback().
virtual void IlvGadget::focusOut ( )
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.

See Also
setFocusOutCallback(), IlvGraphicHolder::setFocus().
static IlSymbol* IlvGadget::FocusOutSymbol ( )
static

Returns the symbol of the Focus Out callback list.

Returns
The symbol of the Focus Out callback list.
See Also
focusOut(), setFocusOutCallback(), IlvGraphic::setCallback().
virtual IlvIntensity IlvGadget::getAlpha ( ) const
virtual

Retrieves the alpha component.

Returns
The alpha component of the object.

Reimplemented from IlvGraphic.

virtual IlvAntialiasingMode IlvGadget::getAntialiasingMode ( ) const
virtual

Retrieves the anti-aliasing mode.

Returns
The anti-aliasing mode of the object.

Reimplemented from IlvGraphic.

virtual IlUInt IlvGadget::getCallbackTypes ( const char *const **  names,
const IlSymbol *const **  types 
) const
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.

Parameters
namesAn array of strings.
typesAn array of symbols.
Returns
The number of register callback types for this object.

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.

Returns
The first unnamed callback in the Enter Gadget callback list.
See Also
enterGadget(), setEnterGadgetCallback(), addEnterGadgetCallback().
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.

Returns
The name of the first named callback in the Enter Gadget callback list.
See Also
enterGadget(), setEnterGadgetCallback(), addEnterGadgetCallback().
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.

Returns
The function pointer to the first unnamed callback in the Focus In callback list.
See Also
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.

Returns
The name of the first named callback in the Focus In callback list.
See Also
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.

Returns
The first unnamed callback in the Focus Out callback list.
See Also
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.

Returns
The name of the first named callback in the Focus Out callback list.
See Also
focusIn(), setFocusOutCallback(), addFocusOutCallback().
virtual IlvPalette* IlvGadget::getInsensitivePalette ( ) const
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.

Returns
The palette used to display the gadget when it is not sensitive.
See Also
getSelectionPalette(), getSelectionTextPalette().
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.

Returns
The first unnamed callback in the Leave Gadget callback list.
See Also
leaveGadget(), setLeaveGadgetCallback(), addLeaveGadgetCallback().
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.

Returns
The name of the first named callback in the Leave Gadget callback list.
See Also
leaveGadget(), setLeaveGadgetCallback(), addLeaveGadgetCallback().
virtual IlvLookFeelHandler* IlvGadget::getLookFeelHandler ( ) const
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.

Returns
The look & feel handler used by this object.

Reimplemented from IlvSimpleGraphic.

virtual IlvPalette* IlvGadget::getSelectionPalette ( ) const
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.

Returns
The palette used to draw the background of the selected items in the gadget.
See Also
getInsensitivePalette(), getSelectionTextPalette().
virtual IlvPalette* IlvGadget::getSelectionTextPalette ( ) const
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.

Returns
The palette used to draw the text of the selected items in the gadget.
See Also
getInsensitivePalette(), getSelectionTextPalette().
virtual const char* IlvGadget::getStylableClassName ( ) const
virtual

Returns the class name of this object.

Returns
The class name of this object.

Reimplemented from IlvStylable.

virtual IlvDisplay* IlvGadget::getStylableDisplay ( ) const
virtual

Returns the display for this object.

Returns
The display instance of this object.

Implements IlvStylable.

virtual const char* IlvGadget::getStylableName ( ) const
virtual

Returns the name of this object.

Returns
The name of this object or 0 if it has none. This name may be used as the identifier discriminant in style sheets.

Reimplemented from IlvStylable.

virtual IlvStylist* IlvGadget::getStylist ( ) const
virtual

Returns the stylist for this object.

Returns
The stylist of this object or 0 if there is none.

Implements IlvStylable.

IlUShort IlvGadget::getThickness ( ) const

Returns the thickness of the gadget.

Returns
The thickness of the gadget.
See Also
setThickness().
IlvTransformer* IlvGadget::getTransformer ( ) const

Returns the transformer used to draw the gadget.

Returns
The transformer associated with the gadget. If the gadget has no associated transformer, the member function returns 0 (identity transformation).
virtual IlBoolean IlvGadget::handleEvent ( IlvEvent event)
virtual

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.

Parameters
eventThe event sent to the gadget.
Returns
IlTrue if the event has been handled by the gadget or IlFalse if it is not the case.
See Also
isActive().
virtual void IlvGadget::invert ( IlBoolean  temp = IlFalse)
virtual

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.

Parameters
tempIf IlTrue, highlights the object.

Reimplemented from IlvSimpleGraphic.

IlBoolean IlvGadget::isActive ( ) const

Indicates whether the gadget is active.

Returns
IlTrue if the gadget is active and IlFalse if it is not.
See Also
setActive(), IlvGraphic::isSensitive()
IlBoolean IlvGadget::isInverted ( ) const

Indicates whether the gadget is set to the inverted state.

Returns
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.
See Also
IlvGraphic::invert().
IlBoolean IlvGadget::isShowingFrame ( ) const

Returns IlTrue if the frame of the gadget is drawn.

Returns
IlTrue if the frame of the gadget is drawn. In this case, the method IlvGadget::drawFrame() is called after the gadget has been drawn.
See Also
IlvGadget::showFrame(), IlvGadget::drawFrame()
IlBoolean IlvGadget::isTransparent ( ) const

Indicates whether the gadget is transparent.

Returns
IlTrue if the gadget is transparent or IlFalse if it is not. A transparent gadget lets the window background show through it.
See Also
setTransparent().
virtual void IlvGadget::leaveGadget ( )
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.

See Also
setLeaveGadgetCallback().
static IlSymbol* IlvGadget::LeaveGadgetSymbol ( )
static

Returns the symbol of the Leave Gadget callback list.

Returns
The symbol of the Leave Gadget callback list.
See Also
leaveGadget(), setLeaveGadgetCallback(), IlvGraphic::setCallback().
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.

Parameters
activeSpecifies whether the gadget should be active (IlTrue) or not (IlFalse).
See Also
isActive(), IlvGraphic::setSensitive().
virtual void IlvGadget::setAlpha ( IlvIntensity  alpha)
virtual

Sets the alpha value of the object.

Parameters
alphaThe new alpha value.

Reimplemented from IlvSimpleGraphic.

virtual void IlvGadget::setAntialiasingMode ( IlvAntialiasingMode  mode)
virtual

Sets the anti-aliasing mode of the object.

Parameters
modeThe new anti-aliasing mode.

Reimplemented from IlvSimpleGraphic.

virtual void IlvGadget::setArcMode ( IlvArcMode  mode)
virtual

Sets the arc mode of the object.

Parameters
modeThe new arc mode.

Reimplemented from IlvSimpleGraphic.

virtual void IlvGadget::setBackground ( IlvColor background)
virtual

Sets the background color of the object.

Sets the background color of the object.

Parameters
backgroundThe new background color.

Reimplemented from IlvSimpleGraphic.

virtual void IlvGadget::setColorPattern ( IlvColorPattern pattern)
virtual

Sets the color pattern of the object.

Sets the color pattern of the object.

Parameters
patternThe new color pattern.

Reimplemented from IlvSimpleGraphic.

void IlvGadget::setEnterGadgetCallback ( IlvGraphicCallback  callback)

Sets an Enter Gadget callback.

Removes all the existing Enter Gadget callbacks before adding callback 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.

Parameters
callbackThe new callback.
See Also
enterGadget(), addEnterGadgetCallback(), getEnterGadgetCallback().
void IlvGadget::setEnterGadgetCallback ( IlSymbol callbackName)

Sets a named Enter Gadget callback.

Removes all the existing Enter Gadget callbacks before adding callbackName 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.

Parameters
callbackNameThe name of the new callback.
See Also
enterGadget, addEnterGadgetCallback(), getEnterGadgetCallbackName().
void IlvGadget::setEnterGadgetCallback ( IlvGraphicCallback  callback,
IlAny  arg 
)

Sets an Enter Gadget callback.

Removes all the existing Enter Gadget callbacks before adding callback to the Enter Gadget callback list. The callback function, when invoked, 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.

Parameters
callbackThe new callback.
argThe callback argument.
See Also
enterGadget(), addEnterGadgetCallback(), getEnterGadgetCallback().
void IlvGadget::setEnterGadgetCallback ( IlSymbol callbackName,
IlAny  arg 
)

Sets a named Enter Gadget callback.

Removes all the existing Enter Gadget callbacks before adding callbackName to the Enter Gadget callback list. The callback function, when invoked, 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.

Parameters
callbackNameThe name of the new callback.
argThe callback argument.
See Also
enterGadget(), addEnterGadgetCallback(), getEnterGadgetCallbackName().
virtual void IlvGadget::setFillRule ( IlvFillRule  rule)
virtual

Sets the fill rule of the object.

Parameters
ruleThe new fill rule.

Reimplemented from IlvSimpleGraphic.

virtual void IlvGadget::setFillStyle ( IlvFillStyle  style)
virtual

Sets the fill style of the object.

Parameters
styleThe new fill style.

Reimplemented from IlvSimpleGraphic.

void IlvGadget::setFocusInCallback ( IlvGraphicCallback  callback)

Sets a Focus In callback.

Removes all the existing Focus In callbacks before adding callback to the Focus In callback list. A Focus In callback is invoked when the gadget gets the keyboard focus.

Parameters
callbackThe new callback.
See Also
focusIn(), addFocusInCallback(), getFocusInCallback().
void IlvGadget::setFocusInCallback ( IlSymbol callbackName)

Sets a named Focus In callback.

Removes all the existing Focus In callbacks before adding callbackName to the Focus In callback list. A Focus In callback is invoked when the gadget gets the keyboard focus.

Parameters
callbackNameThe name of the new callback.
See Also
focusIn(), addFocusInCallback(), getFocusInCallbackName().
void IlvGadget::setFocusInCallback ( IlvGraphicCallback  callback,
IlAny  arg 
)

Sets a Focus In callback.

Removes all the existing Focus In callbacks before adding callback to the Focus In callback list. The callback function, when invoked, receives the user parameter arg. A Focus In callback is invoked when the gadget gets the keyboard focus.

Parameters
callbackThe new callback.
argThe callback argument.
See Also
focusIn(), addFocusInCallback(), getFocusInCallback().
void IlvGadget::setFocusInCallback ( IlSymbol callbackName,
IlAny  arg 
)

Sets a named Focus In callback.

Removes all the existing Focus In callbacks before adding callbackName to the Focus In callback list. The callback function, when invoked, receives the user parameter arg. A Focus In callback is called when the gadget gets the keyboard focus.

Parameters
callbackNameThe name of the new callback.
argThe callback argument.
See Also
focusIn(), addFocusInCallback(), getFocusInCallbackName().
void IlvGadget::setFocusOutCallback ( IlvGraphicCallback  callback)

Sets a Focus Out callback.

Removes all the existing Focus Out callbacks before adding callback to the Focus Out callback list. A Focus Out callback is invoked when the gadget loses the keyboard focus.

Parameters
callbackThe new callback.
See Also
focusIn(), addFocusOutCallback(), getFocusOutCallback().
void IlvGadget::setFocusOutCallback ( IlSymbol callbackName)

Sets a named Focus Out callback.

Removes all the existing Focus Out callbacks before adding callbackName to the Focus Out callback list. A Focus Out callback is invoked when the gadget loses the keyboard focus.

Parameters
callbackNameThe name of the new callback.
See Also
focusOut(), addFocusOutCallback(), getFocusOutCallbackName().
void IlvGadget::setFocusOutCallback ( IlvGraphicCallback  callback,
IlAny  arg 
)

Sets a Focus Out callback.

Removes all the existing Focus Out callbacks before adding callback to the Focus Out callback list. The callback function, when invoked, receives the user parameter arg. A Focus Out callback is invoked when the gadget loses the keyboard focus.

Parameters
callbackThe new callback.
argThe callback argument.
See Also
focusOut(), addFocusOutCallback(), getFocusOutCallback().
void IlvGadget::setFocusOutCallback ( IlSymbol callbackName,
IlAny  arg 
)

Sets a named Focus Out callback.

Removes all the existing Focus Out callbacks before adding callbackName to the Focus Out callback list. The callback function, when invoked, receives the user parameter arg. A Focus Out callback is invoked when the gadget loses the keyboard focus.

Parameters
callbackNameThe name of the new callback.
argThe callback argument.
See Also
focusOut(), addFocusOutCallback(), getFocusOutCallbackName().
virtual void IlvGadget::setFont ( IlvFont font)
virtual

Sets the font of the object.

Parameters
fontThe new font.

Reimplemented from IlvSimpleGraphic.

virtual void IlvGadget::setForeground ( IlvColor foreground)
virtual

Sets the foreground color of the object.

Sets the foreground color of the object.

Parameters
foregroundThe new foreground color.

Reimplemented from IlvSimpleGraphic.

virtual void IlvGadget::setGradientPattern ( IlvGradientPattern pattern)
virtual

Sets the gradient pattern of the object.

Sets the gradient pattern of the object.

Parameters
patternThe new gradient pattern.

Reimplemented from IlvSimpleGraphic.

virtual void IlvGadget::setHolder ( IlvGraphicHolder holder)
virtual

Sets the specified holder to the gadget.

Called each time the gadget is added to or removed from a holder.

Parameters
holderThe holder set to the gadget.
See Also
IlvGraphic::getHolder().

Reimplemented from IlvSimpleGraphic.

void IlvGadget::setLeaveGadgetCallback ( IlvGraphicCallback  callback)

Sets a Leave Gadget callback.

Removes all the existing Leave Gadget callbacks before adding callback 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.

Parameters
callbackThe new callback.
See Also
leaveGadget(), addLeaveGadgetCallback(), getLeaveGadgetCallback().
void IlvGadget::setLeaveGadgetCallback ( IlSymbol callbackName)

Sets a named Leave Gadget callback.

Removes all the existing Leave Gadget callbacks before adding callbackName 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.

Parameters
callbackNameThe name of the new callback.
See Also
leaveGadget(), addLeaveGadgetCallback(), getLeaveGadgetCallbackName().
void IlvGadget::setLeaveGadgetCallback ( IlvGraphicCallback  callback,
IlAny  arg 
)

Sets a Leave Gadget callback.

Removes all the existing Leave Gadget callbacks before adding callback to the Leave Gadget callback list. The callback function, when invoked, 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.

Parameters
callbackThe new callback.
argThe callback argument.
See Also
leaveGadget(), addLeaveGadgetCallback(), getLeaveGadgetCallback().
void IlvGadget::setLeaveGadgetCallback ( IlSymbol callbackName,
IlAny  arg 
)

Sets a named Leave Gadget callback.

Removes all the existing Leave Gadget callbacks before adding callbackName to the Leave Gadget callback list. The callback function, when invoked, 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.

Parameters
callbackNameThe name of the new callback.
argThe callback argument.
See Also
leaveGadget(), addLeaveGadgetCallback(), getLeaveGadgetCallbackName().
virtual void IlvGadget::setLineStyle ( IlvLineStyle style)
virtual

Sets the line style of the object.

Parameters
styleThe new line style.

Reimplemented from IlvSimpleGraphic.

virtual void IlvGadget::setLineWidth ( IlUShort  width)
virtual

Sets the line width of the object.

Parameters
widthThe new line width.

Reimplemented from IlvSimpleGraphic.

void IlvGadget::setLookFeelHandler ( IlvLookFeelHandler handler)

Sets the look and feel handler of this gadget.

Parameters
handlerThe new look and feel handler.
virtual void IlvGadget::setMode ( IlvDrawMode  mode)
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).

Parameters
modeThe drawing mode to be set.

Reimplemented from IlvSimpleGraphic.

virtual void IlvGadget::setOverwrite ( IlBoolean  over)
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).

Parameters
overIf IlFalse, sets selective hidden drawing operations.

Reimplemented from IlvSimpleGraphic.

virtual void IlvGadget::setPalette ( IlvPalette palette)
virtual

Sets the internal palette to the given palette value.

Sets the internal palette to the given palette value. The previous palette is unlocked, and palette is locked.

Parameters
paletteThe new palette of this object.

Reimplemented from IlvSimpleGraphic.

virtual void IlvGadget::setPattern ( IlvPattern pattern)
virtual

Sets the pattern of the object.

Sets the pattern of the object.

Parameters
patternThe new pattern.

Reimplemented from IlvSimpleGraphic.

virtual void IlvGadget::setThickness ( IlUShort  thickness)
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.

Parameters
thicknessThe thickness of the gadget.
See Also
getThickness().
virtual void IlvGadget::setTransparent ( IlBoolean  value)
virtual

Specifies whether the gadget should be transparent.

Parameters
valueIndicates whether the gadget should be transparent (IlTrue) or not (IlFalse).
See Also
isTransparent().
virtual void IlvGadget::showFrame ( IlBoolean  show)
virtual

Specifies whether the frame of the gadget should be shown or hidden.

Parameters
showSpecifies whether the frame of the gadget should be shown (IlTrue) or hidden (IlFalse).
See Also
IlvGadget::isShowingFrame(), IlvGadget::drawFrame()
virtual IlBoolean IlvGadget::useDefaultColors ( ) const
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.

Returns
IlTrue if the gadget uses default colors or IlFalse if it does not.
virtual void IlvGadget::useDefaultSize ( IlBoolean  value)
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.

Parameters
valueSpecifies whether the gadget should use its default size (IlTrue) or not (IlFalse).
See Also
usesDefaultSize().
virtual IlBoolean IlvGadget::usesDefaultButtonKeys ( ) const
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.

Returns
IlTrue if the gadget handles the default button keys and IlFalse otherwise..
See Also
IlvGadgetContainer::setDefaultButton().
IlBoolean IlvGadget::usesDefaultSize ( ) const

Indicates whether the gadget uses the default size.

Returns
IlTrue if this gadget uses the default size or IlFalse if it does not.
See Also
useDefaultSize().

© Copyright 2015, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.