Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Graphic class. More...
#include <ilviews/base/graphic.h>
Public Member Functions | |
void | addCallback (const IlSymbol *callbackType, IlvGraphicCallback callback, IlAny data) |
Adds a callback function to a callback list. | |
void | addCallback (const IlSymbol *callbackType, const IlSymbol *callbackName, const IlSymbol *script=0) |
Adds a callback function to a callback list. | |
void | addCallback (const IlSymbol *callbackType, IlvGraphicCallback callback) |
Adds a callback function to a callback list. | |
void | addClassProperty (const IlSymbol *key, IlAny value) |
Adds a property to this object's class. | |
void | addProperty (const IlSymbol *key, IlAny value) |
Adds a specific property to the object. | |
void | addTag (const IlSymbol *tag) |
Adds a tag. | |
virtual void | apply (IlvApplyObject function, IlAny arg) |
Applies a function to objects that compose another object. | |
IlBoolean | applyAttribute (const char *attributeClassName, const char *value, IlAny checkData=0) const |
Applies attributes. | |
IlBoolean | applyAttribute (const char *attributeClassName, IlFloat value, IlAny checkData=0) const |
Applies attributes. | |
IlBoolean | applyAttribute (const char *attributeClassName, IlInt value, IlAny checkData=0) const |
Applies attributes. | |
virtual void | applyReferences (IlvApplyObject function, IlAny arg) |
Applies a function to objects that are referenced by another object. | |
virtual void | applyResources (const char *storageName, const char *storageClassName, const char *objectName, const char *objectClassName, IlvDisplay *display=0) |
Applies resources on a graphic object. | |
virtual void | applyTransform (const IlvTransformer *t)=0 |
Applies a transformation function to the graphic object. | |
virtual IlBoolean | applyValue (const IlvValue &val) |
Apply an accessor. | |
virtual void | boundingBox (IlvRect &bbox, const IlvTransformer *t=0) const =0 |
Retrieves the bounding box of the graphic object. | |
virtual void | callCallbacks (const IlSymbol *callbackType) |
Calls every callback of a given type. | |
virtual IlBoolean | changeValue (const IlvValue &val) |
Changes the value of an accessor. | |
virtual IlBoolean | changeValues (const IlvValue *values, IlUShort count) |
Changes several accessor values simultaneously. | |
const char * | className () const |
Returns the class name of an object. | |
virtual void | computeFocusRegion (IlvRegion &r, const IlvTransformer *t=0) const |
Computes the region needed for the drawing of the focus. | |
IlBoolean | contains (const IlvPoint &p) const |
Checks whether a point is in the object. | |
virtual IlBoolean | contains (const IlvPoint &p, const IlvPoint &tp, const IlvTransformer *t=0) const |
Checks whether a point is in the object. | |
virtual IlvGraphic * | copy () const =0 |
Copies this object. | |
void | draw (IlvPort *dst, const IlvTransformer *t, const IlvRect *clip) const |
Draws a graphic object. | |
virtual void | draw (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const =0 |
Draws the graphic object. | |
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. | |
virtual void | getAccessors (const IlSymbol *const **accessors, const IlvValueTypeClass *const **types, IlUInt &count) const |
Retrieves the list of available accessors of an object. | |
virtual IlvIntensity | getAlpha () const |
Retrieves the alpha component. | |
virtual IlvAntialiasingMode | getAntialiasingMode () const |
Retrieves the anti-aliasing mode. | |
IlvGraphicCallback | getCallback () const |
Gets the main callback function. | |
IlvGraphicCallback | getCallback (const IlSymbol *callbackType) const |
Gets a callback. | |
IlAny | getCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName) const |
Gets a callback user data. | |
IlAny | getCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback) const |
Gets a callback user data. | |
IlSymbol * | getCallbackName () const |
Gets the symbol that identifies the main callback. | |
IlSymbol * | getCallbackName (const IlSymbol *callbackType) const |
Gets the name of a callback. | |
virtual IlUInt | getCallbackTypes (const char *const **names, const IlSymbol *const **types) const |
Gets the number of register callback types for the object. | |
virtual IlvGraphic * | getChildAt (IlUInt index) const |
Returns the sub-object of the graphic object specified by index. | |
virtual IlvGraphic * | getChildByName (const char *name) const |
Returns the sub-object of the graphic object specified by name. | |
virtual IlUInt | getChildCount () const |
Returns the number of children of this graphic object. | |
virtual IlInt | getChildIndex (const IlvGraphic *object) const |
Returns the index of the specified sub-object in this graphic object. | |
virtual IlvGraphic *const * | getChildren (IlUInt &count) const |
Returns an array containing the sub-objects of this graphic object. | |
virtual IlvClassInfo * | getClassInfo () const |
Gets class information. | |
IlAny | getClassProperty (const IlSymbol *key, IlBoolean checkParent=((IlBoolean) 0)) const |
Retrieves the indicated property value in the class of this object. | |
IlAny | getClientData () const |
Gets client data. | |
virtual const char * | getDefaultInteractor () const |
Gets the name of the default interactor for this object. | |
virtual IlvGraphicHolder * | getHolder () const |
Gets a pointer to an object's holder. | |
IlvInteractor * | getInteractor () const |
Returns the interactor associated with the current object. | |
virtual IlUShort | getLineWidth () const |
Retrieves the line width. | |
virtual IlvLookFeelHandler * | getLookFeelHandler () const |
Returns the look & feel handler used by this object. | |
const char * | getName () const |
Gets the name of the object. | |
IlvNamedProperty * | getNamedProperty (const IlSymbol *name) const |
Gets a named property. | |
IlSymbol * | getNextFocusGraphic () const |
Gets the next object in the focus chain. | |
IlSymbol * | getPreviousFocusGraphic () const |
Gets the previous object in the focus chain. | |
IlAny | getProperty (const IlSymbol *key) const |
Gets a property. | |
IlvSmartSet * | getSmartSet () const |
Gets the smart set object containing a specified graphic object. | |
void | h (IlvDim h) |
Sets the height value of the object. | |
IlvDim | h () const |
Gets the height value of the object. | |
IlBoolean | hasCallback (const IlSymbol *callbackType, const IlSymbol *callbackName) const |
Checks whether a callback function is in a callback list. | |
IlBoolean | hasCallback (const IlSymbol *callbackType, IlvGraphicCallback callback) const |
Checks whether a callback function is in a callback list. | |
IlBoolean | hasCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName) const |
Checks whether a callback function has user data. | |
IlBoolean | hasCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback) const |
Checks whether a callback function has user data. | |
const IlvClassInfo * | hasClassProperty (const IlSymbol *key, IlBoolean s=((IlBoolean) 0)) const |
Checks for a class where the keyed property exists. | |
IlBoolean | hasProperty (const IlSymbol *key) const |
Checks whether the object has a particular property. | |
IlBoolean | hasTag (const IlSymbol *tag) const |
Checks whether the object has a specific tag. | |
IlBoolean | inside (const IlvRect &r) const |
Determines whether a rectangle is inside the bounding box. | |
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. | |
virtual IlBoolean | inside (const IlvRegion &r, const IlvTransformer *t=0) const |
Determines whether an object with transformation applied is inside the bounding box. | |
IlBoolean | intersects (const IlvRect &r) const |
Checks whether a rectangle intersects the bounding box. | |
IlBoolean | intersects (const IlvRect &r, const IlvRect &tr, const IlvTransformer *t=0) const |
Checks whether a rectangle intersects the bounding box with transformation applied. | |
virtual IlBoolean | intersects (const IlvRegion &r, const IlvTransformer *t=0) const |
Checks whether a region intersects the bounding box with transformation applied. | |
virtual void | invert (IlBoolean temp=((IlBoolean) 0)) |
Highlights the object. | |
IlBoolean | isFirstFocusGraphic () const |
Checks whether the object is first in the focus chain. | |
IlBoolean | isFocusable () const |
Checks whether the object can receive the keyboard focus or not. | |
IlBoolean | isInSmartSet () const |
Checks whether a graphic object belongs to a smart set. | |
IlBoolean | isLastFocusGraphic () const |
Checks whether the object is last in the focus chain. | |
IlBoolean | isSensitive () const |
Checks whether the object is sensitive. | |
IlBoolean | isSubtypeOf (const IlvClassInfo *classInfo) const |
Checks whether this object's class is a subclass. | |
IlBoolean | isSubtypeOf (const char *parentClass) const |
Checks whether this object's class is a subclass of a given parent class. | |
void | move (const IlvPoint &p) |
Moves the graphic object. | |
virtual void | move (IlvPos x, IlvPos y) |
Moves the graphic object. | |
void | moveResize (const IlvRect &size) |
Moves and resizes a graphic object. | |
virtual IlBoolean | needsInputContext () const |
Indicates whether the graphic instance can connect to an input method for locale dependent input. | |
virtual void | print (ILVSTDPREF ostream &out, int level=0) const |
Prints for debugging purposes. | |
virtual IlvValue & | queryValue (IlvValue &val) const |
Retrieves the value of an accessor. | |
virtual void | queryValues (IlvValue *values, IlUShort count) const |
Retrieves multiple accessor values simultaneously. | |
void | removeCallback (const IlSymbol *callbackType, const IlSymbol *callbackName) |
Removes a callback function from a callback list. | |
void | removeCallback (const IlSymbol *callbackType, IlvGraphicCallback callback) |
Removes a callback function from a callback list. | |
IlBoolean | removeClassProperty (const IlSymbol *key) |
Removes a property from this object's class. | |
void | removeInteractor () |
Removes the interactor from the current object. | |
IlvNamedProperty * | removeNamedProperty (IlSymbol *name) |
Removes a named property from the object. | |
IlBoolean | removeProperty (const IlSymbol *key) |
Removes a property from the object. | |
void | removeTag (const IlSymbol *tag) |
Removes a tag. | |
IlBoolean | replaceClassProperty (const IlSymbol *key, IlAny value) |
Replaces a property in this object's class. | |
IlBoolean | replaceProperty (const IlSymbol *key, IlAny value) |
Replaces a property. | |
virtual void | resize (IlvDim newW, IlvDim newH) |
Resizes a graphic object. | |
virtual void | rotate (const IlvPoint ¢er, IlFloat angle) |
Rotates a graphic object. | |
virtual void | scale (IlFloat zoomX, IlFloat zoomY) |
Scales the graphic object. | |
virtual void | setAlpha (IlvIntensity alpha) |
Sets the alpha value of the object. | |
virtual void | setAntialiasingMode (IlvAntialiasingMode mode) |
Sets the anti-aliasing mode of the object. | |
virtual void | setArcMode (IlvArcMode mode) |
Sets the arc mode of the object. | |
virtual void | setBackground (IlvColor *background) |
Sets the background color of the object. | |
void | setCallback (IlvGraphicCallback callback, IlAny data) |
Sets the main callback function. | |
void | setCallback (const IlSymbol *callbackType, IlvGraphicCallback callback, IlAny data) |
Removes all previously set callbacks. | |
void | setCallback (const IlSymbol *callbackType, const IlSymbol *callbackName, const IlSymbol *script=0) |
Removes all previously set callbacks. | |
void | setCallback (const IlSymbol *callbackType, IlvGraphicCallback callback) |
Sets a new callback. | |
void | setCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName, IlAny data) |
Sets the callback user data for a callback function. | |
void | setCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback, IlAny data) |
Sets the callback user data for a callback function. | |
void | setCallbackName (const IlSymbol *callbackName) |
Sets the symbol that identifies the main callback. | |
void | setClientData (IlAny clientData) |
Sets client data. | |
virtual void | setColorPattern (IlvColorPattern *pattern) |
Sets the color pattern of the object. | |
virtual void | setFillRule (IlvFillRule rule) |
Sets the fill rule of the object. | |
virtual void | setFillStyle (IlvFillStyle style) |
Sets the fill style of the object. | |
void | setFirstFocusGraphic () |
Sets the object to be first in the focus chain. | |
void | setFocusable (IlBoolean value) |
Set the focusable state of the object. | |
virtual void | setFont (IlvFont *font) |
Sets the font of the object. | |
virtual void | setForeground (IlvColor *foreground) |
Sets the foreground color of the object. | |
virtual void | setGradientPattern (IlvGradientPattern *pattern) |
Sets the gradient pattern of the object. | |
virtual void | setHolder (IlvGraphicHolder *holder) |
Sets the object's holder. | |
IlBoolean | setInteractor (const char *name) |
Attaches an interactor to the current object. | |
IlBoolean | setInteractor (IlvInteractor *inter) |
Attaches an interactor to the current object. | |
void | setLastFocusGraphic () |
Sets the object to be last in the focus chain. | |
virtual void | setLineStyle (IlvLineStyle *style) |
Sets the line style of the object. | |
virtual void | setLineWidth (IlUShort width) |
Sets the line width of the object. | |
virtual void | setMode (IlvDrawMode mode) |
Sets the drawing mode of the object temporarily. | |
virtual void | setName (const char *name) |
Sets the name of the object. | |
IlvNamedProperty * | setNamedProperty (IlvNamedProperty *property) |
Sets a named property on the object. | |
virtual void | setNeedsInputContext (IlBoolean val) |
Specifies whether the graphic object should have locale dependent input. | |
void | setNextFocusGraphic (IlSymbol *name) |
Sets the object to be next in the focus chain. | |
virtual void | setOverwrite (IlBoolean over) |
Sets an overwrite mode that modifies how the drawing member functions operate. | |
virtual void | setPalette (IlvPalette *palette) |
Sets the palette of the object. | |
virtual void | setPattern (IlvPattern *pattern) |
Sets the pattern of the object. | |
void | setPreviousFocusGraphic (IlSymbol *name) |
Sets an object as previous in the focus chain. | |
void | setProperty (const IlSymbol *key, IlAny value) |
Sets a property of the object to a value. | |
virtual void | setSensitive (IlBoolean value) |
Sets the sensitivity of the object. | |
virtual void | symmetry (IlvDirection axis) |
Flips a graphic object. | |
virtual void | translate (IlvPos dx, IlvPos dy) |
Applies a transformation function on a graphic object. | |
void | w (IlvDim w) |
Sets the width value of the object. | |
IlvDim | w () const |
Gets the width value of the object. | |
virtual void | write (IlvOutputFile &output) const =0 |
Writes an object description to a file. | |
void | x (IlvPos x) |
Sets the x coordinate value of the object. | |
IlvPos | x () const |
Gets the x coordinate value of the object. | |
void | y (IlvPos y) |
Sets the y coordinate value of the object. | |
IlvPos | y () const |
Gets the y coordinate value of the object. | |
virtual IlBoolean | zoomable () const |
Checks whether this object is zoomable. | |
Static Public Member Functions | |
static void | AddProperty (const IlSymbol *key, IlAny value) |
Adds a property to this object's class. | |
static void | AddToCallbackTypeList (IlUInt &count, const char *const **names, const IlSymbol *const **types, const char *newName, const IlSymbol *newType) |
Adds a callback to a list. | |
static void | AllowZoom (IlBoolean az) |
Sets or inhibits zooming. | |
static IlvClassInfo * | ClassInfo () const |
Gets class information. | |
static IlAny | GetProperty (const IlSymbol *key, IlBoolean checkSuperClass=((IlBoolean) 0)) |
Retrieves the property value associated with the key in this object's class. | |
static const IlvClassInfo * | HasProperty (const IlSymbol *key, IlBoolean checkSuperClass=((IlBoolean) 0)) |
Checks for the existence of a property for this object's class hierarchy. | |
static IlBoolean | IsZoomAllowed () |
Checks whether zoomable objects can display themselves when zooming out. | |
static IlvGraphic * | read (IlvInputFile &file, IlvPalette *palette) |
Reads an object description from a file. | |
static IlBoolean | RemoveProperty (const IlSymbol *key) |
Removes a property from this object's class. | |
static IlBoolean | ReplaceProperty (const IlSymbol *key, IlAny value) |
Replaces a property in this object's class. |
Graphic class.
Library: views
IlvGraphic
is an abstract base class that:
IlvPalette
instance associated with the graphic object. Rogue Wave Views graphic objects inherit attributes from this class. A graphic object is capable of drawing itself at a given destination port, with the possibility of transforming the object's coordinates according to an associated object of the IlvTransformer
class. The shapes of graphic objects are defined by the user and made concrete by various drawing member functions. Other member functions provide information about the graphic objects, and carry out geometric tests concerning the shapes being used. For example, you can check whether or not a point with given coordinates lies inside a certain shape.
This class has member functions that set and change geometric dimensions. Some member functions set and get user properties that can be associated with an object for application-specific purposes. IlvGraphic
does not implement these member functions. They are declared as virtual member functions, and defined to do operations in the classes that inherit IlvGraphic
attributes. Although the member functions for manipulating geometric shapes and graphic attributes are present, they do nothing. A fundamental inherited class is IlvSimpleGraphic
. It implements all functionalities of the IlvGraphic
class, and adds to each instance an IlvPalette
resource used to draw the object. It also implements real geometric-management member functions. IlvGraphic
has groups of member functions that deal with the following items:
IlvGraphic
is an abstract class with no constructor. However, all derived graphic classes have two constructors that make it easier to create subclasses. Use the macro DeclareIOConstructors(className)
to declare these constructors in the class definition.
IlvInputFile
, IlvOutputFile
, IlvRegisterClass
, IlvNamedProperty
. void IlvGraphic::addCallback | ( | const IlSymbol * | callbackType, | |
IlvGraphicCallback | callback, | |||
IlAny | data | |||
) |
Adds a callback function to a callback list.
Adds the callback name callbackName to the callback list of type callbackType. The callback function, when called, receives the user parameter data. setCallback(const IlSymbol* callbackType, IlvGraphicCallback callbackName, IlAny data)
allows you to remove all previously set callbacks.
callbackType | The callback type. | |
callbackName | The name of the callback. | |
data | A user parameter passed to the callback. |
void IlvGraphic::addCallback | ( | const IlSymbol * | callbackType, | |
const IlSymbol * | callbackName, | |||
const IlSymbol * | script = 0 | |||
) |
Adds a callback function to a callback list.
Adds the callback name callbackName to the callback list of type callbackType. setCallback(const IlSymbol* callbackType, const IlSymbol* callbackName)
allows you to remove all previously set callbacks.
callbackType | The callback type. | |
callbackName | The name of the callback. | |
script | The name of the script language that has a context where callbackName is defined. If set to 0 , the callback name must be register in the graphic holder. |
IlvScriptLanguage
, IlvGraphicHoder::registerCallback
. void IlvGraphic::addCallback | ( | const IlSymbol * | callbackType, | |
IlvGraphicCallback | callback | |||
) |
Adds a callback function to a callback list.
Adds the callback function callback to the callback list of type callbackType. setCallback(const IlSymbol* callbackType, IlvGraphicCallback callback)
allows you to remove all previously set callbacks.
callbackType | The callback type. | |
callback | The callback function. |
Adds a property to this object's class.
Adds a specific property to this object class. The function associates the given value with the given key for this object only.
key | The key to be associated. | |
value | The value to be associated. |
Adds a property to this object's class.
This static function associates the given value with the given key for the class of this object only.
key | The key to be associated. | |
value | The value to be associated. |
Reimplemented in IlvSimpleGraphic, IlvContainerRectangle, IlvArc, IlvFilledArc, IlvCalendarScale, IlvCircularGauge, IlvFilledCircularGauge, IlvCircularScale, IlvEllipse, IlvFilledEllipse, IlvFilteredGraphic, IlvGauge, IlvRectangularGauge, IlvSliderGauge, IlvReliefGauge, IlvGridRectangle, IlvGraphicHandle, IlvTransformedGraphic, IlvFixedSizeGraphic, IlvGraphicInstance, IlvIcon, IlvTransparentIcon, IlvLabel, IlvFilledLabel, IlvListLabel, IlvLine, IlvArrowLine, IlvMarker, IlvZoomableMarker, IlvOutlinePolygon, IlvGraphicPath, IlvPolyline, IlvPolygon, IlvArrowPolyline, IlvPolyPoints, IlvPolyPointsSelection, IlvSplineSelection, IlvPolySelection, IlvRectangle, IlvFilledRectangle, IlvViewRectangle, IlvReliefLabel, IlvReliefLine, IlvReliefRectangle, IlvReliefDiamond, IlvRoundRectangle, IlvFilledRoundRectangle, IlvScale, IlvRectangularScale, IlvDrawSelection, IlvReshapeSelection, IlvSelector, IlvGraphicSet, IlvShadowLabel, IlvShadowRectangle, IlvSpline, IlvClosedSpline, IlvFilledSpline, IlvTimeScale, IlvZoomableIcon, IlvZoomableTransparentIcon, IlvZoomableLabel, and IlvGraphicCOMAdapter.
Adds a specific property to the object.
Adds a specific property to the object. This function associates the given value with the given key for this object only.
key | The key to be associated. | |
value | The value to be associated. |
void IlvGraphic::addTag | ( | const IlSymbol * | tag | ) |
Adds a tag.
Adds the tag tag to this object.
tag | The tag to be added. |
static void IlvGraphic::AddToCallbackTypeList | ( | IlUInt & | count, | |
const char *const ** | names, | |||
const IlSymbol *const ** | types, | |||
const char * | newName, | |||
const IlSymbol * | newType | |||
) | [static] |
Adds a callback to a list.
This static member function adds to the arrays names and types the new callback definition provided in newName and newSymbol. The following code is typical:
IlUInt MyClass::getCallbackTypes(const char* const** names, const IlSymbol* const** types) const { IlUInt count = ParentClass::getCallbackTypes(names, types); AddToCallbackTypeList(count, names, types, "Callback Description", CallbackSymbol); return count; }
count | The number of callbacks in names. | |
names | An array containing the names of the callbacks. | |
types | An array containing the types of the callbacks. | |
newName | The name of the new callback to be added. | |
newType | The type of the new callback to be added. |
static void IlvGraphic::AllowZoom | ( | IlBoolean | az | ) | [static] |
Sets or inhibits zooming.
A static member function that lets you allow or inhibit zooming behavior.
az | IlTrue if zooming is allowed, or IlFalse otherwise. |
virtual void IlvGraphic::apply | ( | IlvApplyObject | function, | |
IlAny | arg | |||
) | [virtual] |
Applies a function to objects that compose another object.
Implements a technique for applying a function to objects that compose another object. This member function is useful only when the object is a composite one like an instance of IlvGraphicSet
or IlvGraphicHandle
. The IlvApplyObject
function successively receives each of the components as well as the arg parameter.
function | The function to be applied. | |
arg | An argument parameter. |
Reimplemented in IlvGraphicHandle, IlvPolySelection, IlvDrawSelection, and IlvGraphicSet.
IlBoolean IlvGraphic::applyAttribute | ( | const char * | attributeClassName, | |
const char * | value, | |||
IlAny | checkData = 0 | |||
) | const |
Applies attributes.
Calls the member function setValue
(of the corresponding data type) of each of the attributes connected to this object that have the class name attributeClassName and whose check function, receiving the parameter checkData
, returns IlTrue
.
attributeClassName | The name of the class containing the object. | |
value | The attribute value | |
checkData | A user parameter, or 0 if none. |
IlBoolean IlvGraphic::applyAttribute | ( | const char * | attributeClassName, | |
IlFloat | value, | |||
IlAny | checkData = 0 | |||
) | const |
Applies attributes.
Calls the member function setValue
(of the corresponding data type) of each of the attributes connected to this object that have the class name attributeClassName and whose check function, receiving the parameter checkData
, returns IlTrue
.
attributeClassName | The name of the class containing the object. | |
value | The attribute value | |
checkData | A user parameter, or 0 if none. |
IlBoolean IlvGraphic::applyAttribute | ( | const char * | attributeClassName, | |
IlInt | value, | |||
IlAny | checkData = 0 | |||
) | const |
Applies attributes.
Calls the member function setValue
(of the corresponding data type) of each of the attributes connected to this object that have the class name attributeClassName and whose check function, receiving the parameter checkData
, returns IlTrue
.
attributeClassName | The name of the class containing the object. | |
value | The attribute value | |
checkData | A user parameter, or 0 if none. |
virtual void IlvGraphic::applyReferences | ( | IlvApplyObject | function, | |
IlAny | arg | |||
) | [virtual] |
Applies a function to objects that are referenced by another object.
Implements a technique for applying a function to objects that are referenced by another object.
function | The function to be applied. | |
arg | An argument parameter. |
Reimplemented in IlvGraphicHandle, IlvDrawSelection, and IlvGraphicSet.
virtual void IlvGraphic::applyResources | ( | const char * | storageName, | |
const char * | storageClassName, | |||
const char * | objectName, | |||
const char * | objectClassName, | |||
IlvDisplay * | display = 0 | |||
) | [virtual] |
Applies resources on a graphic object.
Searches for resources that match storageName.objectName.resource
, or storageName.objectClassName.resource
, or storageClassName.objectName.resource
, or storageClassName.objectClassName.resource
, in this order, and applies these resources to the object.
The resources taken into account by the class IlvGraphic
are only geometric:
x
y
h
or height
w
or width
The class IlvSimpleGraphic
also applies the following graphic resources, if and only if the object has the default display palette:
foreground
background
font
pattern
colorPattern
lineStyle
lineWidth
fillStyle
arcMode
fillRule
storageName | The storage name. | |
storageClassName | The generic name of the storage instance. | |
objectName | The object name. | |
objectClassName | The generic name of the object class. | |
display | The display where this object is created. |
Reimplemented in IlvSimpleGraphic.
virtual void IlvGraphic::applyTransform | ( | const IlvTransformer * | t | ) | [pure virtual] |
Applies a transformation function to the graphic object.
Applies the transformer t
to the shape of the object. Unless the transformation is a scaling operation, the result of applying it to certain objects can be insignificant. For example, applying a non-scaling transformer to an IlvRectangle
object is meaningless, since the rectangle remains a rectangle. On the other hand, meaningful transformations can be applied to objects that are instances of types such as IlvLine
or IlvPolyPoints
.
applyTransform
is one of the most important method to be rewritten for classes derived from IlvGraphic
, since it is called by the resize
, move
, moveResize
, scale
, etc., methods.t | The transformer value. If 0, no transformation is performed. |
Implemented in IlvGadget, IlvArc, IlvCircularScale, IlvEllipse, IlvFilteredGraphic, IlvGauge, IlvGraphicHandle, IlvTransformedGraphic, IlvFixedSizeGraphic, IlvIcon, IlvLabel, IlvListLabel, IlvLine, IlvMarker, IlvGraphicPath, IlvPolyPoints, IlvPolySelection, IlvRectangle, IlvViewRectangle, IlvScale, IlvRectangularScale, IlvDrawSelection, IlvGraphicSet, IlvTimeScale, IlvZoomableIcon, IlvZoomableLabel, and IlvGraphicCOMAdapter.
Apply an accessor.
This member function is called by changeValue
(s) functions and must not be called directly.
Moreover, no drawing operations are carried out here (and should not be). The drawing operations are called by the changeValue
(s) member functions, after having processed the call to applyValue
. If you add your own new IlvValue
, do not forget to override applyValue
as well as changeValue
and queryValue
, since applyValue
is called by changeValue
.
val | The new value of the accessor. |
Reimplemented in IlvGraphicHandle, IlvGraphicInstance, and IlvGraphicCOMAdapter.
virtual void IlvGraphic::boundingBox | ( | IlvRect & | bbox, | |
const IlvTransformer * | t = 0 | |||
) | const [pure 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
.
bbox | The bounding box to be set. | |
t | A transformer value or 0 if there is no transformation. |
Implemented in IlvGadget, IlvArc, IlvFilledArc, IlvCircularGauge, IlvCircularScale, IlvEllipse, IlvFilteredGraphic, IlvGauge, IlvRectangularGauge, IlvGraphicHandle, IlvTransformedGraphic, IlvFixedSizeGraphic, IlvIcon, IlvLabel, IlvListLabel, IlvLine, IlvArrowLine, IlvMarker, IlvZoomableMarker, IlvGraphicPath, IlvArrowPolyline, IlvPolyPoints, IlvPolyPointsSelection, IlvPolySelection, IlvRectangle, IlvReliefLine, IlvScale, IlvRectangularScale, IlvDrawSelection, IlvReshapeSelection, IlvGraphicSet, IlvTimeScale, IlvZoomableIcon, IlvZoomableLabel, and IlvGraphicCOMAdapter.
virtual void IlvGraphic::callCallbacks | ( | const IlSymbol * | callbackType | ) | [virtual] |
Calls every callback of a given type.
Calls every callback in the callback list of type callbackType.
Changes several accessor values simultaneously.
Changes several values of an object simultaneously. The changeValues
method can be used in the following way:
IlvValue args[2] = { IlvValue("label", "hello"), IlvValue("x", 100) }; graphic->changeValues(args, 2);
values | The array of new values. | |
count | The number of values in values. |
static IlvClassInfo* IlvGraphic::ClassInfo | ( | ) | const [static] |
Gets class information.
Returns a pointer to the IlvClassInfo
object associated with this object's class.
const char* IlvGraphic::className | ( | ) | const |
Returns the class name of an object.
This method is equivalent to getClassInfo()->getClassName()
.
IlvRectangle
object, the className function returns "IlvRectangle"
. Reimplemented in IlvSimpleGraphic, IlvContainerRectangle, IlvArc, IlvFilledArc, IlvCalendarScale, IlvCircularGauge, IlvFilledCircularGauge, IlvCircularScale, IlvEllipse, IlvFilledEllipse, IlvFilteredGraphic, IlvGauge, IlvRectangularGauge, IlvSliderGauge, IlvReliefGauge, IlvGridRectangle, IlvGraphicHandle, IlvTransformedGraphic, IlvFixedSizeGraphic, IlvGraphicInstance, IlvIcon, IlvTransparentIcon, IlvLabel, IlvFilledLabel, IlvListLabel, IlvLine, IlvArrowLine, IlvMarker, IlvZoomableMarker, IlvOutlinePolygon, IlvGraphicPath, IlvPolyline, IlvPolygon, IlvArrowPolyline, IlvPolyPoints, IlvPolyPointsSelection, IlvSplineSelection, IlvPolySelection, IlvRectangle, IlvFilledRectangle, IlvViewRectangle, IlvReliefLabel, IlvReliefLine, IlvReliefRectangle, IlvReliefDiamond, IlvRoundRectangle, IlvFilledRoundRectangle, IlvScale, IlvRectangularScale, IlvDrawSelection, IlvReshapeSelection, IlvSelector, IlvGraphicSet, IlvShadowLabel, IlvShadowRectangle, IlvSpline, IlvClosedSpline, IlvFilledSpline, IlvTimeScale, IlvZoomableIcon, IlvZoomableTransparentIcon, IlvZoomableLabel, and IlvGraphicCOMAdapter.
virtual void IlvGraphic::computeFocusRegion | ( | IlvRegion & | r, | |
const IlvTransformer * | t = 0 | |||
) | const [virtual] |
Computes the region needed for the drawing of the focus.
This method is called to compute the region needed for the drawing of the focus (see the method drawFocus
).
r | The region that is updated. | |
t | The transformer value. If 0 , no transformation is performed. |
Reimplemented in IlvGraphicHandle, IlvTransformedGraphic, IlvFixedSizeGraphic, and IlvSelector.
Checks whether a point is in the object.
Behaves similarly to the virtual member function contains
: when the point p is only available in the object's coordinate system, it calls the first member function contains
.
p | The point to be tested. |
IlTrue
when the point p lies inside the outline of the object. virtual IlBoolean IlvGraphic::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.
p | The point to be tested. | |
tp | The transformed point obtained by applying the transformer t to the point p. | |
t | A transformer value, or 0 if there is no transformation. |
IlTrue
when the point p lies inside the outline of the object. Reimplemented in IlvGadget, IlvArc, IlvFilledArc, IlvCircularGauge, IlvCircularScale, IlvEllipse, IlvFilledEllipse, IlvFilteredGraphic, IlvGraphicHandle, IlvTransformedGraphic, IlvFixedSizeGraphic, IlvIcon, IlvLabel, IlvListLabel, IlvLine, IlvMarker, IlvZoomableMarker, IlvGraphicPath, IlvPolyline, IlvPolygon, IlvPolySelection, IlvRectangle, IlvFilledRectangle, IlvReliefLine, IlvDrawSelection, IlvGraphicSet, IlvSpline, IlvClosedSpline, IlvFilledSpline, IlvZoomableIcon, IlvZoomableLabel, and IlvGraphicCOMAdapter.
virtual IlvGraphic* IlvGraphic::copy | ( | ) | const [pure virtual] |
Copies this object.
Allocates and returns a copy of this object. If the object is composite, the implementation of this member function makes a copy of the object's components.
IlvPredefinedIOMembers
. Implemented in IlvContainerRectangle, IlvArc, IlvFilledArc, IlvCalendarScale, IlvCircularGauge, IlvFilledCircularGauge, IlvCircularScale, IlvEllipse, IlvFilledEllipse, IlvFilteredGraphic, IlvGauge, IlvRectangularGauge, IlvSliderGauge, IlvReliefGauge, IlvGridRectangle, IlvGraphicHandle, IlvTransformedGraphic, IlvFixedSizeGraphic, IlvGraphicInstance, IlvIcon, IlvTransparentIcon, IlvLabel, IlvFilledLabel, IlvListLabel, IlvLine, IlvArrowLine, IlvMarker, IlvZoomableMarker, IlvOutlinePolygon, IlvGraphicPath, IlvPolyline, IlvPolygon, IlvArrowPolyline, IlvPolyPoints, IlvPolyPointsSelection, IlvSplineSelection, IlvPolySelection, IlvRectangle, IlvFilledRectangle, IlvViewRectangle, IlvReliefLabel, IlvReliefLine, IlvReliefRectangle, IlvReliefDiamond, IlvRoundRectangle, IlvFilledRoundRectangle, IlvScale, IlvRectangularScale, IlvReshapeSelection, IlvSelector, IlvGraphicSet, IlvShadowLabel, IlvShadowRectangle, IlvSpline, IlvClosedSpline, IlvFilledSpline, IlvTimeScale, IlvZoomableIcon, IlvZoomableTransparentIcon, IlvZoomableLabel, and IlvGraphicCOMAdapter.
void IlvGraphic::draw | ( | IlvPort * | dst, | |
const IlvTransformer * | t, | |||
const IlvRect * | clip | |||
) | const |
Draws a graphic object.
Is similar to the first draw
function and can be used when the clipping region is just a rectangle. It actually calls the first draw
member function, internally using a new IlvRegion
object that corresponds to the clipping rectangle provided in clip
.
dst | The destination port. | |
t | The transformer value. | |
clip | The clipping region, which is a rectangle. |
virtual void IlvGraphic::draw | ( | IlvPort * | dst, | |
const IlvTransformer * | t = 0 , |
|||
const IlvRegion * | clip = 0 | |||
) | const [pure 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.
dst | The destination port. | |
t | The transformer value. If 0, no transformation is performed. | |
clip | The clipping region, or 0 if none. |
Implemented in IlvGadget, IlvArc, IlvFilledArc, IlvCircularScale, IlvEllipse, IlvFilledEllipse, IlvFilteredGraphic, IlvGauge, IlvRectangularGauge, IlvGridRectangle, IlvGraphicHandle, IlvTransformedGraphic, IlvFixedSizeGraphic, IlvGraphicInstance, IlvIcon, IlvLabel, IlvFilledLabel, IlvListLabel, IlvLine, IlvArrowLine, IlvMarker, IlvZoomableMarker, IlvOutlinePolygon, IlvGraphicPath, IlvPolyline, IlvPolygon, IlvArrowPolyline, IlvPolyPoints, IlvPolyPointsSelection, IlvSplineSelection, IlvPolySelection, IlvRectangle, IlvFilledRectangle, IlvViewRectangle, IlvReliefLabel, IlvReliefLine, IlvReliefRectangle, IlvReliefDiamond, IlvRoundRectangle, IlvFilledRoundRectangle, IlvScale, IlvRectangularScale, IlvDrawSelection, IlvReshapeSelection, IlvGraphicSet, IlvShadowLabel, IlvShadowRectangle, IlvSpline, IlvClosedSpline, IlvFilledSpline, IlvTimeScale, IlvZoomableIcon, IlvZoomableLabel, and IlvGraphicCOMAdapter.
virtual void IlvGraphic::drawFocus | ( | IlvPort * | dst, | |
const IlvPalette * | palette, | |||
const IlvTransformer * | t = 0 , |
|||
const IlvRegion * | clip = 0 | |||
) | const [virtual] |
Draws additional drawings for an object that has the keyboard focus.
This method is called to draw additional drawings when the graphic object has the keyboard focus. The default implementation draws a rectangle around the object. The drawing will be done inside the region returned by computeFocusRegion
.
dst | The destination port. | |
palette | The palette of the object. | |
t | The transformer value. If 0 , no transformation is performed. | |
clip | The clipping region. |
Reimplemented in IlvGauge, IlvGraphicHandle, IlvTransformedGraphic, IlvFixedSizeGraphic, and IlvSelector.
virtual void IlvGraphic::getAccessors | ( | const IlSymbol *const ** | accessors, | |
const IlvValueTypeClass *const ** | types, | |||
IlUInt & | count | |||
) | const [virtual] |
Retrieves the list of available accessors of an object.
Retrieves the list of accessors of an object. accessors is the resulting array of symbols. Each symbol is the name of an accessor. types is the array of the types of accessors, count is the number of accessors. The existing types for accessors are the following:
IlvValueIntType
IlvValueUIntType
IlvValueStringType
IlvValueBooleanType
IlvValueColorType
IlvValueFontType
IlvValuePatternType
IlvValueColorPatternType
IlvValueGradientPatternType
IlvValueLineStyleType
IlvValueFillStyleType
IlvValueFillRuleType
IlvValueArcModeType
IlvValueDirectionType
IlvValueBitmapType
IlvValueFloatType
IlvValueDoubleType
IlvValueStringArrayType
IlvValueUIntArrayType
IlvValueMenuItemArrayType
IlvValueMatrixItemArrayType
IlvValueNotebookPageArrayType
The possible accessors for an object are described in the corresponding class.
Reimplemented in IlvGraphicHandle, and IlvGraphicCOMAdapter.
virtual IlvIntensity IlvGraphic::getAlpha | ( | ) | const [virtual] |
Retrieves the alpha component.
Reimplemented in IlvGadget, IlvSimpleGraphic, IlvGraphicHandle, and IlvGraphicSet.
virtual IlvAntialiasingMode IlvGraphic::getAntialiasingMode | ( | ) | const [virtual] |
Retrieves the anti-aliasing mode.
Reimplemented in IlvGadget, IlvSimpleGraphic, IlvGraphicHandle, and IlvGraphicInstance.
IlvGraphicCallback IlvGraphic::getCallback | ( | ) | const |
Gets the main callback function.
When an object is designated by the user to perform an action, the user may need to call a specific function that the user has defined. These functions are called callbacks, and are usually called by the interactors that are connected to the object. Two callbacks can be set on a graphic object so that the interactors can trigger two different actions. These actions are known as the main callback and the secondary callback.
IlvGraphicCallback IlvGraphic::getCallback | ( | const IlSymbol * | callbackType | ) | const |
Gets a callback.
callbackType | The callback type. |
IlAny IlvGraphic::getCallbackData | ( | const IlSymbol * | callbackType, | |
const IlSymbol * | callbackName | |||
) | const |
Gets a callback user data.
callbackType | The callback type. | |
callbackName | The name of the callback. |
0
if the callback cannot be found. IlAny IlvGraphic::getCallbackData | ( | const IlSymbol * | callbackType, | |
IlvGraphicCallback | callback | |||
) | const |
Gets a callback user data.
callbackType | The callback type. | |
callback | The callback function. |
0
if the callback cannot be found. IlSymbol* IlvGraphic::getCallbackName | ( | ) | const |
Gets the symbol that identifies the main callback.
Gets the name of a callback.
callbackType | The callback type. |
virtual IlUInt IlvGraphic::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.
names | An array of strings. | |
types | An array of symbols. |
Reimplemented in IlvGadget.
virtual IlvGraphic* IlvGraphic::getChildAt | ( | IlUInt | index | ) | const [virtual] |
Returns the sub-object of the graphic object specified by index.
index | The index of the object being searched. |
0
is returned. Reimplemented in IlvGraphicSet.
virtual IlvGraphic* IlvGraphic::getChildByName | ( | const char * | name | ) | const [virtual] |
Returns the sub-object of the graphic object specified by name.
name | The name of the object being searched. |
0
is returned. Reimplemented in IlvGraphicSet.
virtual IlUInt IlvGraphic::getChildCount | ( | ) | const [virtual] |
Returns the number of children of this graphic object.
Reimplemented in IlvGraphicSet.
virtual IlInt IlvGraphic::getChildIndex | ( | const IlvGraphic * | object | ) | const [virtual] |
Returns the index of the specified sub-object in this graphic object.
object | The sub-object whose index is being searched for. |
-1
if object is not a sub-object of this graphic object. Reimplemented in IlvGraphicSet.
virtual IlvGraphic* const* IlvGraphic::getChildren | ( | IlUInt & | count | ) | const [virtual] |
Returns an array containing the sub-objects of this graphic object.
count | The size of the returned array. |
IlPoolOf(Pointer)
and should not be deleted or modified. virtual IlvClassInfo* IlvGraphic::getClassInfo | ( | ) | const [virtual] |
Gets class information.
Returns a pointer to the IlvClassInfo
object associated with this object's class.
Reimplemented in IlvSimpleGraphic, IlvContainerRectangle, IlvArc, IlvFilledArc, IlvCalendarScale, IlvCircularGauge, IlvFilledCircularGauge, IlvCircularScale, IlvEllipse, IlvFilledEllipse, IlvFilteredGraphic, IlvGauge, IlvRectangularGauge, IlvSliderGauge, IlvReliefGauge, IlvGridRectangle, IlvGraphicHandle, IlvTransformedGraphic, IlvFixedSizeGraphic, IlvGraphicInstance, IlvIcon, IlvTransparentIcon, IlvLabel, IlvFilledLabel, IlvListLabel, IlvLine, IlvArrowLine, IlvMarker, IlvZoomableMarker, IlvOutlinePolygon, IlvGraphicPath, IlvPolyline, IlvPolygon, IlvArrowPolyline, IlvPolyPoints, IlvPolyPointsSelection, IlvSplineSelection, IlvPolySelection, IlvRectangle, IlvFilledRectangle, IlvViewRectangle, IlvReliefLabel, IlvReliefLine, IlvReliefRectangle, IlvReliefDiamond, IlvRoundRectangle, IlvFilledRoundRectangle, IlvScale, IlvRectangularScale, IlvDrawSelection, IlvReshapeSelection, IlvSelector, IlvGraphicSet, IlvShadowLabel, IlvShadowRectangle, IlvSpline, IlvClosedSpline, IlvFilledSpline, IlvTimeScale, IlvZoomableIcon, IlvZoomableTransparentIcon, IlvZoomableLabel, and IlvGraphicCOMAdapter.
IlAny IlvGraphic::getClassProperty | ( | const IlSymbol * | key, | |
IlBoolean | checkParent = ((IlBoolean) 0) | |||
) | const |
Retrieves the indicated property value in the class of this object.
Retrieves the property value associated with the property name key from the class of this object. If the parameter checkParent is set to IlTrue
, then the parent classes will also be requested to retrieve this property value.
key | The key with which the property value is associated. | |
checkParent | IlTrue specifies iterative search on parent classes. |
0
is returned when no property name matches the key parameter. IlAny IlvGraphic::getClientData | ( | ) | const |
Gets client data.
Returns the object's client data. When an action is performed by an interactor connected to a graphic object, you often need additional information that is client-dependent.
virtual const char* IlvGraphic::getDefaultInteractor | ( | ) | const [virtual] |
Gets the name of the default interactor for this object.
Reimplemented in IlvGauge, and IlvGraphicCOMAdapter.
virtual IlvGraphicHolder* IlvGraphic::getHolder | ( | ) | const [virtual] |
Gets a pointer to an object's holder.
IlvGraphicHolder
object in which the graphic is located. Reimplemented in IlvGraphicHandle.
IlvInteractor* IlvGraphic::getInteractor | ( | ) | const |
Returns the interactor associated with the current object.
virtual IlUShort IlvGraphic::getLineWidth | ( | ) | const [virtual] |
Retrieves the line width.
Reimplemented in IlvSimpleGraphic, IlvGraphicHandle, IlvGraphicInstance, and IlvGraphicSet.
virtual IlvLookFeelHandler* IlvGraphic::getLookFeelHandler | ( | ) | const [virtual] |
Returns the look & feel handler used by this object.
The default implementation returns 0
.
Reimplemented in IlvGadget, IlvSimpleGraphic, and IlvGraphicHandle.
const char* IlvGraphic::getName | ( | ) | const |
Gets the name of the object.
Retrieves the name of the object. The returned string may be 0
if the object has no name. This string must not be modified nor deleted. If this object is stored in a SmartSet, the name is made up of the concatenation of the SmartSet name, the SmartSet name separator, and the intrinsic object name itself.
IlvNamedProperty* IlvGraphic::getNamedProperty | ( | const IlSymbol * | name | ) | const |
Gets a named property.
name | The name of the property. |
0
if no named property matches the name IlSymbol* IlvGraphic::getNextFocusGraphic | ( | ) | const |
Gets the next object in the focus chain.
IlSymbol* IlvGraphic::getPreviousFocusGraphic | ( | ) | const |
Gets the previous object in the focus chain.
static IlAny IlvGraphic::GetProperty | ( | const IlSymbol * | key, | |
IlBoolean | checkSuperClass = ((IlBoolean) 0) | |||
) | [static] |
Retrieves the property value associated with the key in this object's class.
Retrieves the property value associated with the property name key. If the property cannot be found in the class of this object, and if checkSuperClass is set to IlTrue
, then the function operates iteratively on each superclass until the property is found. If the property cannot be found, then 0
is returned.
key | The key with which the property value is associated. | |
checkSuperClass | IlTrue specifies iterative search on superclasses. |
0
. Reimplemented in IlvSimpleGraphic, IlvContainerRectangle, IlvArc, IlvFilledArc, IlvCalendarScale, IlvCircularGauge, IlvFilledCircularGauge, IlvCircularScale, IlvEllipse, IlvFilledEllipse, IlvFilteredGraphic, IlvGauge, IlvRectangularGauge, IlvSliderGauge, IlvReliefGauge, IlvGridRectangle, IlvGraphicHandle, IlvTransformedGraphic, IlvFixedSizeGraphic, IlvGraphicInstance, IlvIcon, IlvTransparentIcon, IlvLabel, IlvFilledLabel, IlvListLabel, IlvLine, IlvArrowLine, IlvMarker, IlvZoomableMarker, IlvOutlinePolygon, IlvGraphicPath, IlvPolyline, IlvPolygon, IlvArrowPolyline, IlvPolyPoints, IlvPolyPointsSelection, IlvSplineSelection, IlvPolySelection, IlvRectangle, IlvFilledRectangle, IlvViewRectangle, IlvReliefLabel, IlvReliefLine, IlvReliefRectangle, IlvReliefDiamond, IlvRoundRectangle, IlvFilledRoundRectangle, IlvScale, IlvRectangularScale, IlvDrawSelection, IlvReshapeSelection, IlvSelector, IlvGraphicSet, IlvShadowLabel, IlvShadowRectangle, IlvSpline, IlvClosedSpline, IlvFilledSpline, IlvTimeScale, IlvZoomableIcon, IlvZoomableTransparentIcon, IlvZoomableLabel, and IlvGraphicCOMAdapter.
Gets a property.
key | The key whose value is to be returned. |
0
is returned when no property name matches the key parameter. IlvSmartSet* IlvGraphic::getSmartSet | ( | ) | const |
Gets the smart set object containing a specified graphic object.
IlvSmartSet
object in which the graphic object is contained. void IlvGraphic::h | ( | IlvDim | h | ) |
Sets the height value of the object.
This member function calls boundingBox
and resize
to set the h
(height) value.
h | The height value. |
IlvDim IlvGraphic::h | ( | ) | const |
Gets the height value of the object.
This member function calls boundingBox
and retrieves the h
(height) value.
IlBoolean IlvGraphic::hasCallback | ( | const IlSymbol * | callbackType, | |
const IlSymbol * | callbackName | |||
) | const |
Checks whether a callback function is in a callback list.
callbackType | The callback type. | |
callbackName | The name of the callback. |
IlTrue
if the callback name callbackName is stored in the callback list of type callbackType, or IlFalse
if it is not. IlBoolean IlvGraphic::hasCallback | ( | const IlSymbol * | callbackType, | |
IlvGraphicCallback | callback | |||
) | const |
Checks whether a callback function is in a callback list.
callbackType | The callback type. | |
callback | The callback function. |
IlTrue
if the callback function callback is stored in the callback list of type callbackType, or IlFalse
if not. IlBoolean IlvGraphic::hasCallbackData | ( | const IlSymbol * | callbackType, | |
const IlSymbol * | callbackName | |||
) | const |
Checks whether a callback function has user data.
callbackType | The callback type. | |
callbackName | The name of the callback. |
IlTrue
if the callback name callbackName, stored in the callback list of type callbackType, has associated user data. IlBoolean IlvGraphic::hasCallbackData | ( | const IlSymbol * | callbackType, | |
IlvGraphicCallback | callback | |||
) | const |
Checks whether a callback function has user data.
callbackType | The callback type. | |
callback | The callback function. |
IlTrue
if the callback function callback, stored in the callback list of type callbackType, has associated user data. const IlvClassInfo* IlvGraphic::hasClassProperty | ( | const IlSymbol * | key, | |
IlBoolean | s = ((IlBoolean) 0) | |||
) | const |
Checks for a class where the keyed property exists.
Retrieves a pointer to the ClassInfo that indicates a class where the key property exists. If the returned value is non-0
, then this property actually exists for this object's class. If this is not the case, and if s is set to IlTrue
, then the function operates iteratively on each superclass of this object until a match is found. If the property cannot be found, then 0
is returned.
key | The key with which the property value is associated. | |
s | IlTrue specifies iterative search on superclasses. |
0
. static const IlvClassInfo* IlvGraphic::HasProperty | ( | const IlSymbol * | key, | |
IlBoolean | checkSuperClass = ((IlBoolean) 0) | |||
) | [static] |
Checks for the existence of a property for this object's class hierarchy.
Retrieves a pointer to the IlvClassInfo
that indicates a class where the key property exists. If the returned value is non-0
, then this property actually exists for this class. If this is not the case and if checkSuperClass is set to IlTrue
, then the function operates iteratively on each superclass until a match is found. If the property cannot be found, then 0
is returned.
key | The key with which the property value is associated. | |
checkSuperClass | IlTrue specifies iterative search on superclasses. |
0
. Reimplemented in IlvSimpleGraphic, IlvContainerRectangle, IlvArc, IlvFilledArc, IlvCalendarScale, IlvCircularGauge, IlvFilledCircularGauge, IlvCircularScale, IlvEllipse, IlvFilledEllipse, IlvFilteredGraphic, IlvGauge, IlvRectangularGauge, IlvSliderGauge, IlvReliefGauge, IlvGridRectangle, IlvGraphicHandle, IlvTransformedGraphic, IlvFixedSizeGraphic, IlvGraphicInstance, IlvIcon, IlvTransparentIcon, IlvLabel, IlvFilledLabel, IlvListLabel, IlvLine, IlvArrowLine, IlvMarker, IlvZoomableMarker, IlvOutlinePolygon, IlvGraphicPath, IlvPolyline, IlvPolygon, IlvArrowPolyline, IlvPolyPoints, IlvPolyPointsSelection, IlvSplineSelection, IlvPolySelection, IlvRectangle, IlvFilledRectangle, IlvViewRectangle, IlvReliefLabel, IlvReliefLine, IlvReliefRectangle, IlvReliefDiamond, IlvRoundRectangle, IlvFilledRoundRectangle, IlvScale, IlvRectangularScale, IlvDrawSelection, IlvReshapeSelection, IlvSelector, IlvGraphicSet, IlvShadowLabel, IlvShadowRectangle, IlvSpline, IlvClosedSpline, IlvFilledSpline, IlvTimeScale, IlvZoomableIcon, IlvZoomableTransparentIcon, IlvZoomableLabel, and IlvGraphicCOMAdapter.
Checks whether the object has a particular property.
key | The key to be tested. |
IlBoolean
value that indicates the existence of the key property for this object. If IlTrue
is returned, then this property is actually set for this object. If this is not the case, then IlFalse
is returned. Checks whether the object has a specific tag.
tag | The tag to be tested. |
IlTrue
if this object has the tag tag. Determines whether a rectangle is inside the bounding box.
Determines whether a rectangle is inside the bounding box. It calls the second member function inside.
r | The rectangle to be tested. |
IlTrue
when the rectangle r lies completely inside the bounding box of the object and IlBoolean IlvGraphic::inside | ( | const IlvRect & | r, | |
const IlvRect & | tr, | |||
const IlvTransformer * | t = 0 | |||
) | const |
Determines whether an object with transformation applied is inside the bounding box.
Behaves similarly for the transformed rectangle tr, obtained by applying the transformer t to the rectangle r. That is, this function checks if the object is located inside the rectangle r, in the object's coordinate system, or inside tr when this object is applied with the possible transformer t. The test is made on the whole bounding box of the object.
r | The rectangle to be tested. | |
tr | The transformed rectangle to be tested. | |
t | A transformer value, or 0 if there is no transformation. |
IlTrue
when the object, drawn with the transformer t, covers completely the region r. This virtual member function returns IlFalse
when this is not the case. That means that it returns IlTrue
if all rectangles that define the region completely lie inside the object. virtual IlBoolean IlvGraphic::inside | ( | const IlvRegion & | r, | |
const IlvTransformer * | t = 0 | |||
) | const [virtual] |
Determines whether an object with transformation applied is inside the bounding box.
Determines whether an object with transformation applied is inside the bounding box.
r | The region to be tested. | |
t | A transformer value, or 0 if there is no transformation. |
IlTrue
when the object, drawn with the transformer t, covers completely the region r. This virtual member function returns IlFalse
when this is not the case. That means that it returns IlTrue
if all rectangles that define the region completely lie inside the object. Reimplemented in IlvFilteredGraphic, IlvGraphicHandle, IlvTransformedGraphic, IlvFixedSizeGraphic, IlvIcon, IlvLabel, IlvListLabel, IlvGraphicSet, IlvZoomableIcon, and IlvZoomableLabel.
Checks whether a rectangle intersects the bounding box.
Checks whether a rectangle intersects the bounding box.
r | The rectangle to be tested. |
IlTrue
when the rectangle r overlaps the bounding box of the object, and IlFalse
when the rectangle r does not overlap the bounding box. IlBoolean IlvGraphic::intersects | ( | const IlvRect & | r, | |
const IlvRect & | tr, | |||
const IlvTransformer * | t = 0 | |||
) | const |
Checks whether a rectangle intersects the bounding box with transformation applied.
Behaves similarly for the transformed rectangle tr obtained by applying the transformer t to the rectangle r. That is, this function checks if the object intersects with the rectangle r, in the object's coordinate system, or with tr when this object is applied the possible transformer t. The tested regions are the given rectangle and the bounding box of the object.
r | The rectangle to be tested. | |
tr | The transformed rectangle to be tested. | |
t | A transformer value, or 0 if there is no transformation. |
IlTrue
when the rectangle r overlaps the bounding box of the object, and IlFalse
when the rectangle r does not overlap the bounding box. virtual IlBoolean IlvGraphic::intersects | ( | const IlvRegion & | r, | |
const IlvTransformer * | t = 0 | |||
) | const [virtual] |
Checks whether a region intersects the bounding box with transformation applied.
Checks whether a region intersects the bounding box with transformation applied.
r | The region to be tested. | |
t | A transformer value, or 0 if there is no transformation. |
IlTrue
when the region r overlaps the transformed object (if t is not 0
) and IlFalse
when this is not the case. Reimplemented in IlvFilteredGraphic, IlvGraphicHandle, IlvTransformedGraphic, IlvFixedSizeGraphic, IlvIcon, IlvLabel, IlvListLabel, IlvGraphicSet, IlvZoomableIcon, and IlvZoomableLabel.
Highlights the object.
Highlights the object. It is implemented as swapping the foreground and background colors of the object, but can have other implementations in derived subclasses. The parameter temp controls the way you toggle between the background and the foreground. If temp is omitted or is IlFalse
, then a new palette is computed by calling the IlvDisplay::getPalette()
method. If temp is IlTrue
, the object palette is inverted, and thus all the objects referencing this palette will be affected.
temp | If IlTrue , highlights the object. |
Reimplemented in IlvGadget, IlvSimpleGraphic, IlvFilteredGraphic, IlvGauge, IlvReliefGauge, IlvGraphicHandle, IlvGraphicInstance, IlvOutlinePolygon, IlvReliefLine, IlvReliefRectangle, and IlvGraphicSet.
IlBoolean IlvGraphic::isFirstFocusGraphic | ( | ) | const |
Checks whether the object is first in the focus chain.
IlTrue
if this object is first in the focus chain. Otherwise, returns IlFalse
. IlBoolean IlvGraphic::isFocusable | ( | ) | const |
Checks whether the object can receive the keyboard focus or not.
IlvGadget
, IlvGraphic::setFocusable
IlBoolean IlvGraphic::isInSmartSet | ( | ) | const |
Checks whether a graphic object belongs to a smart set.
IlTrue
if the graphic object belongs to an IlvSmartSet
. IlBoolean IlvGraphic::isLastFocusGraphic | ( | ) | const |
Checks whether the object is last in the focus chain.
IlTrue
if this object is last in the focus chain. Otherwise, returns IlFalse
. IlBoolean IlvGraphic::isSensitive | ( | ) | const |
Checks whether the object is sensitive.
IlTrue
if the object is sensitive; that is, if the object responds to user events. It returns IlFalse
if the object is not sensitive. IlBoolean IlvGraphic::isSubtypeOf | ( | const IlvClassInfo * | classInfo | ) | const |
Checks whether this object's class is a subclass.
This method is equivalent to getClassInfo()->isSubtypeOf(classInfo)
.
classInfo | The name of a class on which the object's class is tested. |
IlTrue
or IlFalse
, depending on whether or not this object's class is a subclass of the class indicated by classInfo. Reimplemented in IlvSimpleGraphic, IlvContainerRectangle, IlvArc, IlvFilledArc, IlvCalendarScale, IlvCircularGauge, IlvFilledCircularGauge, IlvCircularScale, IlvEllipse, IlvFilledEllipse, IlvFilteredGraphic, IlvGauge, IlvRectangularGauge, IlvSliderGauge, IlvReliefGauge, IlvGridRectangle, IlvGraphicHandle, IlvTransformedGraphic, IlvFixedSizeGraphic, IlvGraphicInstance, IlvIcon, IlvTransparentIcon, IlvLabel, IlvFilledLabel, IlvListLabel, IlvLine, IlvArrowLine, IlvMarker, IlvZoomableMarker, IlvOutlinePolygon, IlvGraphicPath, IlvPolyline, IlvPolygon, IlvArrowPolyline, IlvPolyPoints, IlvPolyPointsSelection, IlvSplineSelection, IlvPolySelection, IlvRectangle, IlvFilledRectangle, IlvViewRectangle, IlvReliefLabel, IlvReliefLine, IlvReliefRectangle, IlvReliefDiamond, IlvRoundRectangle, IlvFilledRoundRectangle, IlvScale, IlvRectangularScale, IlvDrawSelection, IlvReshapeSelection, IlvSelector, IlvGraphicSet, IlvShadowLabel, IlvShadowRectangle, IlvSpline, IlvClosedSpline, IlvFilledSpline, IlvTimeScale, IlvZoomableIcon, IlvZoomableTransparentIcon, IlvZoomableLabel, and IlvGraphicCOMAdapter.
IlBoolean IlvGraphic::isSubtypeOf | ( | const char * | parentClass | ) | const |
Checks whether this object's class is a subclass of a given parent class.
This method is equivalent to getClassInfo()->isSubtypeOf(parentClass)
.
parentClass | A string representing the parent class. |
IlTrue
or IlFalse
, depending on whether or not this object's class inherits parentClass attributes. The parentClass parameter should be a string representing the class name of an IlvGraphic
subclass. A call to this member function for a given class instance returns IlTrue
if given the name of its class. Reimplemented in IlvSimpleGraphic, IlvContainerRectangle, IlvArc, IlvFilledArc, IlvCalendarScale, IlvCircularGauge, IlvFilledCircularGauge, IlvCircularScale, IlvEllipse, IlvFilledEllipse, IlvFilteredGraphic, IlvGauge, IlvRectangularGauge, IlvSliderGauge, IlvReliefGauge, IlvGridRectangle, IlvGraphicHandle, IlvTransformedGraphic, IlvFixedSizeGraphic, IlvGraphicInstance, IlvIcon, IlvTransparentIcon, IlvLabel, IlvFilledLabel, IlvListLabel, IlvLine, IlvArrowLine, IlvMarker, IlvZoomableMarker, IlvOutlinePolygon, IlvGraphicPath, IlvPolyline, IlvPolygon, IlvArrowPolyline, IlvPolyPoints, IlvPolyPointsSelection, IlvSplineSelection, IlvPolySelection, IlvRectangle, IlvFilledRectangle, IlvViewRectangle, IlvReliefLabel, IlvReliefLine, IlvReliefRectangle, IlvReliefDiamond, IlvRoundRectangle, IlvFilledRoundRectangle, IlvScale, IlvRectangularScale, IlvDrawSelection, IlvReshapeSelection, IlvSelector, IlvGraphicSet, IlvShadowLabel, IlvShadowRectangle, IlvSpline, IlvClosedSpline, IlvFilledSpline, IlvTimeScale, IlvZoomableIcon, IlvZoomableTransparentIcon, IlvZoomableLabel, and IlvGraphicCOMAdapter.
static IlBoolean IlvGraphic::IsZoomAllowed | ( | ) | [static] |
Checks whether zoomable objects can display themselves when zooming out.
A static member function that returns a Boolean value indicating whether zoomable objects may or may not display themselves when zooming out. If displayed, they should appear bigger than their original size.
void IlvGraphic::move | ( | const IlvPoint & | p | ) |
Moves the graphic object.
Moves the upper left corner of the bounding box of the object to the position p
.
p | The position of the point to be moved to. |
Moves the graphic object.
Moves the upper left corner of the bounding box of the object to the position (x
, y
). The default implementation calls the member function translate
.
x | The x coordinate position. | |
y | The y coordinate position. |
Reimplemented in IlvTimeScale.
void IlvGraphic::moveResize | ( | const IlvRect & | size | ) |
Moves and resizes a graphic object.
Sets the bounding box of the object to the rectangle parameter values. Its implementation calls the member function applyTransform
.
size | The new size of the bounding box. |
virtual IlBoolean IlvGraphic::needsInputContext | ( | ) | const [virtual] |
Indicates whether the graphic instance can connect to an input method for locale dependent input.
Should be overridden to return IlTrue
in all the subclasses that must handle locale dependent input. The default implementation returns IlFalse
.
setNeedsInputContext
. virtual void IlvGraphic::print | ( | ILVSTDPREF ostream & | out, | |
int | level = 0 | |||
) | const [virtual] |
Prints for debugging purposes.
Use for debugging purposes. Depending on the debugging level given as the level parameter, basic information about this object is printed to out. Basic implementation prints the object class name, and its bounding box. When this object is defined by another object (that is, if it is a referenced object), this subobject is described only if the level parameter is not zero. When this object is defined by a group of objects, these subobjects are defined themselves if the level parameter is not zero. In general, the higher level is, the more information you get about the object.
out | The output stream. | |
level | The debugging level. If 0, subobjects are not described. |
Reimplemented in IlvArc, IlvGraphicHandle, IlvLabel, IlvListLabel, IlvLine, IlvPolyPoints, IlvReliefLabel, IlvGraphicSet, and IlvShadowLabel.
Retrieves the value of an accessor.
Retrieves the value of the accessor val. The queryValue
method can be used in the following way:
IlvValue arg("label"); char* label = (char*)labelObject->queryValue(arg);
See IlvValue
for more information.
Reimplemented in IlvGraphicHandle, IlvGraphicInstance, and IlvGraphicCOMAdapter.
Retrieves multiple accessor values simultaneously.
Retrieves multiple values of an object simultaneously. The queryValues
method can be used in the following way:
static IlvGraphic* IlvGraphic::read | ( | IlvInputFile & | file, | |
IlvPalette * | palette | |||
) | [static] |
Reads an object description from a file.
Reads an object description from the file input, given the palette graphic attributes. It reads the information that was saved by the member function write
to be able to create a new instance of this object. Usually, because of the availability of the constructor that expects an IlvInputFile
, read should be equivalent to:
IlvGraphic* MyClass::read(IlvInputFile& file, IlvPalette* palette) { return new MyClass(file, palette); }
In the following example, the static member function read
of the IlvLabel
class could have the following form:
IlvGraphic* IlvLabel::read(IlvInputFile& file, IlvPalette* pal) { IlvPoint pos; file.getStream() >> pos; // Read the position field return new IlvLabel(pal->getDisplay(), pos, IlvReadString(file.getStream()), pal); }
file | The name of the file to be read from. | |
palette | The name of the palette for the object. |
DeclareTypeInfoRO
, DeclareTypeInfo
, IlvPredefinedIOMembers
. read
method is not capitalized like other static methods so that it is consistent with the write
method. Reimplemented in IlvContainerRectangle, IlvArc, IlvFilledArc, IlvCalendarScale, IlvCircularGauge, IlvFilledCircularGauge, IlvCircularScale, IlvEllipse, IlvFilledEllipse, IlvFilteredGraphic, IlvGauge, IlvRectangularGauge, IlvSliderGauge, IlvReliefGauge, IlvGridRectangle, IlvGraphicHandle, IlvTransformedGraphic, IlvFixedSizeGraphic, IlvGraphicInstance, IlvIcon, IlvTransparentIcon, IlvLabel, IlvFilledLabel, IlvListLabel, IlvLine, IlvArrowLine, IlvMarker, IlvZoomableMarker, IlvOutlinePolygon, IlvGraphicPath, IlvPolyline, IlvPolygon, IlvArrowPolyline, IlvPolyPoints, IlvPolyPointsSelection, IlvSplineSelection, IlvPolySelection, IlvRectangle, IlvFilledRectangle, IlvViewRectangle, IlvReliefLabel, IlvReliefLine, IlvReliefRectangle, IlvReliefDiamond, IlvRoundRectangle, IlvFilledRoundRectangle, IlvScale, IlvRectangularScale, IlvReshapeSelection, IlvSelector, IlvGraphicSet, IlvShadowLabel, IlvShadowRectangle, IlvSpline, IlvClosedSpline, IlvFilledSpline, IlvTimeScale, IlvZoomableIcon, IlvZoomableTransparentIcon, IlvZoomableLabel, and IlvGraphicCOMAdapter.
Removes a callback function from a callback list.
Removes the callback named callbackName from the callback list of type callbackType.
callbackType | The callback type. | |
callbackName | The name of the callback. |
void IlvGraphic::removeCallback | ( | const IlSymbol * | callbackType, | |
IlvGraphicCallback | callback | |||
) |
Removes a callback function from a callback list.
Removes the callback function callback from the callback list of type callbackType.
callbackType | The callback type. | |
callback | The callback function. |
Removes a property from this object's class.
Removes the indicated property from the class of this object.
key | The key property to be removed. |
IlTrue
if the key property was actually found, or IlFalse
otherwise. void IlvGraphic::removeInteractor | ( | ) |
Removes the interactor from the current object.
Calling this method is equivalent to : setInteractor(((IlvInteractor*)0)
.
IlvNamedProperty* IlvGraphic::removeNamedProperty | ( | IlSymbol * | name | ) |
Removes a named property from the object.
Removes the named property associated with this object having the name name, and returns this property, so that you can delete it or keep it for further handling.
name | The named property to be removed. |
Removes a property from this object's class.
This static function removes the indicated property to the class of this object.
key | The key property to be removed. |
IlTrue
if the key property was actually found, or IlFalse
otherwise. Reimplemented in IlvSimpleGraphic, IlvContainerRectangle, IlvArc, IlvFilledArc, IlvCalendarScale, IlvCircularGauge, IlvFilledCircularGauge, IlvCircularScale, IlvEllipse, IlvFilledEllipse, IlvFilteredGraphic, IlvGauge, IlvRectangularGauge, IlvSliderGauge, IlvReliefGauge, IlvGridRectangle, IlvGraphicHandle, IlvTransformedGraphic, IlvFixedSizeGraphic, IlvGraphicInstance, IlvIcon, IlvTransparentIcon, IlvLabel, IlvFilledLabel, IlvListLabel, IlvLine, IlvArrowLine, IlvMarker, IlvZoomableMarker, IlvOutlinePolygon, IlvGraphicPath, IlvPolyline, IlvPolygon, IlvArrowPolyline, IlvPolyPoints, IlvPolyPointsSelection, IlvSplineSelection, IlvPolySelection, IlvRectangle, IlvFilledRectangle, IlvViewRectangle, IlvReliefLabel, IlvReliefLine, IlvReliefRectangle, IlvReliefDiamond, IlvRoundRectangle, IlvFilledRoundRectangle, IlvScale, IlvRectangularScale, IlvDrawSelection, IlvReshapeSelection, IlvSelector, IlvGraphicSet, IlvShadowLabel, IlvShadowRectangle, IlvSpline, IlvClosedSpline, IlvFilledSpline, IlvTimeScale, IlvZoomableIcon, IlvZoomableTransparentIcon, IlvZoomableLabel, and IlvGraphicCOMAdapter.
Removes a property from the object.
Removes the indicated property. The function returns either the value IlTrue
, if the key property was actually found, or IlFalse
if this was not the case.
key | The key property to be removed. |
void IlvGraphic::removeTag | ( | const IlSymbol * | tag | ) |
Removes a tag.
Removes the tag tag of this object.
tag | The tag to be removed. |
Replaces a property in this object's class.
Replaces the indicated property value in the class of this object.
key | The key to be replaced. | |
value | The value to be replaced. |
IlTrue
if the key property was actually found, or IlFalse
otherwise. Replaces a property in this object's class.
This static function replaces the indicated property value to the class of this object.
key | The key to be replaced. | |
value | The value to be replaced. |
IlTrue
if the key property was actually found, or IlFalse
otherwise. Reimplemented in IlvSimpleGraphic, IlvContainerRectangle, IlvArc, IlvFilledArc, IlvCalendarScale, IlvCircularGauge, IlvFilledCircularGauge, IlvCircularScale, IlvEllipse, IlvFilledEllipse, IlvFilteredGraphic, IlvGauge, IlvRectangularGauge, IlvSliderGauge, IlvReliefGauge, IlvGridRectangle, IlvGraphicHandle, IlvTransformedGraphic, IlvFixedSizeGraphic, IlvGraphicInstance, IlvIcon, IlvTransparentIcon, IlvLabel, IlvFilledLabel, IlvListLabel, IlvLine, IlvArrowLine, IlvMarker, IlvZoomableMarker, IlvOutlinePolygon, IlvGraphicPath, IlvPolyline, IlvPolygon, IlvArrowPolyline, IlvPolyPoints, IlvPolyPointsSelection, IlvSplineSelection, IlvPolySelection, IlvRectangle, IlvFilledRectangle, IlvViewRectangle, IlvReliefLabel, IlvReliefLine, IlvReliefRectangle, IlvReliefDiamond, IlvRoundRectangle, IlvFilledRoundRectangle, IlvScale, IlvRectangularScale, IlvDrawSelection, IlvReshapeSelection, IlvSelector, IlvGraphicSet, IlvShadowLabel, IlvShadowRectangle, IlvSpline, IlvClosedSpline, IlvFilledSpline, IlvTimeScale, IlvZoomableIcon, IlvZoomableTransparentIcon, IlvZoomableLabel, and IlvGraphicCOMAdapter.
Replaces a property.
Replaces the indicated property value. The function returns either the value IlTrue
, if the key property was actually found, or otherwise IlFalse
.
key | The key to be replaced. | |
value | The value to be replaced. |
Resizes a graphic object.
Resizes the object giving it the new dimensions newW and newH. The default implementation calls the member function scale
.
newW | The new width dimension. | |
newH | The new height dimension. |
Rotates a graphic object.
Rotates the object about the center point by an angle of angle degrees. For some objects, rotations are not meaningful. That is, a rectangle should remain a rectangle after this transformation, and thus it should keep its main dimensions (vertical and horizontal) parallel to the x
and y
axis of the object-space coordinate system when it is rotated. The default implementation internally computes the right transformer, and calls the member function applyTransform
.
center | The center point of rotation. | |
angle | The angle to be rotated. |
Reimplemented in IlvArc, and IlvEllipse.
Scales the graphic object.
Scales the object by multiplying its dimensions by zoomX and zoomY, which must be positive numbers. The default implementation calls the member function applyTransform
that computes the corresponding zooming transformer.
zoomX | The x coordinate zooming factor. | |
zoomY | The y coordinate zooming factor. |
virtual void IlvGraphic::setAlpha | ( | IlvIntensity | alpha | ) | [virtual] |
Sets the alpha value of the object.
alpha | The new alpha value. |
Reimplemented in IlvGadget, IlvSimpleGraphic, IlvGauge, IlvReliefGauge, IlvGraphicHandle, IlvOutlinePolygon, IlvGraphicPath, IlvReliefLine, IlvReliefRectangle, IlvGraphicSet, and IlvShadowRectangle.
virtual void IlvGraphic::setAntialiasingMode | ( | IlvAntialiasingMode | mode | ) | [virtual] |
Sets the anti-aliasing mode of the object.
mode | The new anti-aliasing mode. |
Reimplemented in IlvGadget, IlvSimpleGraphic, IlvFilteredGraphic, IlvGauge, IlvReliefGauge, IlvGraphicHandle, IlvGraphicInstance, IlvOutlinePolygon, IlvGraphicPath, IlvReliefLine, IlvReliefRectangle, IlvGraphicSet, and IlvShadowRectangle.
virtual void IlvGraphic::setArcMode | ( | IlvArcMode | mode | ) | [virtual] |
Sets the arc mode of the object.
mode | The new arc mode. |
Reimplemented in IlvGadget, IlvSimpleGraphic, IlvFilteredGraphic, IlvGraphicHandle, IlvGraphicInstance, IlvReliefRectangle, and IlvGraphicSet.
virtual void IlvGraphic::setBackground | ( | IlvColor * | background | ) | [virtual] |
Sets the background color of the object.
Sets the background color of the object.
background | The new background color. |
Reimplemented in IlvGadget, IlvSimpleGraphic, IlvFilteredGraphic, IlvGauge, IlvGraphicHandle, IlvGraphicInstance, IlvOutlinePolygon, IlvGraphicPath, IlvViewRectangle, IlvReliefLine, IlvReliefRectangle, IlvGraphicSet, and IlvShadowRectangle.
void IlvGraphic::setCallback | ( | IlvGraphicCallback | callback, | |
IlAny | data | |||
) |
Sets the main callback function.
Sets the main callback function of the graphic object to the value of the callback parameter. The callback function, when called, receives the user parameter data. setCallback
removes all previously set callbacks before the new callback is added to the list.
callback | The callback function. | |
data | A user parameter passed to the callback. |
void IlvGraphic::setCallback | ( | const IlSymbol * | callbackType, | |
IlvGraphicCallback | callback, | |||
IlAny | data | |||
) |
Removes all previously set callbacks.
Removes all previously set callbacks before the new callback is added to the list. For use with addCallback(const IlSymbol* callbackType, IlvGraphicCallback callbackName, IlAny data)
.
callbackType | The callback type. | |
callbackName | The name of the callback. | |
data | A user parameter passed to the callback. |
void IlvGraphic::setCallback | ( | const IlSymbol * | callbackType, | |
const IlSymbol * | callbackName, | |||
const IlSymbol * | script = 0 | |||
) |
Removes all previously set callbacks.
Removes all previously set callbacks before the new callback is added to the list. For use with addCallback(const IlSymbol*, const IlSymbol*, const IlSymbol*)
.
callbackType | The callback type. | |
callbackName | The name of the callback. | |
script | The name of the script language that has a context where callbackName is defined. If set to 0 , the callback name must be register in the graphic holder. |
IlvScriptLanguage
, IlvGraphicHoder::registerCallback
. void IlvGraphic::setCallback | ( | const IlSymbol * | callbackType, | |
IlvGraphicCallback | callback | |||
) |
Sets a new callback.
Removes all previously set callbacks before the new callback is added to the list. For use with addCallback(const IlSymbol*, IlvGraphicCallback)
.
callbackType | The callback type. | |
callback | The callback function. |
void IlvGraphic::setCallbackData | ( | const IlSymbol * | callbackType, | |
const IlSymbol * | callbackName, | |||
IlAny | data | |||
) |
Sets the callback user data for a callback function.
Sets the callback user data for the callback function named callbackName, that was stored in the callback list of type callbackType to data.
callbackType | The callback type. | |
callbackName | The name of the callback. | |
data | A user parameter passed to the callback. |
void IlvGraphic::setCallbackData | ( | const IlSymbol * | callbackType, | |
IlvGraphicCallback | callback, | |||
IlAny | data | |||
) |
Sets the callback user data for a callback function.
Sets the callback user data for the callback function callback, that was stored in the callback list of type callbackType to data.
callbackType | The callback type. | |
callback | The callback function. | |
data | A user parameter passed to the callback. |
void IlvGraphic::setCallbackName | ( | const IlSymbol * | callbackName | ) |
Sets the symbol that identifies the main callback.
Sets the symbol that identifies the main callback of this graphic object with the value of callbackName.
callbackName | The callback name. |
void IlvGraphic::setClientData | ( | IlAny | clientData | ) |
Sets client data.
Sets the client data of the graphic object to the value of clientData.
clientData | The client data value to be set. |
virtual void IlvGraphic::setColorPattern | ( | IlvColorPattern * | pattern | ) | [virtual] |
Sets the color pattern of the object.
Sets the color pattern of the object.
pattern | The new color pattern. |
Reimplemented in IlvGadget, IlvSimpleGraphic, IlvFilteredGraphic, IlvRectangularGauge, IlvGraphicHandle, IlvGraphicInstance, IlvReliefRectangle, and IlvGraphicSet.
virtual void IlvGraphic::setFillRule | ( | IlvFillRule | rule | ) | [virtual] |
Sets the fill rule of the object.
rule | The new fill rule. |
Reimplemented in IlvGadget, IlvSimpleGraphic, IlvFilteredGraphic, IlvGraphicHandle, IlvGraphicInstance, IlvReliefRectangle, and IlvGraphicSet.
virtual void IlvGraphic::setFillStyle | ( | IlvFillStyle | style | ) | [virtual] |
Sets the fill style of the object.
style | The new fill style. |
Reimplemented in IlvGadget, IlvSimpleGraphic, IlvFilteredGraphic, IlvRectangularGauge, IlvGraphicHandle, IlvGraphicInstance, IlvReliefRectangle, and IlvGraphicSet.
void IlvGraphic::setFocusable | ( | IlBoolean | value | ) |
Set the focusable state of the object.
If value is IlTrue
, the object will be able to receive the keyboard focus. This only applies when the object is located in a gadget holder.
value | A Boolean value indicating whether the object should receive the keyboard focus. |
IlvGadget
, IlvGraphic::isFocusable
. virtual void IlvGraphic::setFont | ( | IlvFont * | font | ) | [virtual] |
Sets the font of the object.
font | The new font. |
Reimplemented in IlvGadget, IlvSimpleGraphic, IlvFilteredGraphic, IlvGraphicHandle, IlvGraphicInstance, IlvLabel, IlvListLabel, IlvReliefLabel, IlvReliefRectangle, IlvScale, IlvGraphicSet, and IlvShadowLabel.
virtual void IlvGraphic::setForeground | ( | IlvColor * | foreground | ) | [virtual] |
Sets the foreground color of the object.
Sets the foreground color of the object.
foreground | The new foreground color. |
Reimplemented in IlvGadget, IlvSimpleGraphic, IlvFilteredGraphic, IlvGauge, IlvReliefGauge, IlvGraphicHandle, IlvGraphicInstance, IlvOutlinePolygon, IlvGraphicPath, IlvReliefLine, IlvReliefRectangle, IlvGraphicSet, and IlvShadowRectangle.
virtual void IlvGraphic::setGradientPattern | ( | IlvGradientPattern * | pattern | ) | [virtual] |
Sets the gradient pattern of the object.
Sets the gradient pattern of the object.
pattern | The new gradient pattern. |
Reimplemented in IlvGadget, IlvSimpleGraphic, IlvFilteredGraphic, IlvRectangularGauge, IlvGraphicHandle, IlvGraphicInstance, IlvReliefRectangle, and IlvGraphicSet.
virtual void IlvGraphic::setHolder | ( | IlvGraphicHolder * | holder | ) | [virtual] |
Sets the object's holder.
This default implementation has no real function.
Reimplemented in IlvGadget, IlvSimpleGraphic, IlvGraphicHandle, IlvTransformedGraphic, and IlvGraphicSet.
IlBoolean IlvGraphic::setInteractor | ( | const char * | name | ) |
Attaches an interactor to the current object.
Attaches the interactor registered with the name name to the current object. This method is equivalent to: setInteractor(IlvInteractor::Get(name))
. If no registered interactor is found, this method does nothing.
setInteractor(IlvInteractor*)
. IlBoolean IlvGraphic::setInteractor | ( | IlvInteractor * | inter | ) |
Attaches an interactor to the current object.
The inter interactor must be a valid interactor for the object. To check this, the IlvInteractor::accept
method is called. If inter is valid, it is locked and the previous interactor is unlocked.
The interactor of a graphic object is shared by all copies of this object made through the virtual copy constructor (IlvGraphis::copy
).
virtual void IlvGraphic::setLineStyle | ( | IlvLineStyle * | style | ) | [virtual] |
Sets the line style of the object.
style | The new line style. |
Reimplemented in IlvGadget, IlvSimpleGraphic, IlvFilteredGraphic, IlvGraphicHandle, IlvGraphicInstance, IlvOutlinePolygon, IlvReliefLine, IlvReliefRectangle, IlvGraphicSet, and IlvShadowRectangle.
virtual void IlvGraphic::setLineWidth | ( | IlUShort | width | ) | [virtual] |
Sets the line width of the object.
width | The new line width. |
Reimplemented in IlvGadget, IlvSimpleGraphic, IlvFilteredGraphic, IlvGraphicHandle, IlvGraphicInstance, IlvOutlinePolygon, IlvReliefLine, IlvReliefRectangle, IlvGraphicSet, and IlvShadowRectangle.
virtual void IlvGraphic::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).
mode | The drawing mode to be set. |
Reimplemented in IlvGadget, IlvSimpleGraphic, IlvFilteredGraphic, IlvGauge, IlvReliefGauge, IlvGraphicHandle, IlvGraphicInstance, IlvOutlinePolygon, IlvGraphicPath, IlvPolySelection, IlvReliefLine, IlvReliefRectangle, IlvDrawSelection, IlvGraphicSet, IlvShadowRectangle, and IlvGraphicCOMAdapter.
virtual void IlvGraphic::setName | ( | const char * | name | ) | [virtual] |
Sets the name of the object.
Sets the name of the object to a copy of the string newName. If newName is 0,
then the object loses its name. This function should not be called if the object is stored in a manager. Use IlvManager::setObjectName
instead. If the object is stored in a SmartSet, the name is rebuilt internally.
name | The new name of the object. |
IlvNamedProperty* IlvGraphic::setNamedProperty | ( | IlvNamedProperty * | property | ) |
Sets a named property on the object.
Associates the named property property with this object. This function returns the named property that was previously associated with this object having the same name, so that you can delete it or keep it for further handling. If no previous named property was associated with this object having the name property, this function returns 0
.
property | The name of the property. |
0
. virtual void IlvGraphic::setNeedsInputContext | ( | IlBoolean | val | ) | [virtual] |
Specifies whether the graphic object should have locale dependent input.
Any input field object will automatically connect to an input method so that input can be done in the current locale, as long as IlvSetLocale
has been called, and IlvGraphic::needsInputContext
returns IlTrue
.
If an application wants to disallow this behavior, that is wants only ASCII input for an object instance, it has to call this method with the parameter value IlFalse
.
val | A Boolean value specifying whether the graphic object should react to localized input (IlTrue ) or not (IlFalse ). |
IlvSetLocale
, needsInputContext
. void IlvGraphic::setNextFocusGraphic | ( | IlSymbol * | name | ) |
Sets the object to be next in the focus chain.
Sets as the next object in the focus chain the object whose name is identified by name. This symbol must be built from the name of the object you want to be next in the focus chain. This next object must therefore have a name.
name | The name of the object to be next in the focus chain. |
virtual void IlvGraphic::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).
over | If IlFalse , sets selective hidden drawing operations. |
Reimplemented in IlvGadget, IlvSimpleGraphic, IlvFilteredGraphic, IlvGauge, IlvGraphicHandle, IlvGraphicInstance, IlvOutlinePolygon, IlvReliefLine, IlvReliefRectangle, IlvDrawSelection, IlvGraphicSet, IlvShadowRectangle, and IlvGraphicCOMAdapter.
virtual void IlvGraphic::setPalette | ( | IlvPalette * | palette | ) | [virtual] |
Sets the palette of the object.
Each of the graphic properties of this object is then taken from this IlvPalette
instance.
palette | The palette to be set. |
Reimplemented in IlvGadget, IlvSimpleGraphic, IlvFilteredGraphic, IlvGauge, IlvReliefGauge, IlvGraphicHandle, IlvGraphicInstance, IlvLabel, IlvOutlinePolygon, IlvGraphicPath, IlvViewRectangle, IlvReliefLine, IlvReliefRectangle, IlvScale, IlvDrawSelection, IlvGraphicSet, IlvShadowRectangle, and IlvGraphicCOMAdapter.
virtual void IlvGraphic::setPattern | ( | IlvPattern * | pattern | ) | [virtual] |
Sets the pattern of the object.
Sets the pattern of the object.
pattern | The new pattern. |
Reimplemented in IlvGadget, IlvSimpleGraphic, IlvFilteredGraphic, IlvGraphicHandle, IlvGraphicInstance, IlvReliefRectangle, and IlvGraphicSet.
void IlvGraphic::setPreviousFocusGraphic | ( | IlSymbol * | name | ) |
Sets an object as previous in the focus chain.
Sets as the previous object in the focus chain the object whose name is identified by name. This symbol must be built from the name of the object you want to be previous in the focus chain. This previous object must therefore have a name.
name | The name of the object set as previous in the focus chain. |
Sets a property of the object to a value.
Sets the property key of this object to value if value is not 0
. If it is 0
, this function removes the property.
key | The key to be set. | |
value | The value to be set. |
virtual void IlvGraphic::setSensitive | ( | IlBoolean | value | ) | [virtual] |
Sets the sensitivity of the object.
Sets the sensitivity of the graphic object to the value sensitive.
value | The sensitivity value. |
virtual void IlvGraphic::symmetry | ( | IlvDirection | axis | ) | [virtual] |
Flips a graphic object.
Flips the object about one of the horizontal or vertical axis (or a combination of the two). The axis is given by the axis parameter, which you can give the value IlvHorizontal
, in
which case the flip takes place around the horizontal axis of the object, or IlvVertical
, which flips the object around the
vertical axis. You can also use the IlvCenter
value to flip the object around its center. The default implementation calls the member function applyTransform
with a transformer corresponding to the required symmetry.
axis | The axis around which flipping occurs. |
Reimplemented in IlvArc, IlvLine, and IlvGraphicSet.
Applies a transformation function on a graphic object.
Translates the position of the object by the vector (dx
, dy
). The default implementation calls the member function applyTransform
that computes the corresponding translation transformer.
dx | The x coordinate vector. | |
dy | The y coordinate vector. |
void IlvGraphic::w | ( | IlvDim | w | ) |
Sets the width value of the object.
This member function calls boundingBox
and resize
to set the w
(width) value.
w | The width value. |
IlvDim IlvGraphic::w | ( | ) | const |
Gets the width value of the object.
This member function calls boundingBox
and retrieves the w
(width) value.
virtual void IlvGraphic::write | ( | IlvOutputFile & | output | ) | const [pure virtual] |
Writes an object description to a file.
Writes out, in a file, the object description. This description contains all the information necessary to create an exact copy of this object by means of the member function read
. Information concerning any IlvPalette
object attached to this object is written out by the object containers. All other information, such as the position and size of the object, is written out by this virtual member function.
For example, suppose we have an IlvLabel
class that implements a graphic object drawn as a text string at a given position. It maintains its position in an internal IlvPoint
field called _position
and its textual content in an internal character array field called _text
. The only information we need to save is the contents of those fields. So, the member function write
of such an object should have the following form:
void IlvLabel::write(IlvOutputFile& file) const { // Save the position field file.getStream() << IlvSpc() << _position; // Save the text field IlvWriteString(file.getStream(), _text); }
output | The the output file to be written to. |
DeclareTypeInfo
. Implemented in IlvContainerRectangle, IlvGraphicAdapter< ADAPTEE >, IlvArc, IlvCalendarScale, IlvCircularGauge, IlvCircularScale, IlvEllipse, IlvFilteredGraphic, IlvGauge, IlvRectangularGauge, IlvSliderGauge, IlvReliefGauge, IlvGridRectangle, IlvGraphicHandle, IlvTransformedGraphic, IlvFixedSizeGraphic, IlvGraphicInstance, IlvIcon, IlvTransparentIcon, IlvLabel, IlvListLabel, IlvLine, IlvArrowLine, IlvMarker, IlvGraphicPath, IlvArrowPolyline, IlvPolyPoints, IlvPolySelection, IlvRectangle, IlvReliefLabel, IlvReliefLine, IlvReliefRectangle, IlvRoundRectangle, IlvFilledRoundRectangle, IlvScale, IlvRectangularScale, IlvDrawSelection, IlvSelector, IlvGraphicSet, IlvShadowLabel, IlvShadowRectangle, IlvTimeScale, IlvZoomableIcon, IlvZoomableLabel, IlvGraphicCOMAdapter, and IlvGraphicAdapter< IlvCOMGraphicFacade >.
void IlvGraphic::x | ( | IlvPos | x | ) |
Sets the x
coordinate value of the object.
This member function calls boundingBox
and move
to set the y
coordinate value.
x | The x coordinate value. |
IlvPos IlvGraphic::x | ( | ) | const |
Gets the x
coordinate value of the object.
This member function calls boundingBox
and retrieves the x
coordinate value.
x
coordinate value. void IlvGraphic::y | ( | IlvPos | y | ) |
Sets the y
coordinate value of the object.
This member function calls boundingBox
and move
to set the y
coordinate value.
y | The y coordinate value. |
IlvPos IlvGraphic::y | ( | ) | const |
Gets the y
coordinate value of the object.
This member function calls boundingBox
and retrieves the y
coordinate value.
y
coordinate value. virtual IlBoolean IlvGraphic::zoomable | ( | ) | const [virtual] |
Checks whether this object is zoomable.
IlTrue
if the graphic object can be zoomed, and IlFalse
otherwise. See the member functions IsZoomAllowed
and AllowZoom
below. Reimplemented in IlvFilteredGraphic, IlvGraphicHandle, IlvFixedSizeGraphic, IlvIcon, IlvLabel, IlvListLabel, IlvMarker, IlvZoomableMarker, IlvDrawSelection, IlvGraphicSet, IlvZoomableIcon, and IlvZoomableLabel.
© 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.