Views
Foundation Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions | Static Public Member Functions
IlvGraphic Class Referenceabstract

Graphic class. More...

#include <ilviews/base/graphic.h>

Inheritance diagram for IlvGraphic:
IlvValueInterface IlvGraphicAdapter< ADAPTEE > IlvGraphicAdapter< IlvCOMGraphicFacade > IlvGraphicHandle IlvGraphicSet IlvSimpleGraphic IlvGraphicCOMAdapter IlvFilteredGraphic IlvFixedSizeGraphic IlvTransformedGraphic IlvSelector IlvArc IlvDrawSelection IlvEllipse IlvGadget IlvGauge IlvGraphicPath IlvIcon IlvLabel IlvLine IlvListLabel IlvMarker IlvPolyPoints IlvPolySelection IlvRectangle IlvScale IlvTimeScale

Public Member Functions

void addCallback (const IlSymbol *callbackType, const IlSymbol *callbackName, const IlSymbol *script=0)
 Adds a callback function to a callback list. More...
 
void addCallback (const IlSymbol *callbackType, IlvGraphicCallback callback)
 Adds a callback function to a callback list. More...
 
void addCallback (const IlSymbol *callbackType, IlvGraphicCallback callbackName, IlAny data)
 Adds a callback function to a callback list. More...
 
void addClassProperty (const IlSymbol *key, IlAny value)
 Adds a property to this object's class. More...
 
void addProperty (const IlSymbol *key, IlAny value)
 Adds a specific property to the object. More...
 
void addTag (const IlSymbol *tag)
 Adds a tag. More...
 
virtual void apply (IlvApplyObject function, IlAny arg)
 Applies a function to objects that compose another object. More...
 
IlBoolean applyAttribute (const char *attributeClassName, const char *value, IlAny checkData=0) const
 Applies attributes. More...
 
IlBoolean applyAttribute (const char *attributeClassName, IlFloat value, IlAny checkData=0) const
 Applies attributes. More...
 
IlBoolean applyAttribute (const char *attributeClassName, IlInt value, IlAny checkData=0) const
 Applies attributes. More...
 
virtual void applyReferences (IlvApplyObject function, IlAny arg)
 Applies a function to objects that are referenced by another object. More...
 
virtual void 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...
 
IlBoolean contains (const IlvPoint &p) const
 Checks whether a point is in the object. More...
 
virtual IlBoolean contains (const IlvPoint &p, const IlvPoint &tp, const IlvTransformer *t=0) const
 Checks whether a point is in the object. More...
 
virtual IlvGraphiccopy () const =0
 Copies this object. More...
 
void draw (IlvPort *dst, const IlvTransformer *t, const IlvRect *clip) const
 Draws a graphic object. More...
 
virtual void draw (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const =0
 Draws the 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
 Gets the main callback function. More...
 
IlvGraphicCallback getCallback (const IlSymbol *callbackType) const
 Gets a callback. More...
 
IlAny getCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName) const
 Gets a callback user data. More...
 
IlAny getCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback) const
 Gets a callback user data. More...
 
IlSymbolgetCallbackName () const
 Gets the symbol that identifies the main callback. More...
 
IlSymbolgetCallbackName (const IlSymbol *callbackType) const
 Gets the name of a 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 IlvGraphicgetChildAt (IlUInt index) const
 Returns the sub-object of the graphic object specified by index. More...
 
virtual IlvGraphicgetChildByName (const char *name) const
 Returns the sub-object of the graphic object specified by a name. More...
 
virtual IlUInt getChildCount () const
 Returns the number of children of this graphic object. More...
 
virtual IlInt getChildIndex (const IlvGraphic *object) const
 Returns the index of the specified sub-object in this graphic object. More...
 
virtual IlvGraphic *const * getChildren (IlUInt &count) const
 Returns an array containing the sub-objects of this graphic object. More...
 
virtual IlvClassInfogetClassInfo () const
 Gets class information. More...
 
IlAny getClassProperty (const IlSymbol *key, IlBoolean checkParent=IlFalse) const
 Retrieves the indicated property value in the class of this object. More...
 
IlAny getClientData () const
 Gets client data. More...
 
virtual const char * getDefaultInteractor () const
 Gets the name of the default interactor for this object. More...
 
virtual IlvGraphicHoldergetHolder () const
 Gets a pointer to an object's holder. More...
 
IlvInteractorgetInteractor () const
 Returns the interactor associated with the current object. More...
 
virtual IlUShort getLineWidth () const
 Retrieves the line width. More...
 
virtual IlvLookFeelHandlergetLookFeelHandler () const
 Returns the look & feel handler used by this object. More...
 
const char * getName () const
 Gets the name of the object. More...
 
IlvNamedPropertygetNamedProperty (const IlSymbol *name) const
 Gets a named property. More...
 
IlSymbolgetNextFocusGraphic () const
 Gets the next object in the focus chain. More...
 
IlSymbolgetPreviousFocusGraphic () const
 Gets the previous object in the focus chain. More...
 
IlAny getProperty (const IlSymbol *key) const
 Gets a property. More...
 
IlvSmartSetgetSmartSet () const
 Gets the smart set object containing this graphic object. More...
 
const IlSymbol *const * getTags (IlUInt &count) const
 Returns all the tags applied to this object. More...
 
IlvDim h () const
 Gets the height value of the object. More...
 
void h (IlvDim h)
 Sets the height value of the object. More...
 
IlBoolean hasCallback (const IlSymbol *callbackType, const IlSymbol *callbackName) const
 Checks whether a callback function is in a callback list. More...
 
IlBoolean hasCallback (const IlSymbol *callbackType, IlvGraphicCallback callback) const
 Checks whether a callback function is in a callback list. More...
 
IlBoolean hasCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName) const
 Checks whether a callback function has user data. More...
 
IlBoolean hasCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback) const
 Checks whether a callback function has user data. More...
 
const IlvClassInfohasClassProperty (const IlSymbol *key, IlBoolean s=IlFalse) const
 Checks for a class where the keyed property exists. More...
 
IlBoolean hasProperty (const IlSymbol *key) const
 Checks whether the object has a particular property. More...
 
IlBoolean hasTag (const IlSymbol *tag) const
 Checks whether the object has a specific tag. More...
 
IlBoolean inside (const IlvRect &r) const
 Determines whether a rectangle is inside the bounding box. More...
 
IlBoolean inside (const IlvRect &r, const IlvRect &tr, const IlvTransformer *t=0) const
 Determines whether an object with transformation applied is inside the bounding box. More...
 
virtual IlBoolean inside (const IlvRegion &r, const IlvTransformer *t=0) const
 Determines whether an object with transformation applied is inside the bounding box. More...
 
IlBoolean intersects (const IlvRect &r) const
 Checks whether a rectangle intersects the bounding box. More...
 
IlBoolean intersects (const IlvRect &r, const IlvRect &tr, const IlvTransformer *t=0) const
 Checks whether a rectangle intersects the bounding box with transformation applied. More...
 
virtual IlBoolean intersects (const IlvRegion &r, const IlvTransformer *t=0) const
 Checks whether a region intersects the bounding box with transformation applied. More...
 
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...
 
void move (const IlvPoint &p)
 Moves the graphic object. More...
 
virtual void move (IlvPos x, IlvPos y)
 Moves the graphic object. More...
 
void moveResize (const IlvRect &size)
 Moves and resizes a graphic object. More...
 
virtual IlBoolean needsInputContext () const
 Indicates whether the graphic instance can connect to an input method for locale dependent input. More...
 
virtual void print (std::ostream &out, int level=0) const
 Prints for debugging purposes. More...
 
void removeCallback (const IlSymbol *callbackType, const IlSymbol *callbackName)
 Removes a callback function from a callback list. More...
 
void removeCallback (const IlSymbol *callbackType, IlvGraphicCallback callback)
 Removes a callback function from a callback list. More...
 
IlBoolean removeClassProperty (const IlSymbol *key)
 Removes a property from this object's class. More...
 
void removeInteractor ()
 Removes the interactor from the current object. More...
 
IlvNamedPropertyremoveNamedProperty (IlSymbol *name)
 Removes a named property from the object. More...
 
IlBoolean removeProperty (const IlSymbol *key)
 Removes a property from the object. More...
 
void removeTag (const IlSymbol *tag)
 Removes a tag. More...
 
IlBoolean replaceClassProperty (const IlSymbol *key, IlAny value)
 Replaces a property in this object's class. More...
 
IlBoolean replaceProperty (const IlSymbol *key, IlAny value)
 Replaces a property. More...
 
virtual void resize (IlvDim newW, IlvDim newH)
 Resizes a graphic object. More...
 
virtual void rotate (const IlvPoint &center, IlFloat angle)
 Rotates a graphic object. More...
 
virtual void scale (IlFloat zoomX, IlFloat zoomY)
 Scales the graphic object. More...
 
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, const IlSymbol *callbackName, const IlSymbol *script=0)
 Removes all previously set callbacks. More...
 
void setCallback (const IlSymbol *callbackType, IlvGraphicCallback callback)
 Sets a new callback. More...
 
void setCallback (const IlSymbol *callbackType, IlvGraphicCallback callbackName, IlAny data)
 Removes all previously set callbacks. More...
 
void setCallback (IlvGraphicCallback callback, IlAny data)
 Sets the main callback function. More...
 
void setCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName, IlAny data)
 Sets the callback user data for a callback function. More...
 
void setCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback, IlAny data)
 Sets the callback user data for a callback function. More...
 
void setCallbackName (const IlSymbol *callbackName)
 Sets the symbol that identifies the main callback. More...
 
void setClientData (IlAny clientData)
 Sets client data. More...
 
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 (const char *name)
 Attaches an interactor to this graphic object. More...
 
IlBoolean setInteractor (IlvInteractor *inter)
 Attaches an interactor to the current object. More...
 
void setLastFocusGraphic ()
 Sets the object to be last in the focus chain.
 
virtual void 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...
 
IlvNamedPropertysetNamedProperty (IlvNamedProperty *property)
 Sets a named property on the object. More...
 
virtual void setNeedsInputContext (IlBoolean val)
 Specifies whether the graphic object should have locale dependent input. More...
 
void setNextFocusGraphic (IlSymbol *name)
 Sets the object to be next in the focus chain. More...
 
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 IlvValuequeryValue (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 IlvClassInfoClassInfo () 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 IlvClassInfoHasProperty (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 IlvGraphicread (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...
 

Detailed Description

Graphic class.

Library: views

IlvGraphic is an abstract base class that:

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.

See also
IlvInputFile, IlvOutputFile, IlvRegisterClass(), IlvNamedProperty.

Accessors\nAccessors provide a scriptable and uniform way to inspect and modify an object by using its base class methods <tt>IlvValueInterface::queryValue()</tt>, <tt>IlvValueInterface::queryValues()</tt>, <tt>IlvValueInterface::changeValue()</tt>, <tt>IlvValueInterface::changeValues()</tt>.\n\n\nThis class inherits the accessors of its superclass \c IlvValueInterface and adds the following ones:

Data accessors

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()

Method accessors

Name Return type Equivalent methods
move(IlvPoint position) Void move(const IlvPoint& position). See [2] below.
reshape(IlvRect size) Void moveResize(const IlvRect& size). See [2] below.
translate(Int dx, Int dy) Void translate(IlvPos dx, IlvPos dy). See [2] below.
boundingBox() IlvRect boundingBox(IlvRect&, const IlvTransformer*) const
contains(IlvPoint point) Boolean contains(const IlvPoint& point) const
intersects(IlvRect rect) Boolean intersects(const IlvRect& rect) const
inside(IlvRect rect) Boolean inside(const IlvRect& rect) const
setCallback(String type, String callback, String language) Void setCallback(const IlSymbol* t, const IlSymbol* c, const IlSymbol* l). See [3] below.
copy() Object copy()
getChildAt(Int index) Object getChildAt(IlUInt index) const
getChildByName(String name) Object getChildByName(const char* name) const
getChildIndex(Object object) Int getChildIndex(const IlvGraphic* object) const
getProperty(String name) Object getNamedProperty(const IlSymbol* n) const. See [4] below.
removeProperty(Object property) Void removeNamedProperty(IlSymbol* p). See [5] below.
setProperty(Object property) Void setNamedProperty(IlvNamedProperty* property)

[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

setCallback(IlGetSymbol(type), IlGetSymbol(callback), IlGetSymbol(language));

[4]: the equivalent code is

getNamedProperty(IlGetSymbol(name));

[5]: the equivalent code is

removeNamedProperty(property->getSymbol());

Member Function Documentation

◆ addCallback() [1/3]

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.

Parameters
callbackTypeThe callback type.
callbackNameThe name of the callback.
scriptThe 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.
See also
IlvScriptLanguage, IlvGraphicHolder::registerCallback().

◆ addCallback() [2/3]

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.

Parameters
callbackTypeThe callback type.
callbackThe callback function.

◆ addCallback() [3/3]

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.

Parameters
callbackTypeThe callback type.
callbackNameThe name of the callback.
dataA user parameter passed to the callback.

◆ addClassProperty()

void IlvGraphic::addClassProperty ( const IlSymbol key,
IlAny  value 
)

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.

Parameters
keyThe key to be associated.
valueThe value to be associated.

◆ addProperty()

void IlvGraphic::addProperty ( const IlSymbol key,
IlAny  value 
)

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.

Parameters
keyThe key to be associated.
valueThe value to be associated.

◆ AddProperty()

static void IlvGraphic::AddProperty ( const IlSymbol key,
IlAny  value 
)
static

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.

Parameters
keyThe key to be associated.
valueThe value to be associated.

◆ addTag()

void IlvGraphic::addTag ( const IlSymbol tag)

Adds a tag.

Adds the tag tag to this object.

Parameters
tagThe tag to be added.

◆ AddToCallbackTypeList()

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:

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;
}
Parameters
countThe number of callbacks in names.
namesAn array containing the names of the callbacks.
typesAn array containing the types of the callbacks.
newNameThe name of the new callback to be added.
newTypeThe type of the new callback to be added.

◆ AllowZoom()

static void IlvGraphic::AllowZoom ( IlBoolean  az)
static

Sets or inhibits zooming.

A static member function that lets you allow or inhibit zooming behavior.

Parameters
azIlTrue if zooming is allowed, or IlFalse otherwise.

◆ apply()

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 composite one like an instance of IlvGraphicSet or IlvGraphicHandle. The IlvApplyObject function successively receives each of the components as well as the arg parameter.

Parameters
functionThe function to be applied.
argThe argument sent to function.

Reimplemented in IlvGraphicHandle, IlvGraphicSet, IlvPolySelection, and IlvDrawSelection.

◆ applyAttribute() [1/3]

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.

Parameters
attributeClassNameThe name of the class containing the object.
valueThe attribute value
checkDataA user parameter, or 0 if none.

◆ applyAttribute() [2/3]

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.

Parameters
attributeClassNameThe name of the class containing the object.
valueThe attribute value
checkDataA user parameter, or 0 if none.

◆ applyAttribute() [3/3]

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.

Parameters
attributeClassNameThe name of the class containing the object.
valueThe attribute value
checkDataA user parameter, or 0 if none.

◆ applyReferences()

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.

Parameters
functionThe function to be applied.
argAn argument parameter.

Reimplemented in IlvGraphicHandle, IlvGraphicSet, and IlvDrawSelection.

◆ applyResources()

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
Parameters
storageNameThe storage name.
storageClassNameThe generic name of the storage instance.
objectNameThe object name.
objectClassNameThe generic name of the object class.
displayThe display where this object is created.

Reimplemented in IlvSimpleGraphic.

◆ applyTransform()

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.

Note
applyTransform() is one of the most important method to be rewritten for classes derived from IlvGraphic, since it is called by the resize(), move(), moveResize(), scale(), etc., methods.
Parameters
tThe transformer value. If 0, no transformation is performed.

Implemented in IlvGraphicCOMAdapter, IlvZoomableIcon, IlvDrawSelection, IlvRectangularScale, IlvScale, IlvViewRectangle, IlvRectangle, IlvPolySelection, IlvGraphicPath, IlvLine, IlvIcon, IlvFixedSizeGraphic, IlvTransformedGraphic, IlvGraphicHandle, IlvGauge, IlvEllipse, IlvCircularScale, IlvArc, IlvZoomableLabel, IlvTimeScale, IlvGraphicSet, IlvPolyPoints, IlvMarker, IlvListLabel, IlvLabel, IlvFilteredGraphic, and IlvGadget.

◆ boundingBox()

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.

Parameters
bboxThe bounding box to be set.
tA transformer value or 0 if there is no transformation.

Implemented in IlvGraphicCOMAdapter, IlvRectangle, IlvGraphicPath, IlvArrowLine, IlvLine, IlvIcon, IlvEllipse, IlvFilledArc, IlvArc, IlvZoomableIcon, IlvTimeScale, IlvReshapeSelection, IlvDrawSelection, IlvPolySelection, IlvFixedSizeGraphic, IlvTransformedGraphic, IlvGraphicHandle, IlvPolyPointsSelection, IlvScale, IlvGauge, IlvRectangularScale, IlvReliefLine, IlvPolyPoints, IlvZoomableMarker, IlvMarker, IlvRectangularGauge, IlvCircularScale, IlvCircularGauge, IlvZoomableLabel, IlvGraphicSet, IlvArrowPolyline, IlvListLabel, IlvLabel, IlvFilteredGraphic, and IlvGadget.

◆ callCallbacks()

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.

◆ ClassInfo()

static IlvClassInfo* IlvGraphic::ClassInfo ( ) const
static

Gets class information.

Returns a pointer to the IlvClassInfo object associated with this object's class.

Returns
A pointer to the class information object of the class of this object.

◆ className()

const char* IlvGraphic::className ( ) const

Returns the class name of an object.

This method is equivalent to getClassInfo()->getClassName().

Returns
The class name of the object. For example, for an IlvRectangle object, the className function returns "IlvRectangle".

◆ computeFocusRegion()

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()).

Parameters
rThe region that is updated.
tThe transformer value. If 0, no transformation is performed.
Returns
The computed region.

Reimplemented in IlvFixedSizeGraphic, IlvTransformedGraphic, IlvGraphicHandle, and IlvSelector.

◆ contains() [1/2]

IlBoolean IlvGraphic::contains ( const IlvPoint p) const

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().

Parameters
pThe point to be tested.
Returns
IlTrue when the point p lies inside the outline of the object.

◆ contains() [2/2]

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.

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

Reimplemented in IlvGraphicCOMAdapter, IlvZoomableIcon, IlvFilledSpline, IlvClosedSpline, IlvSpline, IlvFilledRectangle, IlvRectangle, IlvPolySelection, IlvGraphicPath, IlvIcon, IlvFixedSizeGraphic, IlvTransformedGraphic, IlvGraphicHandle, IlvFilledEllipse, IlvEllipse, IlvCircularScale, IlvCircularGauge, IlvDrawSelection, IlvLine, IlvFilledArc, IlvArc, IlvPolygon, IlvPolyline, IlvReliefLine, IlvZoomableLabel, IlvGraphicSet, IlvListLabel, IlvLabel, IlvFilteredGraphic, IlvGadget, IlvZoomableMarker, and IlvMarker.

◆ copy()

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.

Returns
A copy of the object.
See also
IlvPredefinedIOMembers().

◆ draw() [1/2]

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.

Parameters
dstThe destination port.
tThe transformer value.
clipThe clipping region, which is a rectangle.

◆ draw() [2/2]

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

◆ drawFocus()

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().

Parameters
dstThe destination port.
paletteThe palette of the object.
tThe transformer value. If 0, no transformation is performed.
clipThe clipping region.

Reimplemented in IlvFixedSizeGraphic, IlvTransformedGraphic, IlvGraphicHandle, IlvSelector, and IlvGauge.

◆ getAccessors()

virtual void IlvGraphic::getAccessors ( const IlSymbol *const **  names,
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. 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.

Parameters
namesThe array of symbols returned by the method. Each symbol is the name of an accessor.
typesThe array of types returned by the method. Each value is the type of an accessor.
countThe number of items in the arrays names and types.

Reimplemented from IlvValueInterface.

Reimplemented in IlvGraphicCOMAdapter, and IlvGraphicHandle.

◆ getAlpha()

virtual IlvIntensity IlvGraphic::getAlpha ( ) const
virtual

Retrieves the alpha component.

Returns
The alpha component of the object.

Reimplemented in IlvGraphicSet, IlvGraphicHandle, IlvSimpleGraphic, and IlvGadget.

◆ getAntialiasingMode()

virtual IlvAntialiasingMode IlvGraphic::getAntialiasingMode ( ) const
virtual

Retrieves the anti-aliasing mode.

Returns
The anti-aliasing mode of the object.

Reimplemented in IlvGraphicInstance, IlvGraphicHandle, IlvSimpleGraphic, and IlvGadget.

◆ getCallback() [1/2]

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.

Returns
A pointer to the main callback function of the graphic object.

◆ getCallback() [2/2]

IlvGraphicCallback IlvGraphic::getCallback ( const IlSymbol callbackType) const

Gets a callback.

Parameters
callbackTypeThe callback type.
Returns
The function pointer of the first callback function in the callback list of type callbackType.

◆ getCallbackData() [1/2]

IlAny IlvGraphic::getCallbackData ( const IlSymbol callbackType,
const IlSymbol callbackName 
) const

Gets a callback user data.

Parameters
callbackTypeThe callback type.
callbackNameThe name of the callback.
Returns
The user data associated with the callback name callbackName that must be stored in the callback list of type callbackType, or 0 if the callback cannot be found.

◆ getCallbackData() [2/2]

IlAny IlvGraphic::getCallbackData ( const IlSymbol callbackType,
IlvGraphicCallback  callback 
) const

Gets a callback user data.

Parameters
callbackTypeThe callback type.
callbackThe callback function.
Returns
The user data associated with the callback function callback that must be stored in the callback list of type callbackType, or 0 if the callback cannot be found.

◆ getCallbackName() [1/2]

IlSymbol* IlvGraphic::getCallbackName ( ) const

Gets the symbol that identifies the main callback.

Returns
The symbol that identifies the main callback of the graphic object.

◆ getCallbackName() [2/2]

IlSymbol* IlvGraphic::getCallbackName ( const IlSymbol callbackType) const

Gets the name of a callback.

Parameters
callbackTypeThe callback type.
Returns
The name of the first callback name in the callback list of type callbackType.

◆ getCallbackTypes()

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.

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

Reimplemented in IlvGadget.

◆ getChildAt()

virtual IlvGraphic* IlvGraphic::getChildAt ( IlUInt  index) const
virtual

Returns the sub-object of the graphic object specified by index.

Parameters
indexThe index of the object being searched.
Returns
The sub-object of the graphic object with index index. If the index is not valid, 0 is returned.

Reimplemented in IlvGraphicSet.

◆ getChildByName()

virtual IlvGraphic* IlvGraphic::getChildByName ( const char *  name) const
virtual

Returns the sub-object of the graphic object specified by a name.

Parameters
nameThe name of the object being searched.
Returns
The sub-object of the graphic object whose name is name. If this graphic object does not contain a sub-object with name as name, 0 is returned.

Reimplemented in IlvGraphicSet.

◆ getChildCount()

virtual IlUInt IlvGraphic::getChildCount ( ) const
virtual

Returns the number of children of this graphic object.

Returns
The number of children of this graphic object.

Reimplemented in IlvGraphicSet.

◆ getChildIndex()

virtual IlInt IlvGraphic::getChildIndex ( const IlvGraphic object) const
virtual

Returns the index of the specified sub-object in this graphic object.

Parameters
objectThe sub-object whose index is being searched for.
Returns
The index of the sub-object in this graphic object, or -1 if object is not a sub-object of this graphic object.

Reimplemented in IlvGraphicSet.

◆ getChildren()

virtual IlvGraphic* const* IlvGraphic::getChildren ( IlUInt count) const
virtual

Returns an array containing the sub-objects of this graphic object.

Parameters
countThe size of the returned array.
Returns
An array containing the sub-objects of this graphic object. This array is stored in an IlPoolOf(Pointer) and should not be deleted or modified.
See also
IlvGraphicSet, IlvGraphicHandle.

◆ getClassInfo()

virtual IlvClassInfo* IlvGraphic::getClassInfo ( ) const
virtual

Gets class information.

Returns a pointer to the IlvClassInfo object associated with this object's class.

Returns
A pointer to the class information object of the class of this object.

Reimplemented from IlvValueInterface.

◆ getClassProperty()

IlAny IlvGraphic::getClassProperty ( const IlSymbol key,
IlBoolean  checkParent = IlFalse 
) 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.

Parameters
keyThe key with which the property value is associated.
checkParentIlTrue specifies iterative search on parent classes.
Returns
The given property value when it can be found in the class of this object. 0 is returned when no property name matches the key parameter.

◆ getClientData()

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.

Returns
The object's client data.

◆ getDefaultInteractor()

virtual const char* IlvGraphic::getDefaultInteractor ( ) const
virtual

Gets the name of the default interactor for this object.

Returns
A string that identifies the object interactor that is likely to be associated with this graphic class. If it returns 0, then there is no default interactor for this graphic class.

Reimplemented in IlvGraphicCOMAdapter, and IlvGauge.

◆ getHolder()

virtual IlvGraphicHolder* IlvGraphic::getHolder ( ) const
virtual

Gets a pointer to an object's holder.

Returns
A pointer to the IlvGraphicHolder object in which the graphic is located.

Reimplemented in IlvGraphicHandle.

◆ getInteractor()

IlvInteractor* IlvGraphic::getInteractor ( ) const

Returns the interactor associated with the current object.

Returns
The interactor associated with the current object.

◆ getLineWidth()

virtual IlUShort IlvGraphic::getLineWidth ( ) const
virtual

Retrieves the line width.

Returns
The line width of the object.

Reimplemented in IlvGraphicSet, IlvGraphicInstance, IlvGraphicHandle, and IlvSimpleGraphic.

◆ getLookFeelHandler()

virtual IlvLookFeelHandler* IlvGraphic::getLookFeelHandler ( ) const
virtual

Returns the look & feel handler used by this object.

The default implementation returns 0.

Returns
The look & feel handler used by this object.

Reimplemented in IlvGraphicHandle, IlvSimpleGraphic, and IlvGadget.

◆ getName()

const char* IlvGraphic::getName ( ) const
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.

Returns
The name of the object.

Reimplemented from IlvValueInterface.

◆ getNamedProperty()

IlvNamedProperty* IlvGraphic::getNamedProperty ( const IlSymbol name) const

Gets a named property.

Parameters
nameThe name of the property.
Returns
A pointer to the named property object associated with the current object having the name name. Returns 0 if no named property matches the name

◆ getNextFocusGraphic()

IlSymbol* IlvGraphic::getNextFocusGraphic ( ) const

Gets the next object in the focus chain.

Returns
A symbol that identifies the next object in the focus chain.

◆ getPreviousFocusGraphic()

IlSymbol* IlvGraphic::getPreviousFocusGraphic ( ) const

Gets the previous object in the focus chain.

Returns
A symbol that identifies the previous object in the focus chain.

◆ getProperty()

IlAny IlvGraphic::getProperty ( const IlSymbol key) const

Gets a property.

Parameters
keyThe key whose value is to be returned.
Returns
The given property value when it can be found. 0 is returned when no property name matches the key parameter.

◆ GetProperty()

static IlAny IlvGraphic::GetProperty ( const IlSymbol key,
IlBoolean  checkSuperClass = IlFalse 
)
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.

Parameters
keyThe key with which the property value is associated.
checkSuperClassIlTrue specifies iterative search on superclasses.
Returns
The property value associated with the proper name key, or 0.

◆ getSmartSet()

IlvSmartSet* IlvGraphic::getSmartSet ( ) const

Gets the smart set object containing this graphic object.

Returns
The IlvSmartSet object in which this graphic object is contained or 0 if there is none.

◆ getTags()

const IlSymbol* const* IlvGraphic::getTags ( IlUInt count) const

Returns all the tags applied to this object.

Parameters
countthe number of tags for this object (which is also the size of the returned array).
Returns
An array containing the pointers to all the tags for this object. This array is stored in an 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).
See also
addTag().

◆ h() [1/2]

IlvDim IlvGraphic::h ( ) const

Gets the height value of the object.

This member function calls boundingBox() and retrieves the height value.

Returns
The height value.

◆ h() [2/2]

void IlvGraphic::h ( IlvDim  h)

Sets the height value of the object.

This member function calls boundingBox() and resize() to set the height value.

Parameters
hThe height value.

◆ hasCallback() [1/2]

IlBoolean IlvGraphic::hasCallback ( const IlSymbol callbackType,
const IlSymbol callbackName 
) const

Checks whether a callback function is in a callback list.

Parameters
callbackTypeThe callback type.
callbackNameThe name of the callback.
Returns
IlTrue if the callback name callbackName is stored in the callback list of type callbackType, or IlFalse if it is not.

◆ hasCallback() [2/2]

IlBoolean IlvGraphic::hasCallback ( const IlSymbol callbackType,
IlvGraphicCallback  callback 
) const

Checks whether a callback function is in a callback list.

Parameters
callbackTypeThe callback type.
callbackThe callback function.
Returns
IlTrue if the callback function callback is stored in the callback list of type callbackType, or IlFalse if not.

◆ hasCallbackData() [1/2]

IlBoolean IlvGraphic::hasCallbackData ( const IlSymbol callbackType,
const IlSymbol callbackName 
) const

Checks whether a callback function has user data.

Parameters
callbackTypeThe callback type.
callbackNameThe name of the callback.
Returns
IlTrue if the callback name callbackName, stored in the callback list of type callbackType, has associated user data.

◆ hasCallbackData() [2/2]

IlBoolean IlvGraphic::hasCallbackData ( const IlSymbol callbackType,
IlvGraphicCallback  callback 
) const

Checks whether a callback function has user data.

Parameters
callbackTypeThe callback type.
callbackThe callback function.
Returns
IlTrue if the callback function callback, stored in the callback list of type callbackType, has associated user data.

◆ hasClassProperty()

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.

Parameters
keyThe key with which the property value is associated.
sIlTrue specifies iterative search on superclasses, until a match is found.
Returns
A pointer to the IlvClassInfo that represents the class where the key property exists, or 0 if the property can not be found.

◆ hasProperty()

IlBoolean IlvGraphic::hasProperty ( const IlSymbol key) const

Checks whether the object has a particular property.

Parameters
keyThe key to be tested.
Returns
A 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.

◆ HasProperty()

static const IlvClassInfo* IlvGraphic::HasProperty ( const IlSymbol key,
IlBoolean  checkSuperClass = IlFalse 
)
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.

Parameters
keyThe key with which the property value is associated.
checkSuperClassIlTrue specifies iterative search on superclasses.
Returns
A pointer to the IlvClassInfo that indicates a class where the key property exists, or 0.

◆ hasTag()

IlBoolean IlvGraphic::hasTag ( const IlSymbol tag) const

Checks whether the object has a specific tag.

Parameters
tagThe tag to be tested.
Returns
IlTrue if this object has the tag tag.

◆ inside() [1/3]

IlBoolean IlvGraphic::inside ( const IlvRect r) const

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)` .

Parameters
rThe rectangle to be tested.
Returns
IlTrue when the rectangle r lies completely inside the bounding box of the object and

◆ inside() [2/3]

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.

Parameters
rThe rectangle to be tested.
trThe transformed rectangle to be tested.
tA transformer value, or 0 if there is no transformation.
Returns
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.

◆ inside() [3/3]

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.

Parameters
rThe region to be tested.
tA transformer value, or 0 if there is no transformation.
Returns
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, IlvGraphicHandle, IlvZoomableIcon, IlvIcon, IlvZoomableLabel, IlvGraphicSet, IlvListLabel, IlvLabel, and IlvFilteredGraphic.

◆ intersects() [1/3]

IlBoolean IlvGraphic::intersects ( const IlvRect r) const

Checks whether a rectangle intersects the bounding box.

Checks whether a rectangle intersects the bounding box.

Parameters
rThe rectangle to be tested.
Returns
IlTrue when the rectangle r overlaps the bounding box of the object, and IlFalse when the rectangle r does not overlap the bounding box.

◆ intersects() [2/3]

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.

Parameters
rThe rectangle to be tested.
trThe transformed rectangle to be tested.
tA transformer value, or 0 if there is no transformation.
Returns
IlTrue when the rectangle r overlaps the bounding box of the object, and IlFalse when the rectangle r does not overlap the bounding box.

◆ intersects() [3/3]

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.

Parameters
rThe region to be tested.
tA transformer value, or 0 if there is no transformation.
Returns
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, IlvGraphicHandle, IlvZoomableIcon, IlvIcon, IlvZoomableLabel, IlvGraphicSet, IlvListLabel, IlvLabel, and IlvFilteredGraphic.

◆ invert()

virtual void IlvGraphic::invert ( IlBoolean  temp = IlFalse)
virtual

Highlights the object.

Highlights the object. It is implemented as swapping the foreground and background colors of the object, but can have other implementations in derived subclasses. The parameter temp controls the way you toggle between the background and the foreground. If temp is omitted or is IlFalse, then a new palette is computed by calling the IlvDisplay::getPalette() method. If temp is IlTrue, the object palette is inverted, and thus all the objects referencing this palette will be affected.

Parameters
tempIf IlTrue, highlights the object.

Reimplemented in IlvGraphicSet, IlvReliefRectangle, IlvReliefGauge, IlvGauge, IlvFilteredGraphic, IlvSimpleGraphic, IlvGadget, IlvReliefLine, IlvOutlinePolygon, IlvGraphicInstance, and IlvGraphicHandle.

◆ isFirstFocusGraphic()

IlBoolean IlvGraphic::isFirstFocusGraphic ( ) const

Checks whether the object is first in the focus chain.

Returns
IlTrue if this object is first in the focus chain. Otherwise, returns IlFalse.

◆ isFocusable()

IlBoolean IlvGraphic::isFocusable ( ) const

Checks whether the object can receive the keyboard focus.

Returns
IlTrue if the object should receive the keyboard focus and IlFalse otherwise.
See also
IlvGadget, IlvGraphic::setFocusable()

◆ isInSmartSet()

IlBoolean IlvGraphic::isInSmartSet ( ) const

Checks whether a graphic object belongs to a smart set.

Returns
IlTrue if the graphic object belongs to an IlvSmartSet.

◆ isLastFocusGraphic()

IlBoolean IlvGraphic::isLastFocusGraphic ( ) const

Checks whether the object is last in the focus chain.

Returns
IlTrue if this object is last in the focus chain. Otherwise, returns IlFalse.

◆ isSensitive()

IlBoolean IlvGraphic::isSensitive ( ) const

Checks whether the object is sensitive.

Returns
IlTrue if the object is sensitive; that is, if the object responds to user events. It returns IlFalse if the object is not sensitive.

◆ isSubtypeOf() [1/2]

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

Parameters
parentClassA string representing the parent class.
Returns
Either 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.

◆ isSubtypeOf() [2/2]

IlBoolean IlvGraphic::isSubtypeOf ( const IlvClassInfo classInfo) const

Checks whether this object's class is a subclass.

This method is equivalent to getClassInfo()->isSubtypeOf(classInfo).

Parameters
classInfoThe name of a class on which the object's class is tested.
Returns
Either IlTrue or IlFalse, depending on whether or not this object's class is a subclass of the class indicated by classInfo.

◆ IsZoomAllowed()

static IlBoolean IlvGraphic::IsZoomAllowed ( )
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.

◆ move() [1/2]

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.

Parameters
pThe position of the point to be moved to.

◆ move() [2/2]

virtual void IlvGraphic::move ( IlvPos  x,
IlvPos  y 
)
virtual

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().

Parameters
xThe x coordinate position.
yThe y coordinate position.

Reimplemented in IlvTimeScale.

◆ moveResize()

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().

Parameters
sizeThe new size of the bounding box.

◆ needsInputContext()

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.

Returns
The locale dependent input state of the graphic object.
See also
setNeedsInputContext.

◆ print()

virtual void IlvGraphic::print ( std::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.

Parameters
outThe output stream.
levelThe debugging level. If 0, subobjects are not described.

◆ read()

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:

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:

{
IlvPoint pos;
file.getStream() >> pos; // Read the position field
return new IlvLabel(pal->getDisplay(), pos,
IlvReadString(file.getStream()), pal);
}
Parameters
fileThe name of the file to be read from.
paletteThe name of the palette for the object.
See also
DeclareTypeInfoRO(), DeclareTypeInfo(), IlvPredefinedIOMembers().
Note
The read() method is not capitalized like other static methods so that it is consistent with the write() method.

◆ removeCallback() [1/2]

void IlvGraphic::removeCallback ( const IlSymbol callbackType,
const IlSymbol callbackName 
)

Removes a callback function from a callback list.

Removes the callback named callbackName from the callback list of type callbackType.

Parameters
callbackTypeThe callback type.
callbackNameThe name of the callback.

◆ removeCallback() [2/2]

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.

Parameters
callbackTypeThe callback type.
callbackThe callback function.

◆ removeClassProperty()

IlBoolean IlvGraphic::removeClassProperty ( const IlSymbol key)

Removes a property from this object's class.

Removes the indicated property from the class of this object.

Parameters
keyThe key property to be removed.
Returns
IlTrue if the key property was actually found, or IlFalse otherwise.

◆ removeInteractor()

void IlvGraphic::removeInteractor ( )

Removes the interactor from the current object.

Calling this method is equivalent to: setInteractor(((IlvInteractor*)0).

◆ removeNamedProperty()

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.

Parameters
nameThe named property to be removed.
Returns
A pointer to the named property object that was removed.

◆ removeProperty()

IlBoolean IlvGraphic::removeProperty ( const IlSymbol key)

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.

Parameters
keyThe key property to be removed.

◆ RemoveProperty()

static IlBoolean IlvGraphic::RemoveProperty ( const IlSymbol key)
static

Removes a property from this object's class.

This static function removes the indicated property to the class of this object.

Parameters
keyThe key property to be removed.
Returns
IlTrue if the key property was actually found, or IlFalse otherwise.

◆ removeTag()

void IlvGraphic::removeTag ( const IlSymbol tag)

Removes a tag.

Removes the tag tag of this object.

Parameters
tagThe tag to be removed.

◆ replaceClassProperty()

IlBoolean IlvGraphic::replaceClassProperty ( const IlSymbol key,
IlAny  value 
)

Replaces a property in this object's class.

Replaces the indicated property value in the class of this object.

Parameters
keyThe key to be replaced.
valueThe value to be replaced.
Returns
IlTrue if the key property was actually found, or IlFalse otherwise.

◆ replaceProperty()

IlBoolean IlvGraphic::replaceProperty ( const IlSymbol key,
IlAny  value 
)

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.

Parameters
keyThe key to be replaced.
valueThe value to be replaced.

◆ ReplaceProperty()

static IlBoolean IlvGraphic::ReplaceProperty ( const IlSymbol key,
IlAny  value 
)
static

Replaces a property in this object's class.

This static function replaces the indicated property value to the class of this object.

Parameters
keyThe key to be replaced.
valueThe value to be replaced.
Returns
IlTrue if the key property was actually found, or IlFalse otherwise.

◆ resize()

virtual void IlvGraphic::resize ( IlvDim  newW,
IlvDim  newH 
)
virtual

Resizes a graphic object.

Resizes the object giving it the new dimensions newW and newH. The default implementation calls the member function scale().

Parameters
newWThe new width dimension.
newHThe new height dimension.

◆ rotate()

virtual void IlvGraphic::rotate ( const IlvPoint center,
IlFloat  angle 
)
virtual

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().

Parameters
centerThe center point of rotation.
angleThe angle to be rotated.

Reimplemented in IlvEllipse, and IlvArc.

◆ scale()

virtual void IlvGraphic::scale ( IlFloat  zoomX,
IlFloat  zoomY 
)
virtual

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.

Parameters
zoomXThe x coordinate zooming factor.
zoomYThe y coordinate zooming factor.

◆ setAlpha()

virtual void IlvGraphic::setAlpha ( IlvIntensity  alpha)
virtual

Sets the alpha value of the object.

Parameters
alphaThe new alpha value.

Reimplemented in IlvShadowRectangle, IlvGraphicSet, IlvReliefRectangle, IlvReliefLine, IlvGraphicPath, IlvOutlinePolygon, IlvSimpleGraphic, IlvGadget, IlvGraphicHandle, IlvReliefGauge, and IlvGauge.

◆ setAntialiasingMode()

virtual void IlvGraphic::setAntialiasingMode ( IlvAntialiasingMode  mode)
virtual

Sets the anti-aliasing mode of the object.

Parameters
modeThe new anti-aliasing mode.

Reimplemented in IlvShadowRectangle, IlvGraphicSet, IlvReliefRectangle, IlvReliefLine, IlvGraphicPath, IlvOutlinePolygon, IlvFilteredGraphic, IlvSimpleGraphic, IlvGadget, IlvGraphicInstance, IlvGraphicHandle, IlvReliefGauge, and IlvGauge.

◆ setArcMode()

virtual void IlvGraphic::setArcMode ( IlvArcMode  mode)
virtual

Sets the arc mode of the object.

Parameters
modeThe new arc mode.

Reimplemented in IlvGraphicSet, IlvReliefRectangle, IlvFilteredGraphic, IlvSimpleGraphic, IlvGadget, IlvGraphicInstance, and IlvGraphicHandle.

◆ setBackground()

virtual void IlvGraphic::setBackground ( IlvColor background)
virtual

Sets the background color of the object.

Sets the background color of the object.

Parameters
backgroundThe new background color.

Reimplemented in IlvShadowRectangle, IlvReliefLine, IlvGraphicInstance, IlvGraphicHandle, IlvGraphicPath, IlvGraphicSet, IlvReliefRectangle, IlvViewRectangle, IlvOutlinePolygon, IlvGauge, IlvFilteredGraphic, IlvSimpleGraphic, and IlvGadget.

◆ setCallback() [1/4]

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*).

Parameters
callbackTypeThe callback type.
callbackNameThe name of the callback.
scriptThe 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.
See also
IlvScriptLanguage, IlvGraphicHolder::registerCallback().

◆ setCallback() [2/4]

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

Parameters
callbackTypeThe callback type.
callbackThe callback function.

◆ setCallback() [3/4]

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

Parameters
callbackTypeThe callback type.
callbackNameThe name of the callback.
dataA user parameter passed to the callback.

◆ setCallback() [4/4]

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.

Parameters
callbackThe callback function.
dataA user parameter passed to the callback.

◆ setCallbackData() [1/2]

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.

Parameters
callbackTypeThe callback type.
callbackNameThe name of the callback.
dataA user parameter passed to the callback.

◆ setCallbackData() [2/2]

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.

Parameters
callbackTypeThe callback type.
callbackThe callback function.
dataA user parameter passed to the callback.

◆ setCallbackName()

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.

Parameters
callbackNameThe callback name.

◆ setClientData()

void IlvGraphic::setClientData ( IlAny  clientData)

Sets client data.

Sets the client data of the graphic object to the value of clientData.

Parameters
clientDataThe client data value to be set.

◆ setColorPattern()

virtual void IlvGraphic::setColorPattern ( IlvColorPattern pattern)
virtual

Sets the color pattern of the object.

Sets the color pattern of the object.

Parameters
patternThe new color pattern.

Reimplemented in IlvRectangularGauge, IlvGraphicInstance, IlvGraphicHandle, IlvGraphicSet, IlvReliefRectangle, IlvFilteredGraphic, IlvSimpleGraphic, and IlvGadget.

◆ setFillRule()

virtual void IlvGraphic::setFillRule ( IlvFillRule  rule)
virtual

Sets the fill rule of the object.

Parameters
ruleThe new fill rule.

Reimplemented in IlvGraphicSet, IlvReliefRectangle, IlvFilteredGraphic, IlvSimpleGraphic, IlvGadget, IlvGraphicInstance, and IlvGraphicHandle.

◆ setFillStyle()

virtual void IlvGraphic::setFillStyle ( IlvFillStyle  style)
virtual

Sets the fill style of the object.

Parameters
styleThe new fill style.

Reimplemented in IlvGraphicSet, IlvReliefRectangle, IlvFilteredGraphic, IlvSimpleGraphic, IlvGadget, IlvRectangularGauge, IlvGraphicInstance, and IlvGraphicHandle.

◆ setFocusable()

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.

Parameters
valueSpecifies whether the object should receive the keyboard focus.
See also
IlvGadget, IlvGraphic::isFocusable().

◆ setFont()

virtual void IlvGraphic::setFont ( IlvFont font)
virtual

◆ setForeground()

virtual void IlvGraphic::setForeground ( IlvColor foreground)
virtual

Sets the foreground color of the object.

Sets the foreground color of the object.

Parameters
foregroundThe new foreground color.

Reimplemented in IlvGraphicPath, IlvShadowRectangle, IlvReliefLine, IlvGraphicInstance, IlvGraphicHandle, IlvGraphicSet, IlvReliefRectangle, IlvOutlinePolygon, IlvReliefGauge, IlvGauge, IlvFilteredGraphic, IlvSimpleGraphic, and IlvGadget.

◆ setGradientPattern()

virtual void IlvGraphic::setGradientPattern ( IlvGradientPattern pattern)
virtual

Sets the gradient pattern of the object.

Sets the gradient pattern of the object.

Parameters
patternThe new gradient pattern.

Reimplemented in IlvRectangularGauge, IlvGraphicInstance, IlvGraphicHandle, IlvGraphicSet, IlvReliefRectangle, IlvFilteredGraphic, IlvSimpleGraphic, and IlvGadget.

◆ setHolder()

virtual void IlvGraphic::setHolder ( IlvGraphicHolder )
virtual

Sets the object's holder.

This default implementation has no real function.

Reimplemented in IlvGraphicHandle, IlvGadget, IlvGraphicSet, IlvTransformedGraphic, and IlvSimpleGraphic.

◆ setInteractor() [1/2]

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.

Returns
Indicates, when IlTrue, that interactor has been successfully attached to the current object.
See also
setInteractor(IlvInteractor*).

◆ setInteractor() [2/2]

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()).

Returns
Indicates, when IlTrue, that the interactor inter has been successfully attached to the current object.

◆ setLineStyle()

virtual void IlvGraphic::setLineStyle ( IlvLineStyle style)
virtual

Sets the line style of the object.

Parameters
styleThe new line style.

Reimplemented in IlvShadowRectangle, IlvReliefLine, IlvGraphicInstance, IlvGraphicHandle, IlvGraphicSet, IlvReliefRectangle, IlvOutlinePolygon, IlvFilteredGraphic, IlvSimpleGraphic, and IlvGadget.

◆ setLineWidth()

virtual void IlvGraphic::setLineWidth ( IlUShort  width)
virtual

Sets the line width of the object.

Parameters
widthThe new line width.

Reimplemented in IlvGraphicSet, IlvReliefRectangle, IlvOutlinePolygon, IlvFilteredGraphic, IlvSimpleGraphic, IlvGadget, IlvReliefLine, IlvGraphicInstance, IlvGraphicHandle, and IlvShadowRectangle.

◆ setMode()

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

Parameters
modeThe drawing mode to be set.

Reimplemented in IlvGraphicSet, IlvReliefRectangle, IlvPolySelection, IlvOutlinePolygon, IlvReliefGauge, IlvGauge, IlvFilteredGraphic, IlvSimpleGraphic, IlvGadget, IlvGraphicCOMAdapter, IlvGraphicPath, IlvShadowRectangle, IlvDrawSelection, IlvReliefLine, IlvGraphicInstance, and IlvGraphicHandle.

◆ setName()

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.

Parameters
nameThe new name of the object.

◆ setNamedProperty()

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.

Parameters
propertyThe name of the property.
Returns
A pointer to the previous named property object, or 0.

◆ setNeedsInputContext()

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.

Parameters
valSpecifies whether the graphic object should react to localized input (IlTrue) or not (IlFalse).
See also
IlvSetLocale(), needsInputContext().

◆ setNextFocusGraphic()

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.

Parameters
nameThe name of the object to be next in the focus chain.

◆ setOverwrite()

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

Parameters
overIf IlFalse, sets selective hidden drawing operations.

Reimplemented in IlvShadowRectangle, IlvGraphicSet, IlvReliefRectangle, IlvOutlinePolygon, IlvFilteredGraphic, IlvSimpleGraphic, IlvGadget, IlvReliefLine, IlvGraphicInstance, IlvGauge, IlvGraphicHandle, IlvDrawSelection, and IlvGraphicCOMAdapter.

◆ setPalette()

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.

Parameters
paletteThe palette to be set.

Reimplemented in IlvShadowRectangle, IlvDrawSelection, IlvGraphicInstance, IlvSimpleGraphic, IlvGraphicCOMAdapter, IlvGraphicPath, IlvGraphicHandle, IlvGraphicSet, IlvScale, IlvReliefRectangle, IlvReliefLine, IlvViewRectangle, IlvOutlinePolygon, IlvLabel, IlvReliefGauge, IlvGauge, IlvFilteredGraphic, and IlvGadget.

◆ setPattern()

virtual void IlvGraphic::setPattern ( IlvPattern pattern)
virtual

Sets the pattern of the object.

Sets the pattern of the object.

Parameters
patternThe new pattern.

Reimplemented in IlvGraphicInstance, IlvGraphicHandle, IlvGraphicSet, IlvReliefRectangle, IlvFilteredGraphic, IlvSimpleGraphic, and IlvGadget.

◆ setPreviousFocusGraphic()

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.

Parameters
nameThe name of the object set as previous in the focus chain.

◆ setProperty()

void IlvGraphic::setProperty ( const IlSymbol key,
IlAny  value 
)

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.

Parameters
keyThe key to be set.
valueThe value to be set.

◆ setSensitive()

virtual void IlvGraphic::setSensitive ( IlBoolean  value)
virtual

Sets the sensitivity of the object.

Sets the sensitivity of the graphic object to the value sensitive.

Parameters
valueThe sensitivity value.

◆ symmetry()

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.

Parameters
axisThe axis around which flipping occurs.

Reimplemented in IlvGraphicSet, IlvLine, and IlvArc.

◆ translate()

virtual void IlvGraphic::translate ( IlvPos  dx,
IlvPos  dy 
)
virtual

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.

Parameters
dxThe x coordinate vector.
dyThe y coordinate vector.

◆ w() [1/2]

IlvDim IlvGraphic::w ( ) const

Gets the width value of the object.

This member function calls boundingBox() and retrieves the width value.

Returns
The width value.

◆ w() [2/2]

void IlvGraphic::w ( IlvDim  w)

Sets the width value of the object.

This member function calls boundingBox() and resize() to set the width value.

Parameters
wThe width value.

◆ write()

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
{
// Save the position field
file.getStream() << IlvSpc() << _position;
// Save the text field
IlvWriteString(file.getStream(), _text);
}
Parameters
outputThe the output file to be written to.
See also
DeclareTypeInfo().

Implemented in IlvGraphicAdapter< IlvCOMGraphicFacade >, IlvGraphicAdapter< ADAPTEE >, and IlvDrawSelection.

◆ x() [1/2]

IlvPos IlvGraphic::x ( ) const

Gets the x coordinate value of the object.

This member function calls boundingBox() and retrieves the x coordinate value.

Returns
The x coordinate value of this object.

◆ x() [2/2]

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.

Parameters
xThe x coordinate value.

◆ y() [1/2]

IlvPos IlvGraphic::y ( ) const

Gets the y coordinate value of the object.

This member function calls boundingBox() and retrieves the y coordinate value.

Returns
The y coordinate value.

◆ y() [2/2]

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.

Parameters
yThe y coordinate value.

◆ zoomable()

virtual IlBoolean IlvGraphic::zoomable ( ) const
virtual

Checks whether this object is zoomable.

Returns
IlTrue if the graphic object can be zoomed, and IlFalse otherwise.
See also
IsZoomAllowed(), AllowZoom().

Reimplemented in IlvZoomableLabel, IlvZoomableIcon, IlvGraphicSet, IlvDrawSelection, IlvZoomableMarker, IlvMarker, IlvListLabel, IlvLabel, IlvIcon, IlvFixedSizeGraphic, IlvGraphicHandle, and IlvFilteredGraphic.

IlvGraphic
Graphic class.
Definition: graphic.h:359
IlvResource::getDisplay
IlvDisplay * getDisplay() const
Gets the IlvDisplay instance.
Definition: resource.h:438
IlvGraphic::setCallback
void setCallback(const IlSymbol *callbackType, IlvGraphicCallback callback)
Sets a new callback.
IlvPoint
Geometric class.
Definition: geometry.h:188
IlvGraphic::write
virtual void write(IlvOutputFile &output) const =0
Writes an object description to a file.
IlvGraphic::read
static IlvGraphic * read(IlvInputFile &file, IlvPalette *palette)
Reads an object description from a file.
IlvWriteString
void IlvWriteString(ostream &stream, const char *string)
Writes a string to an output stream.
IlvOutputFile
Input/Output class.
Definition: io.h:67
IlvReadString
char * IlvReadString(istream &is, char *buffer=0)
Reads a string from an input stream.
IlvGraphic::removeNamedProperty
IlvNamedProperty * removeNamedProperty(IlSymbol *name)
Removes a named property from the object.
IlvInputFile
Input/Output class.
Definition: io.h:304
IlvSpc
const char * IlvSpc()
Gets a 'space.'.
IlUInt
unsigned long IlUInt
The type that can hold all unsigned 32-bit integer values.
Definition: macros.h:190
IlvOutputFile::getStream
std::ostream & getStream() const
Gets the output stream.
IlvLabel
Graphic class.
Definition: label.h:49
IlvGraphic::getNamedProperty
IlvNamedProperty * getNamedProperty(const IlSymbol *name) const
Gets a named property.
IlvGraphic::AddToCallbackTypeList
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.
IlSymbol
Symbol class.
Definition: hash.h:165
IlvPalette
Resource class.
Definition: resource.h:756