Rogue Wave Views Foundation Package API Reference Guide |
Rogue Wave Views Documentation Home |
Graphic class. More...
#include <ilviews/base/graphic.h>
Public Member Functions | |
void | addCallback (const IlSymbol *callbackType, IlvGraphicCallback callback) |
Adds a callback function to a callback list. More... | |
void | addCallback (const IlSymbol *callbackType, const IlSymbol *callbackName, const IlSymbol *script=0) |
Adds a callback function to a callback list. More... | |
void | addCallback (const IlSymbol *callbackType, IlvGraphicCallback callbackName, IlAny data) |
Adds a callback function to a callback list. More... | |
void | addClassProperty (const IlSymbol *key, IlAny value) |
Adds a property to this object's class. More... | |
void | addProperty (const IlSymbol *key, IlAny value) |
Adds a specific property to the object. More... | |
void | addTag (const IlSymbol *tag) |
Adds a tag. More... | |
virtual void | apply (IlvApplyObject function, IlAny arg) |
Applies a function to objects that compose another object. More... | |
IlBoolean | applyAttribute (const char *attributeClassName, IlInt value, IlAny checkData=0) const |
Applies attributes. More... | |
IlBoolean | applyAttribute (const char *attributeClassName, IlFloat value, IlAny checkData=0) const |
Applies attributes. More... | |
IlBoolean | applyAttribute (const char *attributeClassName, const char *value, IlAny checkData=0) const |
Applies attributes. More... | |
virtual void | applyReferences (IlvApplyObject function, IlAny arg) |
Applies a function to objects that are referenced by another object. More... | |
virtual void | applyResources (const char *storageName, const char *storageClassName, const char *objectName, const char *objectClassName, IlvDisplay *display=0) |
Applies resources on a graphic object. More... | |
virtual void | applyTransform (const IlvTransformer *t)=0 |
Applies a transformation function to the graphic object. More... | |
virtual void | boundingBox (IlvRect &bbox, const IlvTransformer *t=0) const =0 |
Retrieves the bounding box of the graphic object. More... | |
virtual void | callCallbacks (const IlSymbol *callbackType) |
Calls every callback of a given type. More... | |
const char * | className () const |
Returns the class name of an object. More... | |
virtual void | computeFocusRegion (IlvRegion &r, const IlvTransformer *t=0) const |
Computes the region needed for the drawing of the focus. More... | |
virtual IlBoolean | contains (const IlvPoint &p, const IlvPoint &tp, const IlvTransformer *t=0) const |
Checks whether a point is in the object. More... | |
IlBoolean | contains (const IlvPoint &p) const |
Checks whether a point is in the object. More... | |
virtual IlvGraphic * | copy () const =0 |
Copies this object. More... | |
virtual void | draw (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const =0 |
Draws the graphic object. More... | |
void | draw (IlvPort *dst, const IlvTransformer *t, const IlvRect *clip) const |
Draws a graphic object. More... | |
virtual void | drawFocus (IlvPort *dst, const IlvPalette *palette, const IlvTransformer *t=0, const IlvRegion *clip=0) const |
Draws additional drawings for an object that has the keyboard focus. More... | |
virtual void | getAccessors (const IlSymbol *const **, const IlvValueTypeClass *const **, IlUInt &) const |
Retrieves the list of available accessors of an object. More... | |
virtual IlvIntensity | getAlpha () const |
Retrieves the alpha component. More... | |
virtual IlvAntialiasingMode | getAntialiasingMode () const |
Retrieves the anti-aliasing mode. More... | |
IlvGraphicCallback | getCallback (const IlSymbol *callbackType) const |
Gets a callback. More... | |
IlvGraphicCallback | getCallback () const |
Gets the main callback function. More... | |
IlAny | getCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback) const |
Gets a callback user data. More... | |
IlAny | getCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName) const |
Gets a callback user data. More... | |
IlSymbol * | getCallbackName (const IlSymbol *callbackType) const |
Gets the name of a callback. More... | |
IlSymbol * | getCallbackName () const |
Gets the symbol that identifies the main callback. More... | |
virtual IlUInt | getCallbackTypes (const char *const **names, const IlSymbol *const **types) const |
Gets the number of register callback types for the object. More... | |
virtual IlvGraphic * | getChildAt (IlUInt index) const |
Returns the sub-object of the graphic object specified by index. More... | |
virtual IlvGraphic * | getChildByName (const char *name) const |
Returns the sub-object of the graphic object specified by a name. More... | |
virtual IlUInt | getChildCount () const |
Returns the number of children of this graphic object. More... | |
virtual IlInt | getChildIndex (const IlvGraphic *object) const |
Returns the index of the specified sub-object in this graphic object. More... | |
virtual IlvGraphic *const * | getChildren (IlUInt &count) const |
Returns an array containing the sub-objects of this graphic object. More... | |
virtual IlvClassInfo * | getClassInfo () const |
Gets class information. More... | |
IlAny | getClassProperty (const IlSymbol *key, IlBoolean checkParent=IlFalse) const |
Retrieves the indicated property value in the class of this object. More... | |
IlAny | getClientData () const |
Gets client data. More... | |
virtual const char * | getDefaultInteractor () const |
Gets the name of the default interactor for this object. More... | |
virtual IlvGraphicHolder * | getHolder () const |
Gets a pointer to an object's holder. More... | |
IlvInteractor * | getInteractor () const |
Returns the interactor associated with the current object. More... | |
virtual IlUShort | getLineWidth () const |
Retrieves the line width. More... | |
virtual IlvLookFeelHandler * | getLookFeelHandler () const |
Returns the look & feel handler used by this object. More... | |
const char * | getName () const |
Gets the name of the object. More... | |
IlvNamedProperty * | getNamedProperty (const IlSymbol *name) const |
Gets a named property. More... | |
IlSymbol * | getNextFocusGraphic () const |
Gets the next object in the focus chain. More... | |
IlSymbol * | getPreviousFocusGraphic () const |
Gets the previous object in the focus chain. More... | |
IlAny | getProperty (const IlSymbol *key) const |
Gets a property. More... | |
IlvSmartSet * | getSmartSet () const |
Gets the smart set object containing this graphic object. More... | |
const IlSymbol *const * | getTags (IlUInt &count) const |
Returns all the tags applied to this object. More... | |
IlvDim | h () const |
Gets the height value of the object. More... | |
void | h (IlvDim h) |
Sets the height value of the object. More... | |
IlBoolean | hasCallback (const IlSymbol *callbackType, IlvGraphicCallback callback) const |
Checks whether a callback function is in a callback list. More... | |
IlBoolean | hasCallback (const IlSymbol *callbackType, const IlSymbol *callbackName) const |
Checks whether a callback function is in a callback list. More... | |
IlBoolean | hasCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback) const |
Checks whether a callback function has user data. More... | |
IlBoolean | hasCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName) const |
Checks whether a callback function has user data. More... | |
const IlvClassInfo * | hasClassProperty (const IlSymbol *key, IlBoolean s=IlFalse) const |
Checks for a class where the keyed property exists. More... | |
IlBoolean | hasProperty (const IlSymbol *key) const |
Checks whether the object has a particular property. More... | |
IlBoolean | hasTag (const IlSymbol *tag) const |
Checks whether the object has a specific tag. More... | |
virtual IlBoolean | inside (const IlvRegion &r, const IlvTransformer *t=0) const |
Determines whether an object with transformation applied is inside the bounding box. More... | |
IlBoolean | inside (const IlvRect &r, const IlvRect &tr, const IlvTransformer *t=0) const |
Determines whether an object with transformation applied is inside the bounding box. More... | |
IlBoolean | inside (const IlvRect &r) const |
Determines whether a rectangle is inside the bounding box. More... | |
virtual IlBoolean | intersects (const IlvRegion &r, const IlvTransformer *t=0) const |
Checks whether a region intersects the bounding box with transformation applied. More... | |
IlBoolean | intersects (const IlvRect &r, const IlvRect &tr, const IlvTransformer *t=0) const |
Checks whether a rectangle intersects the bounding box with transformation applied. More... | |
IlBoolean | intersects (const IlvRect &r) const |
Checks whether a rectangle intersects the bounding box. More... | |
virtual void | invert (IlBoolean temp=IlFalse) |
Highlights the object. More... | |
IlBoolean | isFirstFocusGraphic () const |
Checks whether the object is first in the focus chain. More... | |
IlBoolean | isFocusable () const |
Checks whether the object can receive the keyboard focus. More... | |
IlBoolean | isInSmartSet () const |
Checks whether a graphic object belongs to a smart set. More... | |
IlBoolean | isLastFocusGraphic () const |
Checks whether the object is last in the focus chain. More... | |
IlBoolean | isSensitive () const |
Checks whether the object is sensitive. More... | |
IlBoolean | isSubtypeOf (const char *parentClass) const |
Checks whether this object's class is a subclass of a given parent class. More... | |
IlBoolean | isSubtypeOf (const IlvClassInfo *classInfo) const |
Checks whether this object's class is a subclass. More... | |
virtual void | move (IlvPos x, IlvPos y) |
Moves the graphic object. More... | |
void | move (const IlvPoint &p) |
Moves the graphic object. More... | |
void | moveResize (const IlvRect &size) |
Moves and resizes a graphic object. More... | |
virtual IlBoolean | needsInputContext () const |
Indicates whether the graphic instance can connect to an input method for locale dependent input. More... | |
virtual void | print (std::ostream &out, int level=0) const |
Prints for debugging purposes. More... | |
void | removeCallback (const IlSymbol *callbackType, IlvGraphicCallback callback) |
Removes a callback function from a callback list. More... | |
void | removeCallback (const IlSymbol *callbackType, const IlSymbol *callbackName) |
Removes a callback function from a callback list. More... | |
IlBoolean | removeClassProperty (const IlSymbol *key) |
Removes a property from this object's class. More... | |
void | removeInteractor () |
Removes the interactor from the current object. More... | |
IlvNamedProperty * | removeNamedProperty (IlSymbol *name) |
Removes a named property from the object. More... | |
IlBoolean | removeProperty (const IlSymbol *key) |
Removes a property from the object. More... | |
void | removeTag (const IlSymbol *tag) |
Removes a tag. More... | |
IlBoolean | replaceClassProperty (const IlSymbol *key, IlAny value) |
Replaces a property in this object's class. More... | |
IlBoolean | replaceProperty (const IlSymbol *key, IlAny value) |
Replaces a property. More... | |
virtual void | resize (IlvDim newW, IlvDim newH) |
Resizes a graphic object. More... | |
virtual void | rotate (const IlvPoint ¢er, IlFloat angle) |
Rotates a graphic object. More... | |
virtual void | scale (IlFloat zoomX, IlFloat zoomY) |
Scales the graphic object. More... | |
virtual void | setAlpha (IlvIntensity alpha) |
Sets the alpha value of the object. More... | |
virtual void | setAntialiasingMode (IlvAntialiasingMode mode) |
Sets the anti-aliasing mode of the object. More... | |
virtual void | setArcMode (IlvArcMode mode) |
Sets the arc mode of the object. More... | |
virtual void | setBackground (IlvColor *background) |
Sets the background color of the object. More... | |
void | setCallback (const IlSymbol *callbackType, IlvGraphicCallback callback) |
Sets a new callback. More... | |
void | setCallback (const IlSymbol *callbackType, const IlSymbol *callbackName, const IlSymbol *script=0) |
Removes all previously set callbacks. More... | |
void | setCallback (const IlSymbol *callbackType, IlvGraphicCallback callbackName, IlAny data) |
Removes all previously set callbacks. More... | |
void | setCallback (IlvGraphicCallback callback, IlAny data) |
Sets the main callback function. More... | |
void | setCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback, IlAny data) |
Sets the callback user data for a callback function. More... | |
void | setCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName, IlAny data) |
Sets the callback user data for a callback function. More... | |
void | setCallbackName (const IlSymbol *callbackName) |
Sets the symbol that identifies the main callback. More... | |
void | setClientData (IlAny clientData) |
Sets client data. More... | |
virtual void | setColorPattern (IlvColorPattern *pattern) |
Sets the color pattern of the object. More... | |
virtual void | setFillRule (IlvFillRule rule) |
Sets the fill rule of the object. More... | |
virtual void | setFillStyle (IlvFillStyle style) |
Sets the fill style of the object. More... | |
void | setFirstFocusGraphic () |
Sets the object to be first in the focus chain. | |
void | setFocusable (IlBoolean value) |
Set the focusable state of the object. More... | |
virtual void | setFont (IlvFont *font) |
Sets the font of the object. More... | |
virtual void | setForeground (IlvColor *foreground) |
Sets the foreground color of the object. More... | |
virtual void | setGradientPattern (IlvGradientPattern *pattern) |
Sets the gradient pattern of the object. More... | |
virtual void | setHolder (IlvGraphicHolder *) |
Sets the object's holder. More... | |
IlBoolean | setInteractor (IlvInteractor *inter) |
Attaches an interactor to the current object. More... | |
IlBoolean | setInteractor (const char *name) |
Attaches an interactor to this graphic object. More... | |
void | setLastFocusGraphic () |
Sets the object to be last in the focus chain. | |
virtual void | setLineStyle (IlvLineStyle *style) |
Sets the line style of the object. More... | |
virtual void | setLineWidth (IlUShort width) |
Sets the line width of the object. More... | |
virtual void | setMode (IlvDrawMode mode) |
Sets the drawing mode of the object temporarily. More... | |
virtual void | setName (const char *name) |
Sets the name of the object. More... | |
IlvNamedProperty * | setNamedProperty (IlvNamedProperty *property) |
Sets a named property on the object. More... | |
virtual void | setNeedsInputContext (IlBoolean val) |
Specifies whether the graphic object should have locale dependent input. More... | |
void | setNextFocusGraphic (IlSymbol *name) |
Sets the object to be next in the focus chain. More... | |
virtual void | setOverwrite (IlBoolean over) |
Sets an overwrite mode that modifies how the drawing member functions operate. More... | |
virtual void | setPalette (IlvPalette *palette) |
Sets the palette of the object. More... | |
virtual void | setPattern (IlvPattern *pattern) |
Sets the pattern of the object. More... | |
void | setPreviousFocusGraphic (IlSymbol *name) |
Sets an object as previous in the focus chain. More... | |
void | setProperty (const IlSymbol *key, IlAny value) |
Sets a property of the object to a value. More... | |
virtual void | setSensitive (IlBoolean value) |
Sets the sensitivity of the object. More... | |
virtual void | symmetry (IlvDirection axis) |
Flips a graphic object. More... | |
virtual void | translate (IlvPos dx, IlvPos dy) |
Applies a transformation function on a graphic object. More... | |
IlvDim | w () const |
Gets the width value of the object. More... | |
void | w (IlvDim w) |
Sets the width value of the object. More... | |
virtual void | write (IlvOutputFile &output) const =0 |
Writes an object description to a file. More... | |
IlvPos | x () const |
Gets the x coordinate value of the object. More... | |
void | x (IlvPos x) |
Sets the x coordinate value of the object. More... | |
IlvPos | y () const |
Gets the y coordinate value of the object. More... | |
void | y (IlvPos y) |
Sets the y coordinate value of the object. More... | |
virtual IlBoolean | zoomable () const |
Checks whether this object is zoomable. More... | |
Public Member Functions inherited from IlvValueInterface | |
virtual IlBoolean | applyValue (const IlvValue &value) |
Apply an accessor. More... | |
virtual IlBoolean | changeValue (const IlvValue &val) |
Changes the value of an accessor. More... | |
virtual IlBoolean | changeValues (const IlvValue *values, IlUShort count=0) |
Changes several accessor values simultaneously. More... | |
virtual IlvValue & | queryValue (IlvValue &val) const |
Retrieves an accessor value. More... | |
virtual void | queryValues (IlvValue *values, IlUShort count) const |
Retrieves multiple accessor values simultaneously. More... | |
Static Public Member Functions | |
static void | AddProperty (const IlSymbol *key, IlAny value) |
Adds a property to this object's class. More... | |
static void | AddToCallbackTypeList (IlUInt &count, const char *const **names, const IlSymbol *const **types, const char *newName, const IlSymbol *newType) |
Adds a callback to a list. More... | |
static void | AllowZoom (IlBoolean az) |
Sets or inhibits zooming. More... | |
static IlvClassInfo * | ClassInfo () const |
Gets class information. More... | |
static IlAny | GetProperty (const IlSymbol *key, IlBoolean checkSuperClass=IlFalse) |
Retrieves the property value associated with the key in this object's class. More... | |
static const IlvClassInfo * | HasProperty (const IlSymbol *key, IlBoolean checkSuperClass=IlFalse) |
Checks for the existence of a property for this object's class hierarchy. More... | |
static IlBoolean | IsZoomAllowed () |
Checks whether zoomable objects can display themselves when zooming out. More... | |
static IlvGraphic * | read (IlvInputFile &file, IlvPalette *palette) |
Reads an object description from a file. More... | |
static IlBoolean | RemoveProperty (const IlSymbol *key) |
Removes a property from this object's class. More... | |
static IlBoolean | ReplaceProperty (const IlSymbol *key, IlAny value) |
Replaces a property in this object's class. More... | |
Graphic class.
Library: viewsIlvGraphic
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()
to declare these constructors in the class definition.
IlvInputFile
, IlvOutputFile
, IlvRegisterClass()
, IlvNamedProperty
.Accessors provide a scriptable and uniform way to inspect and modify an object by using its base class methods IlvValueInterface::queryValue()
, IlvValueInterface::queryValues()
, IlvValueInterface::changeValue()
, IlvValueInterface::changeValues()
. This class inherits the accessors of its superclass IlvValueInterface
and adds the following ones:
Name | Type | Equivalent methods |
---|---|---|
x | Int | x() , move() . See [1] below |
y | Int | y() , move() . See [1] below |
width | UInt | w() , resize() . See [1] below |
height | UInt | h() , resize() . See [1] below |
sensitive | Boolean | isSensitive() , setSensitive() |
visible | Boolean | IlvGraphicHolder::isVisible() , IlvGraphicHolder::setVisible() |
container | Object | IlvGraphicHolder::getContainer() |
manager | Object | IlvGraphicHolder::getManager() |
lineWidth | UInt | getLineWidth() , setLineWidth() |
alpha | UInt | getAlpha() , setAlpha() |
antialiasingMode | AntiAliasingMode | getAntialiasingMode() , setAntialiasingMode() |
childCount | UInt | getChildCount() |
[1]: setting this attribute is equivalent to calling move()
or resize()
through IlvGraphicHolder::applyToObject()
[2]: if the graphic object has a holder, using this method accessor is equivalent to call to move()
(resp. moveResize()
, translate()
) through IlvGraphicHolder::applyToObject()
.
[3]: the equivalent code is
[4]: the equivalent code is
[5]: the equivalent code is
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. |
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
, IlvGraphicHolder::registerCallback()
. void IlvGraphic::addCallback | ( | const IlSymbol * | callbackType, |
IlvGraphicCallback | callbackName, | ||
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. |
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 the class of this object only.
key | The key to be associated. |
value | The value to be associated. |
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. |
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. |
void IlvGraphic::addTag | ( | const IlSymbol * | tag | ) |
Adds a tag.
Adds the tag tag to this object.
tag | The tag to be added. |
|
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:
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 |
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 |
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 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 | The argument sent to function. |
Reimplemented in IlvPolySelection, IlvDrawSelection, IlvGraphicHandle, and IlvGraphicSet.
IlBoolean IlvGraphic::applyAttribute | ( | const char * | attributeClassName, |
IlInt | value, | ||
IlAny | checkData = 0 |
||
) | const |
Applies attributes.
Calls the member function setValue()
(of the appropriate 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 appropriate 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, |
const char * | value, | ||
IlAny | checkData = 0 |
||
) | const |
Applies attributes.
Calls the member function setValue()
(of the appropriate 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 |
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 IlvDrawSelection, IlvGraphicHandle, and IlvGraphicSet.
|
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.
|
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, IlvTimeScale, IlvGraphicPath, IlvRectangularScale, IlvFixedSizeGraphic, IlvTransformedGraphic, IlvScale, IlvFilteredGraphic, IlvGraphicSet, IlvPolyPoints, IlvGraphicHandle, IlvCircularScale, IlvListLabel, IlvIcon, IlvDrawSelection, IlvGauge, IlvLabel, IlvViewRectangle, IlvPolySelection, IlvLine, IlvZoomableIcon, IlvEllipse, IlvMarker, IlvArc, IlvZoomableLabel, and IlvRectangle.
|
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.
bbox | The bounding box to be set. |
t | A transformer value or 0 if there is no transformation. |
Implemented in IlvGadget, IlvTimeScale, IlvGraphicPath, IlvRectangularScale, IlvFixedSizeGraphic, IlvReshapeSelection, IlvTransformedGraphic, IlvScale, IlvArrowPolyline, IlvRectangularGauge, IlvGraphicSet, IlvFilteredGraphic, IlvPolyPoints, IlvCircularScale, IlvListLabel, IlvGraphicHandle, IlvArrowLine, IlvZoomableMarker, IlvFilledArc, IlvIcon, IlvDrawSelection, IlvGauge, IlvCircularGauge, IlvLabel, IlvReliefLine, IlvPolySelection, IlvPolyPointsSelection, IlvLine, IlvZoomableIcon, IlvEllipse, IlvMarker, IlvArc, IlvRectangle, and IlvZoomableLabel.
|
virtual |
Calls every callback of a given type.
Calls every callback in the callback list of type callbackType.
|
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"
.
|
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 IlvFixedSizeGraphic, IlvTransformedGraphic, IlvGraphicHandle, and IlvSelector.
|
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, IlvGraphicPath, IlvFixedSizeGraphic, IlvTransformedGraphic, IlvFilteredGraphic, IlvGraphicSet, IlvListLabel, IlvPolygon, IlvFilledSpline, IlvCircularScale, IlvFilledArc, IlvZoomableMarker, IlvGraphicHandle, IlvIcon, IlvClosedSpline, IlvFilledEllipse, IlvCircularGauge, IlvFilledRectangle, IlvPolyline, IlvDrawSelection, IlvLabel, IlvReliefLine, IlvSpline, IlvZoomableIcon, IlvPolySelection, IlvLine, IlvArc, IlvEllipse, IlvMarker, IlvZoomableLabel, and IlvRectangle.
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 other member function contains()
.
p | The point to be tested. |
IlTrue
when the point p lies inside the outline of the object.
|
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()
.
|
pure virtual |
Draws the graphic object.
Draws the object in the given IlvPort
using the transformer t.
dst | The destination port this object is drawn onto. |
t | The transformer value. If 0 , no transformation is performed. |
clip | The clipping region, relative to the transformed object, or 0 if none. |
Implemented in IlvGadget, IlvTimeScale, IlvGraphicPath, IlvGraphicInstance, IlvRectangularScale, IlvFixedSizeGraphic, IlvReshapeSelection, IlvTransformedGraphic, IlvScale, IlvArrowPolyline, IlvRectangularGauge, IlvSplineSelection, IlvFilteredGraphic, IlvGraphicSet, IlvPolyPoints, IlvListLabel, IlvFilledSpline, IlvPolygon, IlvCircularScale, IlvArrowLine, IlvFilledLabel, IlvZoomableMarker, IlvGraphicHandle, IlvFilledArc, IlvReliefDiamond, IlvIcon, IlvClosedSpline, IlvFilledRoundRectangle, IlvFilledEllipse, IlvGauge, IlvDrawSelection, IlvFilledRectangle, IlvPolyline, IlvLabel, IlvReliefLine, IlvSpline, IlvShadowRectangle, IlvViewRectangle, IlvPolySelection, IlvLine, IlvPolyPointsSelection, IlvReliefRectangle, IlvZoomableIcon, IlvOutlinePolygon, IlvGridRectangle, IlvReliefLabel, IlvZoomableLabel, IlvShadowLabel, IlvEllipse, IlvRoundRectangle, IlvMarker, IlvArc, and IlvRectangle.
void IlvGraphic::draw | ( | IlvPort * | dst, |
const IlvTransformer * | t, | ||
const IlvRect * | clip | ||
) | const |
Draws a graphic object.
Is similar to draw(IlvPort*,const IlvTransformer*, const IlvRegion*)
and can be used when the clipping region is just a rectangle. It actually calls this 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 |
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 IlvFixedSizeGraphic, IlvTransformedGraphic, IlvGraphicHandle, IlvGauge, and IlvSelector.
|
virtual |
Retrieves the list of available accessors of an object.
Retrieves the list of accessors of an object. names 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:
IlvValueBooleanType
IlvValueIntType
IlvValueUIntType
IlvValueFloatType
IlvValueDoubleType
IlvValueStringType
IlvValueDirectionType
IlvValueColorType
IlvValueFontType
IlvValuePatternType
IlvValueColorPatternType
IlvValueGradientPatternType
IlvValueLineStyleType
IlvValueFillStyleType
IlvValueFillRuleType
IlvValueArcModeType
IlvValueBitmapType
IlvValueStringArrayType
IlvValueUIntArrayType
IlvValueMenuItemArrayType
IlvValueMatrixItemArrayType
IlvValueNotebookPageArrayType
The possible accessors for an object are described in the corresponding class.
names | The array of symbols returned by the method. Each symbol is the name of an accessor. |
types | The array of types returned by the method. Each value is the type of an accessor. |
count | The number of items in the arrays names and types. |
Reimplemented from IlvValueInterface.
Reimplemented in IlvGraphicCOMAdapter, and IlvGraphicHandle.
|
virtual |
Retrieves the alpha component.
Reimplemented in IlvSimpleGraphic, IlvGadget, IlvGraphicSet, and IlvGraphicHandle.
|
virtual |
Retrieves the anti-aliasing mode.
Reimplemented in IlvSimpleGraphic, IlvGadget, IlvGraphicInstance, and IlvGraphicHandle.
IlvGraphicCallback IlvGraphic::getCallback | ( | const IlSymbol * | callbackType | ) | const |
Gets a callback.
callbackType | The callback type. |
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.
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. 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. Gets the name of a callback.
callbackType | The callback type. |
IlSymbol* IlvGraphic::getCallbackName | ( | ) | const |
Gets the symbol that identifies the main callback.
|
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 |
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 |
Returns the sub-object of the graphic object specified by a name.
name | The name of the object being searched. |
0
is returned. Reimplemented in IlvGraphicSet.
|
virtual |
Returns the number of children of this graphic object.
Reimplemented in IlvGraphicSet.
|
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 |
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. IlvGraphicSet
, IlvGraphicHandle
.
|
virtual |
Gets class information.
Returns a pointer to the IlvClassInfo
object associated with this object's class.
Reimplemented from IlvValueInterface.
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 |
Gets the name of the default interactor for this object.
Reimplemented in IlvGraphicCOMAdapter, and IlvGauge.
|
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 |
Retrieves the line width.
Reimplemented in IlvSimpleGraphic, IlvGraphicInstance, IlvGraphicSet, and IlvGraphicHandle.
|
virtual |
Returns the look & feel handler used by this object.
The default implementation returns 0
.
Reimplemented in IlvSimpleGraphic, IlvGadget, and IlvGraphicHandle.
|
virtual |
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.
Reimplemented from IlvValueInterface.
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.
Gets a property.
key | The key whose value is to be returned. |
0
is returned when no property name matches the key parameter.
|
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
. IlvSmartSet* IlvGraphic::getSmartSet | ( | ) | const |
Gets the smart set object containing this graphic object.
IlvSmartSet
object in which this graphic object is contained or 0
if there is none. Returns all the tags applied to this object.
count | the number of tags for this object (which is also the size of the returned array). |
IlPoolOf(Pointer)
and should not be deleted or modified. If there is no tags on this object, this function returns 0
(and count is set to 0
). addTag()
. IlvDim IlvGraphic::h | ( | ) | const |
Gets the height value of the object.
This member function calls boundingBox()
and retrieves the height value.
void IlvGraphic::h | ( | IlvDim | h | ) |
Sets the height value of the object.
This member function calls boundingBox()
and resize()
to set the height value.
h | The height value. |
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::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::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. 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. const IlvClassInfo* IlvGraphic::hasClassProperty | ( | const IlSymbol * | key, |
IlBoolean | s = IlFalse |
||
) | const |
Checks for a class where the keyed property exists.
Retrieves a pointer to the IlvClassInfo
that represents the class where the key property exists.
key | The key with which the property value is associated. |
s | IlTrue specifies iterative search on superclasses, until a match is found. |
IlvClassInfo
that represents the class where the key property exists, or 0
if the property can not be found. Checks whether the object has a particular property.
key | The key to be tested. |
IlTrue
is returned, then this property is actually set for this object. If this is not the case, then IlFalse
is returned.
|
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. |
IlvClassInfo
that indicates a class where the key property exists, or 0
. Checks whether the object has a specific tag.
tag | The tag to be tested. |
IlTrue
if this object has the tag tag.
|
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 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 IlvFixedSizeGraphic, IlvTransformedGraphic, IlvFilteredGraphic, IlvGraphicSet, IlvListLabel, IlvGraphicHandle, IlvIcon, IlvLabel, IlvZoomableIcon, and IlvZoomableLabel.
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 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. Determines whether a rectangle is inside the bounding box.
Determines whether a rectangle is inside the bounding box. It is equivalent to inside(
r,r)` .
r | The rectangle to be tested. |
IlTrue
when the rectangle r lies completely inside the bounding box of the object and
|
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 IlvFixedSizeGraphic, IlvTransformedGraphic, IlvFilteredGraphic, IlvGraphicSet, IlvListLabel, IlvGraphicHandle, IlvIcon, IlvLabel, IlvZoomableIcon, and IlvZoomableLabel.
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. 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. 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 IlvSimpleGraphic, IlvGadget, IlvGraphicInstance, IlvReliefGauge, IlvGraphicSet, IlvFilteredGraphic, IlvGraphicHandle, IlvGauge, IlvReliefLine, IlvOutlinePolygon, and IlvReliefRectangle.
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.
IlTrue
if the object should receive the keyboard focus and IlFalse
otherwise. 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 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. 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.
|
static |
Checks whether zoomable objects can display themselves when zooming out.
A static member function that returns a value indicating whether zoomable objects may or may not display themselves when zooming out. If displayed, they should appear bigger than their original size.
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::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. |
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 |
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 |
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. |
|
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:
In the following example, the static member function read()
of the IlvLabel
class could have the following form:
file | The name of the file to be read from. |
palette | The name of the palette for the object. |
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 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. |
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 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. |
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. 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.
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. |
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. 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 IlvEllipse, and IlvArc.
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 |
Sets the alpha value of the object.
alpha | The new alpha value. |
Reimplemented in IlvSimpleGraphic, IlvGadget, IlvGraphicPath, IlvReliefGauge, IlvGraphicSet, IlvGraphicHandle, IlvGauge, IlvReliefLine, IlvShadowRectangle, IlvReliefRectangle, and IlvOutlinePolygon.
|
virtual |
Sets the anti-aliasing mode of the object.
mode | The new anti-aliasing mode. |
Reimplemented in IlvSimpleGraphic, IlvGadget, IlvGraphicPath, IlvGraphicInstance, IlvReliefGauge, IlvGraphicSet, IlvFilteredGraphic, IlvGraphicHandle, IlvGauge, IlvReliefLine, IlvShadowRectangle, IlvReliefRectangle, and IlvOutlinePolygon.
|
virtual |
Sets the arc mode of the object.
mode | The new arc mode. |
Reimplemented in IlvSimpleGraphic, IlvGadget, IlvGraphicInstance, IlvGraphicSet, IlvFilteredGraphic, IlvGraphicHandle, and IlvReliefRectangle.
|
virtual |
Sets the background color of the object.
Sets the background color of the object.
background | The new background color. |
Reimplemented in IlvSimpleGraphic, IlvGadget, IlvGraphicPath, IlvGraphicInstance, IlvGraphicSet, IlvFilteredGraphic, IlvViewRectangle, IlvGraphicHandle, IlvGauge, IlvReliefLine, IlvShadowRectangle, IlvOutlinePolygon, and IlvReliefRectangle.
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::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
, IlvGraphicHolder::registerCallback()
. void IlvGraphic::setCallback | ( | const IlSymbol * | callbackType, |
IlvGraphicCallback | callbackName, | ||
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 | ( | 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.
This method 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::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::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::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 |
Sets the color pattern of the object.
Sets the color pattern of the object.
pattern | The new color pattern. |
Reimplemented in IlvSimpleGraphic, IlvGadget, IlvGraphicInstance, IlvRectangularGauge, IlvGraphicSet, IlvFilteredGraphic, IlvGraphicHandle, and IlvReliefRectangle.
|
virtual |
Sets the fill rule of the object.
rule | The new fill rule. |
Reimplemented in IlvSimpleGraphic, IlvGadget, IlvGraphicInstance, IlvGraphicSet, IlvFilteredGraphic, IlvGraphicHandle, and IlvReliefRectangle.
|
virtual |
Sets the fill style of the object.
style | The new fill style. |
Reimplemented in IlvSimpleGraphic, IlvGadget, IlvGraphicInstance, IlvRectangularGauge, IlvGraphicSet, IlvFilteredGraphic, IlvGraphicHandle, and IlvReliefRectangle.
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 | Specifies whether the object should receive the keyboard focus. |
IlvGadget
, IlvGraphic::isFocusable()
.
|
virtual |
Sets the font of the object.
font | The new font. |
Reimplemented in IlvSimpleGraphic, IlvGadget, IlvGraphicInstance, IlvScale, IlvGraphicSet, IlvFilteredGraphic, IlvListLabel, IlvGraphicHandle, IlvLabel, IlvShadowLabel, IlvReliefLabel, and IlvReliefRectangle.
|
virtual |
Sets the foreground color of the object.
Sets the foreground color of the object.
foreground | The new foreground color. |
Reimplemented in IlvSimpleGraphic, IlvGadget, IlvGraphicPath, IlvGraphicInstance, IlvReliefGauge, IlvGraphicSet, IlvFilteredGraphic, IlvGraphicHandle, IlvGauge, IlvReliefLine, IlvShadowRectangle, IlvOutlinePolygon, and IlvReliefRectangle.
|
virtual |
Sets the gradient pattern of the object.
Sets the gradient pattern of the object.
pattern | The new gradient pattern. |
Reimplemented in IlvSimpleGraphic, IlvGadget, IlvGraphicInstance, IlvRectangularGauge, IlvGraphicSet, IlvFilteredGraphic, IlvGraphicHandle, and IlvReliefRectangle.
|
virtual |
Sets the object's holder.
This default implementation has no real function.
Reimplemented in IlvSimpleGraphic, IlvTransformedGraphic, IlvGraphicSet, IlvGraphicHandle, and IlvGadget.
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 (IlvGraphic::copy()
).
IlTrue
, that the interactor inter has been successfully attached to the current object. IlBoolean IlvGraphic::setInteractor | ( | const char * | name | ) |
Attaches an interactor to this graphic object.
Attaches the interactor registered with the name name to this graphic object. This method is equivalent to: setInteractor(IlvInteractor::Get(name))
. If no registered interactor is found, this method does nothing.
IlTrue
, that interactor has been successfully attached to the current object. setInteractor(IlvInteractor*)
.
|
virtual |
Sets the line style of the object.
style | The new line style. |
Reimplemented in IlvSimpleGraphic, IlvGadget, IlvGraphicInstance, IlvGraphicSet, IlvFilteredGraphic, IlvGraphicHandle, IlvReliefLine, IlvShadowRectangle, IlvOutlinePolygon, and IlvReliefRectangle.
|
virtual |
Sets the line width of the object.
width | The new line width. |
Reimplemented in IlvSimpleGraphic, IlvGadget, IlvGraphicInstance, IlvGraphicSet, IlvFilteredGraphic, IlvGraphicHandle, IlvReliefLine, IlvShadowRectangle, IlvOutlinePolygon, and IlvReliefRectangle.
|
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 IlvSimpleGraphic, IlvGadget, IlvGraphicPath, IlvGraphicInstance, IlvReliefGauge, IlvGraphicSet, IlvFilteredGraphic, IlvGraphicCOMAdapter, IlvPolySelection, IlvDrawSelection, IlvGraphicHandle, IlvGauge, IlvReliefLine, IlvShadowRectangle, IlvReliefRectangle, and IlvOutlinePolygon.
|
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 |
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 | Specifies 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 |
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 IlvSimpleGraphic, IlvGadget, IlvGraphicInstance, IlvGraphicSet, IlvFilteredGraphic, IlvGraphicCOMAdapter, IlvDrawSelection, IlvGraphicHandle, IlvGauge, IlvReliefLine, IlvShadowRectangle, IlvReliefRectangle, and IlvOutlinePolygon.
|
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 IlvSimpleGraphic, IlvGadget, IlvGraphicPath, IlvGraphicInstance, IlvReliefGauge, IlvScale, IlvGraphicSet, IlvFilteredGraphic, IlvGraphicCOMAdapter, IlvGraphicHandle, IlvDrawSelection, IlvViewRectangle, IlvGauge, IlvLabel, IlvReliefLine, IlvShadowRectangle, IlvReliefRectangle, and IlvOutlinePolygon.
|
virtual |
Sets the pattern of the object.
Sets the pattern of the object.
pattern | The new pattern. |
Reimplemented in IlvSimpleGraphic, IlvGadget, IlvGraphicInstance, IlvGraphicSet, IlvFilteredGraphic, IlvGraphicHandle, and IlvReliefRectangle.
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 |
Sets the sensitivity of the object.
Sets the sensitivity of the graphic object to the value sensitive.
value | The sensitivity value. |
|
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 IlvGraphicSet, IlvLine, and IlvArc.
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. |
IlvDim IlvGraphic::w | ( | ) | const |
Gets the width value of the object.
This member function calls boundingBox()
and retrieves the width value.
void IlvGraphic::w | ( | IlvDim | w | ) |
Sets the width value of the object.
This member function calls boundingBox()
and resize()
to set the width value.
w | The width value. |
|
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:
output | The the output file to be written to. |
DeclareTypeInfo()
. Implemented in IlvGraphicAdapter< ADAPTEE >, IlvGraphicAdapter< IlvCOMGraphicFacade >, and IlvDrawSelection.
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 of this object. void IlvGraphic::x | ( | IlvPos | x | ) |
Sets the x
coordinate value of the object.
This member function calls boundingBox()
and move()
to set the x
coordinate value.
x | The x 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. 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. |
|
virtual |
Checks whether this object is zoomable.
IlTrue
if the graphic object can be zoomed, and IlFalse
otherwise. IsZoomAllowed()
, AllowZoom()
. Reimplemented in IlvFixedSizeGraphic, IlvGraphicSet, IlvFilteredGraphic, IlvGraphicHandle, IlvZoomableMarker, IlvDrawSelection, IlvIcon, IlvMarker, IlvListLabel, IlvLabel, IlvZoomableIcon, and IlvZoomableLabel.
© Copyright 2016, 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.