Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Graphic class. More...
#include <ilviews/graphics/handle.h>
Public Member Functions | |
IlvGraphicHandle (IlvGraphic *object, IlBoolean owner=((IlBoolean) 0)) | |
Constructor. | |
virtual void | apply (IlvApplyObject function, IlAny userArg) |
Applies a function to the referenced object. | |
virtual void | applyReferences (IlvApplyObject function, IlAny userArg) |
Conditionally applies a function to the referenced object. | |
virtual void | applyTransform (const IlvTransformer *t) |
Applies a transformation. | |
virtual IlBoolean | applyValue (const IlvValue &) |
Apply an accessor. | |
virtual void | boundingBox (IlvRect &r, const IlvTransformer *t=0) const |
Retrieves the bounding box of the graphic object. | |
const char * | className () const |
Returns the class name of an object. | |
virtual void | computeFocusRegion (IlvRegion &r, const IlvTransformer *t=0) const |
Computes the region needed for the drawing of the focus. | |
virtual IlBoolean | contains (const IlvPoint &p, const IlvPoint &tp, const IlvTransformer *t=0) const |
Checks whether a point is in the object. | |
virtual IlvGraphic * | copy () const |
Copies this object. | |
virtual void | draw (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const |
Draws the graphic object. | |
virtual void | drawFocus (IlvPort *dst, const IlvPalette *palette, const IlvTransformer *t=0, const IlvRegion *clip=0) const |
Draws additional drawings for an object that has the keyboard focus. | |
virtual void | getAccessors (const IlSymbol *const **accessors, const IlvValueTypeClass *const **types, IlUInt &count) const |
Retrieves the list of available accessors of an object. | |
virtual IlvIntensity | getAlpha () const |
Retrieves the alpha component. | |
IlvAntialiasingMode | getAntialiasingMode () const |
Retrieves the anti-aliasing mode. | |
virtual IlvClassInfo * | getClassInfo () const |
Gets class information. | |
virtual IlvGraphicHolder * | getHolder () const |
Gets a pointer to an object's holder. | |
virtual IlUShort | getLineWidth () const |
Retrieves the line width. | |
virtual IlvLookFeelHandler * | getLookFeelHandler () const |
Returns the look & feel handler used by this object. | |
IlvGraphic * | getObject () const |
Retrieves the reference object. | |
virtual IlBoolean | inside (const IlvRegion &tregion, const IlvTransformer *t=0) const |
Determines whether an object with transformation applied is inside the bounding box. | |
virtual IlBoolean | intersects (const IlvRegion &tregion, const IlvTransformer *t=0) const |
Checks whether a region intersects the bounding box with transformation applied. | |
virtual void | invert (IlBoolean temp=((IlBoolean) 0)) |
Highlights the object. | |
IlBoolean | isOwner () const |
Retrieves the ownership. | |
IlBoolean | isSubtypeOf (const IlvClassInfo *c) const |
Checks whether this object's class is a subclass. | |
IlBoolean | isSubtypeOf (const char *t) const |
Checks whether this object's class is a subclass of a given parent class. | |
virtual void | print (ILVSTDPREF ostream &, int level=0) const |
Prints for debugging purposes. | |
virtual IlvValue & | queryValue (IlvValue &) const |
Retrieves the value of an accessor. | |
virtual void | setAlpha (IlvIntensity alpha) |
Sets the alpha value of the object. | |
virtual void | setAntialiasingMode (IlvAntialiasingMode mode) |
Sets the anti-aliasing mode of the object. | |
virtual void | setArcMode (IlvArcMode m) |
Sets the arc mode of the object. | |
virtual void | setBackground (IlvColor *c) |
Sets the background color of the object. | |
virtual void | setColorPattern (IlvColorPattern *b) |
Sets the color pattern of the object. | |
virtual void | setFillRule (IlvFillRule m) |
Sets the fill rule of the object. | |
virtual void | setFillStyle (IlvFillStyle f) |
Sets the fill style of the object. | |
virtual void | setFont (IlvFont *f) |
Sets the font of the object. | |
virtual void | setForeground (IlvColor *c) |
Sets the foreground color of the object. | |
virtual void | setGradientPattern (IlvGradientPattern *g) |
Sets the gradient pattern of the object. | |
virtual void | setHolder (IlvGraphicHolder *holder) |
Sets the object's holder. | |
virtual void | setLineStyle (IlvLineStyle *style) |
Sets the line style of the object. | |
virtual void | setLineWidth (IlUShort width) |
Sets the line width of the object. | |
virtual void | setMode (IlvDrawMode m) |
Sets the drawing mode of the object temporarily. | |
void | setObject (IlvGraphic *object) |
Sets the referenced object. | |
virtual void | setOverwrite (IlBoolean overwrite) |
Sets an overwrite mode that modifies how the drawing member functions operate. | |
void | setOwner (IlBoolean flag) |
Sets the ownership. | |
virtual void | setPalette (IlvPalette *pal) |
Sets the palette of the object. | |
virtual void | setPattern (IlvPattern *p) |
Sets the pattern of the object. | |
virtual void | write (IlvOutputFile &) const |
Writes an object description to a file. | |
virtual IlBoolean | zoomable () const |
Checks whether this object is zoomable. | |
Static Public Member Functions | |
static void | AddProperty (const IlSymbol *k, IlAny v) |
Adds a property to this object's class. | |
static IlAny | GetProperty (const IlSymbol *key, IlBoolean p=((IlBoolean) 0)) |
Retrieves the property value associated with the key in this object's class. | |
static const IlvClassInfo * | HasProperty (const IlSymbol *key, IlBoolean p=((IlBoolean) 0)) |
Checks for the existence of a property for this object's class hierarchy. | |
static IlvGraphic * | read (IlvInputFile &, IlvPalette *pal) |
Reads an object description from a file. | |
static IlBoolean | RemoveProperty (const IlSymbol *key) |
Removes a property from this object's class. | |
static IlBoolean | ReplaceProperty (const IlSymbol *k, IlAny v) |
Replaces a property in this object's class. |
Graphic class.
Library: views
This section explains the concept of handle objects. An IlvGraphicHandle
object is used to reference an IlvGraphic
object. The IlvGraphicHandle
object is thus called the handle object, and the other object the referenced object.
IlvDrawSelection
class.This relationship enables you to use a handle object to indirectly access the referenced object. Also, the same referenced object can be shared among several handles. You can thus "duplicate" a complex graphic object as many times as you like by simply creating new handle objects, which all reference the same original graphic object. By referencing a complex object, instead of copying it, you save computing resources.
Another concept is that of ownership. You can make a handle object the owner of the unique referenced object with which it is associated. In this case, you no longer access the referenced object directly, but only through its handle.
When a handle owns its referenced object, deleting the handle removes both the handle and the referenced object. When the handle does not own the referenced object, a delete operation removes only the handle, leaving the referenced object intact.
IlvGraphicHandle::IlvGraphicHandle | ( | IlvGraphic * | object, | |
IlBoolean | owner = ((IlBoolean)0) | |||
) |
Constructor.
object | The referenced object. | |
owner | Must be set to IlTrue to make the handle object the owner of the referenced object. |
Adds a property to this object's class.
This static function associates the given value with the given key for the class of this object only.
key | The key to be associated. | |
value | The value to be associated. |
Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, IlvTransformedGraphic, IlvFixedSizeGraphic, and IlvGraphicInstance.
virtual void IlvGraphicHandle::apply | ( | IlvApplyObject | function, | |
IlAny | userArg | |||
) | [virtual] |
Applies a function to the referenced object.
function | The function that is applied. | |
userArg | The user argument that is passed to function. |
Reimplemented from IlvGraphic.
virtual void IlvGraphicHandle::applyReferences | ( | IlvApplyObject | function, | |
IlAny | userArg | |||
) | [virtual] |
Conditionally applies a function to the referenced object.
The function is applied only if the handle is not the owner of the referenced object. Otherwise, this member function does nothing.
function | The function that is applied. | |
userArg | The user argument that is passed to function. |
Reimplemented from IlvGraphic.
virtual void IlvGraphicHandle::applyTransform | ( | const IlvTransformer * | t | ) | [virtual] |
Applies a transformation.
t | The transformer that is applied to the referenced graphic object by calling its IlvGraphic::applyTransform member function. |
Implements IlvGraphic.
Reimplemented in IlvFilteredGraphic, IlvTransformedGraphic, and IlvFixedSizeGraphic.
Apply an accessor.
This member function is called by changeValue
(s) functions and must not be called directly.
Moreover, no drawing operations are carried out here (and should not be). The drawing operations are called by the changeValue
(s) member functions, after having processed the call to applyValue
. If you add your own new IlvValue
, do not forget to override applyValue
as well as changeValue
and queryValue
, since applyValue
is called by changeValue
.
val | The new value of the accessor. |
Reimplemented from IlvGraphic.
Reimplemented in IlvGraphicInstance.
virtual void IlvGraphicHandle::boundingBox | ( | IlvRect & | bbox, | |
const IlvTransformer * | t = 0 | |||
) | const [virtual] |
Retrieves the bounding box of the graphic object.
Sets bbox, the rectangle reference parameter, to be the bounding box of the object. Since the object can appear within a transformed environment (for example, in a multiview editor), an IlvTransformer
object occurs as an optional parameter in order to compute the bounding box in the coordinate system of the transformed environment. When there is no transformation, t is set to 0
.
bbox | The bounding box to be set. | |
t | A transformer value or 0 if there is no transformation. |
Implements IlvGraphic.
Reimplemented in IlvFilteredGraphic, IlvTransformedGraphic, and IlvFixedSizeGraphic.
const char* IlvGraphicHandle::className | ( | ) | const |
Returns the class name of an object.
This method is equivalent to getClassInfo()->getClassName()
.
IlvRectangle
object, the className function returns "IlvRectangle"
. Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, IlvTransformedGraphic, IlvFixedSizeGraphic, and IlvGraphicInstance.
virtual void IlvGraphicHandle::computeFocusRegion | ( | IlvRegion & | r, | |
const IlvTransformer * | t = 0 | |||
) | const [virtual] |
Computes the region needed for the drawing of the focus.
This method is called to compute the region needed for the drawing of the focus (see the method drawFocus
).
r | The region that is updated. | |
t | The transformer value. If 0 , no transformation is performed. |
Reimplemented from IlvGraphic.
Reimplemented in IlvTransformedGraphic, and IlvFixedSizeGraphic.
virtual IlBoolean IlvGraphicHandle::contains | ( | const IlvPoint & | p, | |
const IlvPoint & | tp, | |||
const IlvTransformer * | t = 0 | |||
) | const [virtual] |
Checks whether a point is in the object.
Checks whether the coordinates are located in the shape of this object. A transformation parameter allows you to use the view's coordinate system for this test.
p | The point to be tested. | |
tp | The transformed point obtained by applying the transformer t to the point p. | |
t | A transformer value, or 0 if there is no transformation. |
IlTrue
when the point p lies inside the outline of the object. Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, IlvTransformedGraphic, and IlvFixedSizeGraphic.
virtual IlvGraphic* IlvGraphicHandle::copy | ( | ) | const [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
. Implements IlvGraphic.
Reimplemented in IlvFilteredGraphic, IlvTransformedGraphic, IlvFixedSizeGraphic, and IlvGraphicInstance.
virtual void IlvGraphicHandle::draw | ( | IlvPort * | dst, | |
const IlvTransformer * | t = 0 , |
|||
const IlvRegion * | clip = 0 | |||
) | const [virtual] |
Draws the graphic object.
Draws the object in the given IlvPort
using the transformer t
which might have the value 0
. The clip
parameter, which can also be 0
, represents the clipping region relative to the transformed object.
dst | The destination port. | |
t | The transformer value. If 0, no transformation is performed. | |
clip | The clipping region, or 0 if none. |
Implements IlvGraphic.
Reimplemented in IlvFilteredGraphic, IlvTransformedGraphic, IlvFixedSizeGraphic, and IlvGraphicInstance.
virtual void IlvGraphicHandle::drawFocus | ( | IlvPort * | dst, | |
const IlvPalette * | palette, | |||
const IlvTransformer * | t = 0 , |
|||
const IlvRegion * | clip = 0 | |||
) | const [virtual] |
Draws additional drawings for an object that has the keyboard focus.
This method is called to draw additional drawings when the graphic object has the keyboard focus. The default implementation draws a rectangle around the object. The drawing will be done inside the region returned by computeFocusRegion
.
dst | The destination port. | |
palette | The palette of the object. | |
t | The transformer value. If 0 , no transformation is performed. | |
clip | The clipping region. |
Reimplemented from IlvGraphic.
Reimplemented in IlvTransformedGraphic, and IlvFixedSizeGraphic.
virtual void IlvGraphicHandle::getAccessors | ( | const IlSymbol *const ** | accessors, | |
const IlvValueTypeClass *const ** | types, | |||
IlUInt & | count | |||
) | const [virtual] |
Retrieves the list of available accessors of an object.
Retrieves the list of accessors of an object. accessors is the resulting array of symbols. Each symbol is the name of an accessor. types is the array of the types of accessors, count is the number of accessors. The existing types for accessors are the following:
IlvValueIntType
IlvValueUIntType
IlvValueStringType
IlvValueBooleanType
IlvValueColorType
IlvValueFontType
IlvValuePatternType
IlvValueColorPatternType
IlvValueGradientPatternType
IlvValueLineStyleType
IlvValueFillStyleType
IlvValueFillRuleType
IlvValueArcModeType
IlvValueDirectionType
IlvValueBitmapType
IlvValueFloatType
IlvValueDoubleType
IlvValueStringArrayType
IlvValueUIntArrayType
IlvValueMenuItemArrayType
IlvValueMatrixItemArrayType
IlvValueNotebookPageArrayType
The possible accessors for an object are described in the corresponding class.
Reimplemented from IlvGraphic.
virtual IlvIntensity IlvGraphicHandle::getAlpha | ( | ) | const [virtual] |
Retrieves the alpha component.
Reimplemented from IlvGraphic.
IlvAntialiasingMode IlvGraphicHandle::getAntialiasingMode | ( | ) | const [virtual] |
Retrieves the anti-aliasing mode.
Reimplemented from IlvGraphic.
Reimplemented in IlvGraphicInstance.
virtual IlvClassInfo* IlvGraphicHandle::getClassInfo | ( | ) | const [virtual] |
Gets class information.
Returns a pointer to the IlvClassInfo
object associated with this object's class.
Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, IlvTransformedGraphic, IlvFixedSizeGraphic, and IlvGraphicInstance.
virtual IlvGraphicHolder* IlvGraphicHandle::getHolder | ( | ) | const [virtual] |
Gets a pointer to an object's holder.
IlvGraphicHolder
object in which the graphic is located. Reimplemented from IlvGraphic.
virtual IlUShort IlvGraphicHandle::getLineWidth | ( | ) | const [virtual] |
Retrieves the line width.
Reimplemented from IlvGraphic.
Reimplemented in IlvGraphicInstance.
virtual IlvLookFeelHandler* IlvGraphicHandle::getLookFeelHandler | ( | ) | const [virtual] |
Returns the look & feel handler used by this object.
The default implementation returns 0
.
Reimplemented from IlvGraphic.
IlvGraphic* IlvGraphicHandle::getObject | ( | ) | const |
Retrieves the reference object.
IlvGraphic
object. static IlAny IlvGraphicHandle::GetProperty | ( | const IlSymbol * | key, | |
IlBoolean | checkSuperClass = ((IlBoolean) 0) | |||
) | [static] |
Retrieves the property value associated with the key in this object's class.
Retrieves the property value associated with the property name key. If the property cannot be found in the class of this object, and if checkSuperClass is set to IlTrue
, then the function operates iteratively on each superclass until the property is found. If the property cannot be found, then 0
is returned.
key | The key with which the property value is associated. | |
checkSuperClass | IlTrue specifies iterative search on superclasses. |
0
. Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, IlvTransformedGraphic, IlvFixedSizeGraphic, and IlvGraphicInstance.
static const IlvClassInfo* IlvGraphicHandle::HasProperty | ( | const IlSymbol * | key, | |
IlBoolean | checkSuperClass = ((IlBoolean) 0) | |||
) | [static] |
Checks for the existence of a property for this object's class hierarchy.
Retrieves a pointer to the IlvClassInfo
that indicates a class where the key property exists. If the returned value is non-0
, then this property actually exists for this class. If this is not the case and if checkSuperClass is set to IlTrue
, then the function operates iteratively on each superclass until a match is found. If the property cannot be found, then 0
is returned.
key | The key with which the property value is associated. | |
checkSuperClass | IlTrue specifies iterative search on superclasses. |
0
. Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, IlvTransformedGraphic, IlvFixedSizeGraphic, and IlvGraphicInstance.
virtual IlBoolean IlvGraphicHandle::inside | ( | const IlvRegion & | r, | |
const IlvTransformer * | t = 0 | |||
) | const [virtual] |
Determines whether an object with transformation applied is inside the bounding box.
Determines whether an object with transformation applied is inside the bounding box.
r | The region to be tested. | |
t | A transformer value, or 0 if there is no transformation. |
IlTrue
when the object, drawn with the transformer t, covers completely the region r. This virtual member function returns IlFalse
when this is not the case. That means that it returns IlTrue
if all rectangles that define the region completely lie inside the object. Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, IlvTransformedGraphic, and IlvFixedSizeGraphic.
virtual IlBoolean IlvGraphicHandle::intersects | ( | const IlvRegion & | r, | |
const IlvTransformer * | t = 0 | |||
) | const [virtual] |
Checks whether a region intersects the bounding box with transformation applied.
Checks whether a region intersects the bounding box with transformation applied.
r | The region to be tested. | |
t | A transformer value, or 0 if there is no transformation. |
IlTrue
when the region r overlaps the transformed object (if t is not 0
) and IlFalse
when this is not the case. Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, IlvTransformedGraphic, and IlvFixedSizeGraphic.
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 from IlvGraphic.
Reimplemented in IlvFilteredGraphic, and IlvGraphicInstance.
IlBoolean IlvGraphicHandle::isOwner | ( | ) | const |
Retrieves the ownership.
IlTrue
if the handle owns its referenced object. IlBoolean IlvGraphicHandle::isSubtypeOf | ( | const IlvClassInfo * | classInfo | ) | const |
Checks whether this object's class is a subclass.
This method is equivalent to getClassInfo()->isSubtypeOf(classInfo)
.
classInfo | The name of a class on which the object's class is tested. |
IlTrue
or IlFalse
, depending on whether or not this object's class is a subclass of the class indicated by classInfo. Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, IlvTransformedGraphic, IlvFixedSizeGraphic, and IlvGraphicInstance.
IlBoolean IlvGraphicHandle::isSubtypeOf | ( | const char * | parentClass | ) | const |
Checks whether this object's class is a subclass of a given parent class.
This method is equivalent to getClassInfo()->isSubtypeOf(parentClass)
.
parentClass | A string representing the parent class. |
IlTrue
or IlFalse
, depending on whether or not this object's class inherits parentClass attributes. The parentClass parameter should be a string representing the class name of an IlvGraphic
subclass. A call to this member function for a given class instance returns IlTrue
if given the name of its class. Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, IlvTransformedGraphic, IlvFixedSizeGraphic, and IlvGraphicInstance.
virtual void IlvGraphicHandle::print | ( | ILVSTDPREF ostream & | out, | |
int | level = 0 | |||
) | const [virtual] |
Prints for debugging purposes.
Use for debugging purposes. Depending on the debugging level given as the level parameter, basic information about this object is printed to out. Basic implementation prints the object class name, and its bounding box. When this object is defined by another object (that is, if it is a referenced object), this subobject is described only if the level parameter is not zero. When this object is defined by a group of objects, these subobjects are defined themselves if the level parameter is not zero. In general, the higher level is, the more information you get about the object.
out | The output stream. | |
level | The debugging level. If 0, subobjects are not described. |
Reimplemented from IlvGraphic.
Retrieves the value of an accessor.
Retrieves the value of the accessor val. The queryValue
method can be used in the following way:
IlvValue arg("label"); char* label = (char*)labelObject->queryValue(arg);
See IlvValue
for more information.
Reimplemented from IlvGraphic.
Reimplemented in IlvGraphicInstance.
static IlvGraphic* IlvGraphicHandle::read | ( | IlvInputFile & | file, | |
IlvPalette * | palette | |||
) | [static] |
Reads an object description from a file.
Reads an object description from the file input, given the palette graphic attributes. It reads the information that was saved by the member function write
to be able to create a new instance of this object. Usually, because of the availability of the constructor that expects an IlvInputFile
, read should be equivalent to:
IlvGraphic* MyClass::read(IlvInputFile& file, IlvPalette* palette) { return new MyClass(file, palette); }
In the following example, the static member function read
of the IlvLabel
class could have the following form:
IlvGraphic* IlvLabel::read(IlvInputFile& file, IlvPalette* pal) { IlvPoint pos; file.getStream() >> pos; // Read the position field return new IlvLabel(pal->getDisplay(), pos, IlvReadString(file.getStream()), pal); }
file | The name of the file to be read from. | |
palette | The name of the palette for the object. |
DeclareTypeInfoRO
, DeclareTypeInfo
, IlvPredefinedIOMembers
. read
method is not capitalized like other static methods so that it is consistent with the write
method. Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, IlvTransformedGraphic, IlvFixedSizeGraphic, and IlvGraphicInstance.
Removes a property from this object's class.
This static function removes the indicated property to the class of this object.
key | The key property to be removed. |
IlTrue
if the key property was actually found, or IlFalse
otherwise. Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, IlvTransformedGraphic, IlvFixedSizeGraphic, and IlvGraphicInstance.
Replaces a property in this object's class.
This static function replaces the indicated property value to the class of this object.
key | The key to be replaced. | |
value | The value to be replaced. |
IlTrue
if the key property was actually found, or IlFalse
otherwise. Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, IlvTransformedGraphic, IlvFixedSizeGraphic, and IlvGraphicInstance.
virtual void IlvGraphicHandle::setAlpha | ( | IlvIntensity | alpha | ) | [virtual] |
Sets the alpha value of the object.
alpha | The new alpha value. |
Reimplemented from IlvGraphic.
virtual void IlvGraphicHandle::setAntialiasingMode | ( | IlvAntialiasingMode | mode | ) | [virtual] |
Sets the anti-aliasing mode of the object.
mode | The new anti-aliasing mode. |
Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, and IlvGraphicInstance.
virtual void IlvGraphicHandle::setArcMode | ( | IlvArcMode | mode | ) | [virtual] |
Sets the arc mode of the object.
mode | The new arc mode. |
Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, and IlvGraphicInstance.
virtual void IlvGraphicHandle::setBackground | ( | IlvColor * | background | ) | [virtual] |
Sets the background color of the object.
Sets the background color of the object.
background | The new background color. |
Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, and IlvGraphicInstance.
virtual void IlvGraphicHandle::setColorPattern | ( | IlvColorPattern * | pattern | ) | [virtual] |
Sets the color pattern of the object.
Sets the color pattern of the object.
pattern | The new color pattern. |
Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, and IlvGraphicInstance.
virtual void IlvGraphicHandle::setFillRule | ( | IlvFillRule | rule | ) | [virtual] |
Sets the fill rule of the object.
rule | The new fill rule. |
Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, and IlvGraphicInstance.
virtual void IlvGraphicHandle::setFillStyle | ( | IlvFillStyle | style | ) | [virtual] |
Sets the fill style of the object.
style | The new fill style. |
Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, and IlvGraphicInstance.
virtual void IlvGraphicHandle::setFont | ( | IlvFont * | font | ) | [virtual] |
Sets the font of the object.
font | The new font. |
Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, and IlvGraphicInstance.
virtual void IlvGraphicHandle::setForeground | ( | IlvColor * | foreground | ) | [virtual] |
Sets the foreground color of the object.
Sets the foreground color of the object.
foreground | The new foreground color. |
Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, and IlvGraphicInstance.
virtual void IlvGraphicHandle::setGradientPattern | ( | IlvGradientPattern * | pattern | ) | [virtual] |
Sets the gradient pattern of the object.
Sets the gradient pattern of the object.
pattern | The new gradient pattern. |
Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, and IlvGraphicInstance.
virtual void IlvGraphicHandle::setHolder | ( | IlvGraphicHolder * | holder | ) | [virtual] |
Sets the object's holder.
This default implementation has no real function.
Reimplemented from IlvGraphic.
Reimplemented in IlvTransformedGraphic.
virtual void IlvGraphicHandle::setLineStyle | ( | IlvLineStyle * | style | ) | [virtual] |
Sets the line style of the object.
style | The new line style. |
Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, and IlvGraphicInstance.
virtual void IlvGraphicHandle::setLineWidth | ( | IlUShort | width | ) | [virtual] |
Sets the line width of the object.
width | The new line width. |
Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, and IlvGraphicInstance.
virtual void IlvGraphicHandle::setMode | ( | IlvDrawMode | mode | ) | [virtual] |
Sets the drawing mode of the object temporarily.
Changing the IlvDrawMode
attribute of an object is considered a temporary operation. You have to set the mode to its default value when you no longer need another mode different from the value IlvModeSet
. The drawing mode information is passed to the palette of the graphic object (see the IlvPalette::setOverwrite
method for more details).
mode | The drawing mode to be set. |
Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, and IlvGraphicInstance.
void IlvGraphicHandle::setObject | ( | IlvGraphic * | object | ) |
Sets the referenced object.
The ownership is not changed, and the previous object is not deleted, whatever the ownership of this handle.
object | The new referenced object. |
virtual void IlvGraphicHandle::setOverwrite | ( | IlBoolean | over | ) | [virtual] |
Sets an overwrite mode that modifies how the drawing member functions operate.
Modifies the way the drawing member functions operate. The information is passed to the palette of the graphic object (see the IlvPalette::setOverwrite
method for more details).
over | If IlFalse , sets selective hidden drawing operations. |
Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, and IlvGraphicInstance.
void IlvGraphicHandle::setOwner | ( | IlBoolean | flag | ) |
Sets the ownership.
flag | The new ownership flag. If this value is IlTrue , then the handle is the owner of the referenced object with which it is associated and you should no longer access the referenced object directly. |
virtual void IlvGraphicHandle::setPalette | ( | IlvPalette * | palette | ) | [virtual] |
Sets the palette of the object.
Each of the graphic properties of this object is then taken from this IlvPalette
instance.
palette | The palette to be set. |
Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, and IlvGraphicInstance.
virtual void IlvGraphicHandle::setPattern | ( | IlvPattern * | pattern | ) | [virtual] |
Sets the pattern of the object.
Sets the pattern of the object.
pattern | The new pattern. |
Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, and IlvGraphicInstance.
virtual void IlvGraphicHandle::write | ( | IlvOutputFile & | output | ) | const [virtual] |
Writes an object description to a file.
Writes out, in a file, the object description. This description contains all the information necessary to create an exact copy of this object by means of the member function read
. Information concerning any IlvPalette
object attached to this object is written out by the object containers. All other information, such as the position and size of the object, is written out by this virtual member function.
For example, suppose we have an IlvLabel
class that implements a graphic object drawn as a text string at a given position. It maintains its position in an internal IlvPoint
field called _position
and its textual content in an internal character array field called _text
. The only information we need to save is the contents of those fields. So, the member function write
of such an object should have the following form:
void IlvLabel::write(IlvOutputFile& file) const { // Save the position field file.getStream() << IlvSpc() << _position; // Save the text field IlvWriteString(file.getStream(), _text); }
output | The the output file to be written to. |
DeclareTypeInfo
. Implements IlvGraphic.
Reimplemented in IlvFilteredGraphic, IlvTransformedGraphic, IlvFixedSizeGraphic, and IlvGraphicInstance.
virtual IlBoolean IlvGraphicHandle::zoomable | ( | ) | const [virtual] |
Checks whether this object is zoomable.
IlTrue
if the graphic object can be zoomed, and IlFalse
otherwise. See the member functions IsZoomAllowed
and AllowZoom
below. Reimplemented from IlvGraphic.
Reimplemented in IlvFilteredGraphic, and IlvFixedSizeGraphic.
© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.