rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvGadget Class Reference

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

#include <ilviews/base/gadget.h>

Inheritance diagram for IlvGadget:
IlvSimpleGraphic IlvGraphic

List of all members.

Public Member Functions

 IlvGadget (IlvDisplay *display, const IlvRect &rect, IlUShort thickness=2, IlvPalette *palette=0)
 Constructor.
void addEnterGadgetCallback (IlSymbol *callbackName, IlAny arg)
 Adds a named Enter Gadget callback.
void addEnterGadgetCallback (IlvGraphicCallback callback, IlAny arg)
 Adds an Enter Gadget callback.
void addEnterGadgetCallback (IlSymbol *callbackName)
 Adds a named Enter Gadget callback.
void addEnterGadgetCallback (IlvGraphicCallback callback)
 Adds an Enter Gadget callback.
void addFocusInCallback (IlSymbol *callbackName, IlAny arg)
 Adds a named Focus In callback.
void addFocusInCallback (IlvGraphicCallback callback, IlAny arg)
 Adds a Focus In callback.
void addFocusInCallback (IlSymbol *callbackName)
 Adds a named Focus In callback.
void addFocusInCallback (IlvGraphicCallback callback)
 Adds a Focus In callback.
void addFocusOutCallback (IlSymbol *callbackName, IlAny arg)
 Adds a named Focus Out callback.
void addFocusOutCallback (IlvGraphicCallback callback, IlAny arg)
 Adds a Focus Out callback.
void addFocusOutCallback (IlSymbol *callbackName)
 Adds a named Focus Out callback.
void addFocusOutCallback (IlvGraphicCallback callback)
 Adds a Focus Out callback.
void addLeaveGadgetCallback (IlSymbol *callbackName, IlAny arg)
 Adds a named Leave Gadget callback.
void addLeaveGadgetCallback (IlvGraphicCallback callback, IlAny arg)
 Adds a Leave Gadget callback.
void addLeaveGadgetCallback (IlSymbol *callbackName)
 Adds a named Leave Gadget callback.
void addLeaveGadgetCallback (IlvGraphicCallback callback)
 Adds a Leave Gadget callback.
virtual void applyTransform (const IlvTransformer *t)
 Applies a transformation function to the graphic object.
virtual void boundingBox (IlvRect &rect, const IlvTransformer *t=0) const
 Retrieves the bounding box of the graphic object.
void callCallback ()
 Calls the Main callback of the gadget.
virtual IlBoolean classFocusable () const
 Indicates whether the gadget instance can have the focus.
virtual IlBoolean contains (const IlvPoint &, const IlvPoint &, const IlvTransformer *t=0) const
 Checks whether a point is in the object.
virtual void draw (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws the graphic object.
virtual void drawBackground (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Called to draw the gadget's background.
virtual void drawContents (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Called to draw the gadget's contents.
virtual void drawFrame (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Called to draw the gadget's frame.
virtual void enterGadget ()
 Called when the mouse enters the bounding box of the gadget.
virtual void fitToContents (IlvDirection direction=(IlvDirection)(IlvHorizontal|IlvVertical))
 Resizes the gadget to fit its contents.
virtual void focusIn ()
 Called when the gadget receives the keyboard focus.
virtual void focusOut ()
 Called when the gadget loses the keyboard focus.
virtual IlvIntensity getAlpha () const
 Retrieves the alpha value.
virtual IlvAntialiasingMode getAntialiasingMode () const
 Retrieves the anti-aliasing mode.
virtual IlUInt getCallbackTypes (const char *const **, const IlSymbol *const **) const
 Gets the number of register callback types for the object.
IlvGraphicCallback getEnterGadgetCallback () const
 Returns a pointer to the first unnamed callback in the Enter Gadget callback list.
IlSymbolgetEnterGadgetCallbackName () const
 Returns the name of the first named callback in the Enter Gadget callback list.
IlvGraphicCallback getFocusInCallback () const
 Returns a pointer to the first unnamed callback in the Focus In callback list.
IlSymbolgetFocusInCallbackName () const
 Returns the name of the first named callback in the Focus In callback list.
IlvGraphicCallback getFocusOutCallback () const
 Returns a pointer to the first unnamed callback in the Focus Out callback list.
IlSymbolgetFocusOutCallbackName () const
 Returns the name of the first named callback in the Focus Out callback list.
virtual IlvPalettegetInsensitivePalette () const
 Returns the palette used to display a nonsensitive gadget.
IlvGraphicCallback getLeaveGadgetCallback () const
 Returns a pointer to the first unnamed callback in the Leave Gadget callback list.
IlSymbolgetLeaveGadgetCallbackName () const
 Returns the name of the first named callback in the Leave Gadget callback list.
virtual IlvLookFeelHandlergetLookFeelHandler () const
 Returns the look & feel handler used by this object.
virtual IlvPalettegetSelectionPalette () const
 Returns the palette used to draw the background of the selected items in the gadget.
virtual IlvPalettegetSelectionTextPalette () const
 Returns the palette used to draw the text of the selected items in the gadget.
IlUShort getThickness () const
 Returns the thickness of the gadget.
IlvTransformergetTransformer () const
 Returns the transformer used to draw the gadget.
virtual IlBoolean handleEvent (IlvEvent &event)
 Handles the events received by the gadget.
virtual void invert (IlBoolean temp=((IlBoolean) 0))
 Highlights the object.
IlBoolean isActive () const
 Indicates whether the gadget is active.
IlBoolean isInverted () const
 Indicates whether the gadget is set to the inverted state.
IlBoolean isShowingFrame () const
 Returns IlTrue if the frame of the gadget is drawn.
IlBoolean isTransparent () const
 Indicates whether the gadget is transparent.
virtual void leaveGadget ()
 Called when the mouse leaves the bounding box of the gadget.
virtual void reDraw () const
 Redraws the gadget.
void setActive (IlBoolean active)
 Specifies whether the gadget should be active.
virtual void setAlpha (IlvIntensity)
 Sets the alpha value of the object.
virtual void setAntialiasingMode (IlvAntialiasingMode)
 Sets the anti-aliasing mode of the object.
virtual void setArcMode (IlvArcMode)
 Sets the arc mode of the object.
virtual void setBackground (IlvColor *c)
 Sets the background color of the object.
virtual void setColorPattern (IlvColorPattern *p)
 Sets the color pattern of the object.
void setEnterGadgetCallback (IlSymbol *callbackName, IlAny arg)
 Sets a named Enter Gadget callback.
void setEnterGadgetCallback (IlvGraphicCallback callback, IlAny arg)
 Sets an Enter Gadget callback.
void setEnterGadgetCallback (IlSymbol *callbackName)
 Sets a named Enter Gadget callback.
void setEnterGadgetCallback (IlvGraphicCallback callback)
 Sets an Enter Gadget callback.
virtual void setFillRule (IlvFillRule)
 Sets the fill rule of the object.
virtual void setFillStyle (IlvFillStyle f)
 Sets the fill style of the object.
void setFocusInCallback (IlSymbol *callbackName, IlAny arg)
 Sets a named Focus In callback.
void setFocusInCallback (IlvGraphicCallback callback, IlAny arg)
 Sets a Focus In callback.
void setFocusInCallback (IlSymbol *callbackName)
 Sets a named Focus In callback.
void setFocusInCallback (IlvGraphicCallback callback)
 Sets a Focus In callback.
void setFocusOutCallback (IlSymbol *callbackName, IlAny arg)
 Sets a named Focus Out callback.
void setFocusOutCallback (IlvGraphicCallback callback, IlAny arg)
 Sets a Focus Out callback.
void setFocusOutCallback (IlSymbol *callbackName)
 Sets a named Focus Out callback.
void setFocusOutCallback (IlvGraphicCallback callback)
 Sets a Focus Out callback.
virtual void setFont (IlvFont *f)
 Sets the font of the object.
virtual void setForeground (IlvColor *c)
 Sets the foreground color of the object.
virtual void setGradientPattern (IlvGradientPattern *p)
 Sets the gradient pattern of the object.
virtual void setHolder (IlvGraphicHolder *holder)
 Sets the specified holder to the gadget.
void setLeaveGadgetCallback (IlSymbol *callbackName, IlAny arg)
 Sets a named Leave Gadget callback.
void setLeaveGadgetCallback (IlvGraphicCallback callback, IlAny arg)
 Sets a Leave Gadget callback.
void setLeaveGadgetCallback (IlSymbol *callbackName)
 Sets a named Leave Gadget callback.
void setLeaveGadgetCallback (IlvGraphicCallback callback)
 Sets a Leave Gadget callback.
virtual void setLineStyle (IlvLineStyle *style)
 Sets the line style of the object.
virtual void setLineWidth (IlUShort style)
 Sets the line width of the object.
void setLookFeelHandler (IlvLookFeelHandler *lfh)
 Sets the look and feel handler of this gadget.
virtual void setMode (IlvDrawMode m)
 Sets the drawing mode of the object temporarily.
virtual void setOverwrite (IlBoolean value)
 Sets an overwrite mode that modifies how the drawing member functions operate.
virtual void setPalette (IlvPalette *)
 Sets the internal palette to the given palette value.
virtual void setPattern (IlvPattern *)
 Sets the pattern of the object.
virtual void setThickness (IlUShort thickness)
 Sets the thickness of the gadget.
virtual void setTransparent (IlBoolean value)
 Specifies whether the gadget should be transparent.
virtual void showFrame (IlBoolean show)
 Specifies whether the frame of the gadget should be shown or hidden.
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.
virtual void useDefaultSize (IlBoolean value)
 Specifies whether the gadget should use the default size.
virtual IlBoolean usesDefaultButtonKeys () const
 Indicates whether the gadget handles the default button keys.
IlBoolean usesDefaultSize () const
 Indicates whether the gadget uses the default size.

Static Public Member Functions

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

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

Member Function Documentation

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:
callbackName The name of the new callback.
arg The callback argument.
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:
callback A pointer to the new callback.
arg The callback argument.
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:
callbackName The name of the new callback.
See also:
enterGadget, setEnterGadgetCallback, getEnterGadgetCallbackName
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:
callback A pointer to the new callback.
See also:
enterGadget, setEnterGadgetCallback, getEnterGadgetCallback
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 has the keyboard focus.

Parameters:
callbackName The name of the new callback.
arg The callback argument.
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 has the keyboard focus.

Parameters:
callback A pointer to the new callback.
arg The callback argument.
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 has the keyboard focus.

Parameters:
callbackName The name of the new callback.
See also:
focusIn, setFocusInCallback, getFocusInCallbackName
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 has the keyboard focus.

Parameters:
callback A pointer to the new callback.
See also:
focusIn, setFocusInCallback, getFocusInCallback
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:
callbackName The name of the new callback.
arg The callback argument.
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:
callback A pointer to the new callback.
arg The callback argument.
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:
callbackName The name of the new callback.
See also:
focusOut, setFocusOutCallback, getFocusOutCallbackName
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:
callback A pointer to the new callback.
See also:
focusOut, setFocusOutCallback, getFocusOutCallback
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:
callbackName The name of the new callback.
arg The callback argument.
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:
callback A pointer to the new callback.
arg The callback argument.
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:
callbackName The name of the new callback.
See also:
leaveGadget, setLeaveGadgetCallback, getLeaveGadgetCallbackName
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:
callback A pointer to the new callback.
See also:
leaveGadget, setLeaveGadgetCallback, getLeaveGadgetCallback
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.

Warning:
[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:
t The 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:
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 version 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:
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.
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:
dst The destination port.
t The transformer value. If 0, no transformation is performed.
clip The 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 IlvGadget::setTransparent, this method will not be called.

See also:
IlvGadget::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 IlvGadget::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:
direction The 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 value.

Returns:
The IlvPalette::getAlpha value of the palette.

Reimplemented from IlvSimpleGraphic.

virtual IlvAntialiasingMode IlvGadget::getAntialiasingMode (  )  const [virtual]

Retrieves the anti-aliasing mode.

Returns:
The IlvPalette::getAntialiasingMode value of the palette.

Reimplemented from IlvSimpleGraphic.

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:
names An array of strings.
types An 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:
A pointer to 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 a pointer to the first unnamed callback in the Focus In callback list.

A Focus In callback is invoked when the gadget has 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 has 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:
A pointer to 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:
A pointer to 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:
A pointer to 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:
A pointer to 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:
A pointer to the palette used to draw the text of the selected items in the gadget.
See also:
getInsensitivePalette, getSelectionTextPalette
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:
A pointer to the transformer associated with the gadget. If the gadget has no associated transformer, the member function returns 0. There is identity.
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 handleEvent 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:
event The event sent to the gadget.
Returns:
A Boolean value indicating whether the event has been handled by the gadget.
See also:
isActive
virtual void IlvGadget::invert ( IlBoolean  temp = ((IlBoolean) 0)  )  [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:
temp If IlTrue, highlights the object.

Reimplemented from IlvSimpleGraphic.

IlBoolean IlvGadget::isActive (  )  const

Indicates whether the gadget is active.

Returns:
A Boolean value indicating whether the gadget is active (IlTrue) or not (IlFalse).
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:
A Boolean value specifying whether the gadget is transparent. 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 set to 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 gadget handleEvent method.

Parameters:
active A Boolean value specifying 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:
alpha The new alpha value.

Reimplemented from IlvSimpleGraphic.

virtual void IlvGadget::setAntialiasingMode ( IlvAntialiasingMode  mode  )  [virtual]

Sets the anti-aliasing mode of the object.

Parameters:
mode The new anti-aliasing mode.

Reimplemented from IlvSimpleGraphic.

virtual void IlvGadget::setArcMode ( IlvArcMode  mode  )  [virtual]

Sets the arc mode of the object.

Parameters:
mode The 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:
background The 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:
pattern The new color pattern.

Reimplemented from IlvSimpleGraphic.

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:
callbackName The name of the new callback.
arg The callback argument.
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:
callback A pointer to the new callback.
arg The callback argument.
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:
callbackName The name of the new callback.
See also:
enterGadget, addEnterGadgetCallback, getEnterGadgetCallbackName
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:
callback A pointer to the new callback.
See also:
enterGadget, addEnterGadgetCallback, getEnterGadgetCallback
virtual void IlvGadget::setFillRule ( IlvFillRule  rule  )  [virtual]

Sets the fill rule of the object.

Parameters:
rule The new fill rule.

Reimplemented from IlvSimpleGraphic.

virtual void IlvGadget::setFillStyle ( IlvFillStyle  style  )  [virtual]

Sets the fill style of the object.

Parameters:
style The new fill style.

Reimplemented from IlvSimpleGraphic.

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 has the keyboard focus.

Parameters:
callbackName The name of the new callback.
arg The callback argument.
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 has the keyboard focus.

Parameters:
callback A pointer to the new callback.
arg The callback argument.
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 has the keyboard focus.

Parameters:
callbackName The name of the new callback.
See also:
focusIn, addFocusInCallback, getFocusInCallbackName
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 has the keyboard focus.

Parameters:
callback A pointer to the new callback.
See also:
focusIn, addFocusInCallback, getFocusInCallback
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:
callbackName The name of the new callback.
arg The callback argument.
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:
callback A pointer to the new callback.
arg The callback argument.
See also:
focusOut, 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:
callbackName The name of the new callback.
See also:
focusOut, addFocusOutCallback, getFocusOutCallbackName
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:
callback A pointer to the new callback.
See also:
focusIn, addFocusOutCallback, getFocusOutCallback
virtual void IlvGadget::setFont ( IlvFont font  )  [virtual]

Sets the font of the object.

Parameters:
font The 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:
foreground The 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:
pattern The 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:
holder The holder set to the gadget.
See also:
IlvGraphic::getHolder

Reimplemented from IlvSimpleGraphic.

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:
callbackName The name of the new callback.
arg The callback argument.
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:
callback A pointer to the new callback.
arg The callback argument.
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:
callbackName The name of the new callback.
See also:
leaveGadget, addLeaveGadgetCallback, getLeaveGadgetCallbackName
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:
callback A pointer to the new callback.
See also:
leaveGadget, addLeaveGadgetCallback, getLeaveGadgetCallback
virtual void IlvGadget::setLineStyle ( IlvLineStyle style  )  [virtual]

Sets the line style of the object.

Parameters:
style The new line style.

Reimplemented from IlvSimpleGraphic.

virtual void IlvGadget::setLineWidth ( IlUShort  width  )  [virtual]

Sets the line width of the object.

Parameters:
width The new line width.

Reimplemented from IlvSimpleGraphic.

void IlvGadget::setLookFeelHandler ( IlvLookFeelHandler lfh  ) 

Sets the look and feel handler of this gadget.

Parameters:
lfh The 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:
mode The 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:
over If 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:
palette The 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:
pattern The 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:
thickness The thickness of the gadget.
See also:
getThickness
virtual void IlvGadget::setTransparent ( IlBoolean  value  )  [virtual]

Specifies whether the gadget should be transparent.

Parameters:
value A Boolean value specifying 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:
show A Boolean value specifying whether the frame of the gadget should be shown or hidden.
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:
A Boolean value specifying whether the gadget uses default colors (IlTrue) or not (IlFalse).
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:
value A Boolean value specifying 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:
A Boolean value specifying whether the gadget handles the default button keys.
See also:
IlvGadgetContainer::setDefaultButton
IlBoolean IlvGadget::usesDefaultSize (  )  const

Indicates whether the gadget uses the default size.

Returns:
A Boolean value specifying whether this gadget uses the default size.
See also:
useDefaultSize
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, 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.