rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions
IlvDrawSelection Class Referenceabstract

Base class for selection objects. More...

#include <ilviews/graphics/select.h>

Inheritance diagram for IlvDrawSelection:
IlvSimpleGraphic IlvGraphic IlvPolyPointsSelection IlvReshapeSelection IlvSplineSelection

Public Member Functions

virtual void apply (IlvApplyObject f, IlAny a)
 Applies a function to objects that compose another object. More...
 
virtual void applyReferences (IlvApplyObject f, IlAny a)
 Applies a function to objects that are referenced by another object. More...
 
virtual void applyTransform (const IlvTransformer *t)
 Applies a transformation function to the graphic object. More...
 
virtual void boundingBox (IlvRect &r, const IlvTransformer *t=0) const
 Retrieves the bounding box of the graphic object. More...
 
virtual void computeRegion (IlvRegion &r, const IlvTransformer *t=0) const
 Returns the region covered by the object. More...
 
virtual IlBoolean contains (const IlvPoint &p, const IlvPoint &tp, const IlvTransformer *t) const
 Checks whether a point is in the object. More...
 
virtual IlvDirection direction (const IlvPoint &p, const IlvTransformer *t=0) const
 Returns the direction associated to a given point. More...
 
virtual void draw (IlvPort *dst, const IlvTransformer *t, const IlvRegion *clip=0) const
 Draws the graphic object. More...
 
virtual void drawHandle (IlvPort *dst, IlUInt idx, const IlvRect &rect, const IlvRegion *clip=0) const
 Draws a selection handle. More...
 
virtual IlBoolean getHandleLocation (IlUInt idx, IlvPoint &p, const IlvTransformer *t) const =0
 Returns the location of a given selection handle. More...
 
IlBoolean getHandleRect (IlUInt idx, IlvRect &rect, const IlvTransformer *t) const
 Returns the rectangle covered by a given selection handle. More...
 
virtual IlUInt getHandlesCount (const IlvTransformer *t=0) const =0
 Returns the number of selection handles. More...
 
IlvGraphicgetObject () const
 Returns the referenced graphic object. More...
 
IlvDim getSize () const
 Returns the size of the selection handles. More...
 
IlBoolean isVisible (const IlvPort *dst) const
 Indicates whether the selection object is visible. More...
 
virtual void setMode (IlvDrawMode m)
 Sets the drawing mode of the object temporarily. More...
 
void setObject (IlvGraphic *object)
 Changes the referenced graphic object. More...
 
virtual void setOverwrite (IlBoolean o)
 Sets an overwrite mode that modifies how the drawing member functions operate. More...
 
virtual void setPalette (IlvPalette *palette)
 Sets the internal palette to the given palette value. More...
 
void setSize (IlvDim size)
 Changes the size of the selection handles. More...
 
virtual IlUInt whichHandle (const IlvPoint &p, const IlvTransformer *t=0) const
 Returns the selection handle containing a given point. More...
 
virtual void write (IlvOutputFile &) const
 Writes an object description to a file. More...
 
virtual IlBoolean zoomable () const
 Checks whether this object is zoomable. More...
 
- Public Member Functions inherited from IlvSimpleGraphic
 IlvSimpleGraphic (IlvDisplay *display, IlvPalette *palette=0)
 Constructor. More...
 
virtual ~IlvSimpleGraphic ()
 Destructor. 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...
 
IlvIntensity getAlpha () const
 Retrieves the alpha value. More...
 
IlvAntialiasingMode getAntialiasingMode () const
 Retrieves the anti-aliasing mode. More...
 
IlvArcMode getArcMode () const
 Retrieves the arc mode. More...
 
IlvColorgetBackground () const
 Retrieves the background color. More...
 
IlvColorPatterngetColorPattern () const
 Retrieves the color pattern. More...
 
virtual IlvDisplaygetDisplay () const
 Retrieves the IlvDisplay instance. More...
 
IlvFillRule getFillRule () const
 Retrieves the fill rule. More...
 
IlvFillStyle getFillStyle () const
 Retrieves the fill style. More...
 
IlvFontgetFont () const
 Retrieves the font. More...
 
IlvColorgetForeground () const
 Retrieves the foreground color. More...
 
IlvGradientPatterngetGradientPattern () const
 Retrieves the gradient pattern. More...
 
IlvLineStylegetLineStyle () const
 Retrieves the line style. More...
 
IlUShort getLineWidth () const
 Retrieves the line width. More...
 
virtual IlvLookFeelHandlergetLookFeelHandler () const
 Returns the look & feel handler used by this object. More...
 
virtual int getLookupStringInputMethod (IlvEvent &event, char *bufferReturn, int bytesBuffer, int *statusReturn)
 Gets the preedit string from an input method. More...
 
IlvDrawMode getMode () const
 Retrieves the draw mode. More...
 
IlBoolean getOverwrite () const
 Retrieves the overwrite mode. More...
 
IlvPalettegetPalette () const
 Retrieves the internal palette value. More...
 
IlvPatterngetPattern () const
 Retrieves the pattern. More...
 
virtual void invert (IlBoolean temp=IlFalse)
 Highlights the object. More...
 
virtual void registerInputMethod () const
 Controls the connection of a graphic object to an input method. 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 am)
 Sets the arc mode of the object. More...
 
virtual void setBackground (IlvColor *c)
 Sets the background color of the object. More...
 
virtual void setColorPattern (IlvColorPattern *b)
 Sets the color pattern of the object. More...
 
virtual void setFillRule (IlvFillRule fr)
 Sets the fill rule of the object. More...
 
virtual void setFillStyle (IlvFillStyle f)
 Sets the fill style of the object. More...
 
virtual void setFocusValuesInputMethod (IlUShort count, const IlvImValue *values) const
 Controls the interaction between a simple graphic object and an input method. More...
 
virtual void setFont (IlvFont *f)
 Sets the font of the object. More...
 
virtual void setForeground (IlvColor *c)
 Sets the foreground color of the object. More...
 
virtual void setGradientPattern (IlvGradientPattern *g)
 Sets the gradient pattern of the object. More...
 
virtual void setHolder (IlvGraphicHolder *holder)
 Sets the object's holder. More...
 
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 setPattern (IlvPattern *p)
 Sets the pattern of the object. More...
 
virtual void setValuesInputMethod (IlUShort count, const IlvImValue *values) const
 Controls the interaction between a graphic object and an input method. More...
 
virtual void unRegisterInputMethod () const
 Controls the disconnection of a graphic object from an input method. More...
 
virtual void unsetFocusInputMethod () const
 Controls the interaction between a graphic object and an input method. More...
 
- Public Member Functions inherited from IlvGraphic
void addCallback (const IlSymbol *callbackType, IlvGraphicCallback callback)
 Adds a callback function to a callback list. More...
 
void addCallback (const IlSymbol *callbackType, const IlSymbol *callbackName, const IlSymbol *script=0)
 Adds a callback function to a callback list. More...
 
void addCallback (const IlSymbol *callbackType, IlvGraphicCallback callback, 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...
 
IlBoolean applyAttribute (const char *attributeClassName, IlInt value, IlAny checkData=0) const
 Applies attributes. More...
 
IlBoolean applyAttribute (const char *attributeClassName, IlFloat value, IlAny checkData=0) const
 Applies attributes. More...
 
IlBoolean applyAttribute (const char *attributeClassName, const char *value, IlAny checkData=0) const
 Applies attributes. More...
 
virtual IlBoolean applyValue (const IlvValue &val)
 Apply an accessor. More...
 
virtual void callCallbacks (const IlSymbol *callbackType)
 Calls every callback of a given type. More...
 
virtual IlBoolean changeValue (const IlvValue &val)
 Changes the value of an accessor. More...
 
virtual IlBoolean changeValues (const IlvValue *values, IlUShort count)
 Changes several accessor values simultaneously. 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 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 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 **accessors, const IlvValueTypeClass *const **types, IlUInt &count) const
 Retrieves the list of available accessors of an object. More...
 
IlvGraphicCallback getCallback (const IlSymbol *callbackType) const
 Gets a callback. More...
 
IlvGraphicCallback getCallback () const
 Gets the main callback function. More...
 
IlAny getCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback) const
 Gets a callback user data. More...
 
IlAny getCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName) const
 Gets a callback user data. More...
 
IlSymbolgetCallbackName (const IlSymbol *callbackType) const
 Gets the name of a callback. More...
 
IlSymbolgetCallbackName () const
 Gets the symbol that identifies the main callback. More...
 
virtual IlUInt getCallbackTypes (const char *const **names, const IlSymbol *const **types) const
 Gets the number of register callback types for the object. More...
 
virtual 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 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...
 
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 a specified graphic object. More...
 
IlvDim h () const
 Gets the height value of the object. More...
 
void h (IlvDim h)
 Sets the height value of the object. More...
 
IlBoolean hasCallback (const IlSymbol *callbackType, IlvGraphicCallback callback) const
 Checks whether a callback function is in a callback list. More...
 
IlBoolean hasCallback (const IlSymbol *callbackType, const IlSymbol *callbackName) const
 Checks whether a callback function is in a callback list. More...
 
IlBoolean hasCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback) const
 Checks whether a callback function has user data. More...
 
IlBoolean hasCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName) const
 Checks whether a callback function has user data. More...
 
const 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...
 
virtual IlBoolean inside (const IlvRegion &r, const IlvTransformer *t=0) const
 Determines whether an object with transformation applied is inside the bounding box. More...
 
IlBoolean inside (const IlvRect &r, const IlvRect &tr, const IlvTransformer *t=0) const
 Determines whether an object with transformation applied is inside the bounding box. More...
 
IlBoolean inside (const IlvRect &r) const
 Determines whether a rectangle is inside the bounding box. More...
 
virtual IlBoolean intersects (const IlvRegion &r, const IlvTransformer *t=0) const
 Checks whether a region intersects the bounding box with transformation applied. More...
 
IlBoolean intersects (const IlvRect &r, const IlvRect &tr, const IlvTransformer *t=0) const
 Checks whether a rectangle intersects the bounding box with transformation applied. More...
 
IlBoolean intersects (const IlvRect &r) const
 Checks whether a rectangle intersects the bounding box. More...
 
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 or not. More...
 
IlBoolean isInSmartSet () const
 Checks whether a graphic object belongs to a smart set. More...
 
IlBoolean isLastFocusGraphic () const
 Checks whether the object is last in the focus chain. More...
 
IlBoolean isSensitive () const
 Checks whether the object is sensitive. More...
 
IlBoolean isSubtypeOf (const char *parentClass) const
 Checks whether this object's class is a subclass of a given parent class. More...
 
IlBoolean isSubtypeOf (const IlvClassInfo *classInfo) const
 Checks whether this object's class is a subclass. More...
 
virtual void move (IlvPos x, IlvPos y)
 Moves the graphic object. More...
 
void move (const IlvPoint &p)
 Moves the graphic object. More...
 
void moveResize (const IlvRect &size)
 Moves and resizes a graphic object. More...
 
virtual IlBoolean needsInputContext () const
 Indicates whether the graphic instance can connect to an input method for locale dependent input. More...
 
virtual void print (ILVSTDPREF ostream &out, int level=0) const
 Prints for debugging purposes. More...
 
virtual IlvValuequeryValue (IlvValue &val) const
 Retrieves the value of an accessor. More...
 
virtual void queryValues (IlvValue *values, IlUShort count) const
 Retrieves multiple accessor values simultaneously. More...
 
void removeCallback (const IlSymbol *callbackType, IlvGraphicCallback callback)
 Removes a callback function from a callback list. More...
 
void removeCallback (const IlSymbol *callbackType, const IlSymbol *callbackName)
 Removes a callback function from a callback list. More...
 
IlBoolean removeClassProperty (const IlSymbol *key)
 Removes a property from this object's class. More...
 
void removeInteractor ()
 Removes the interactor from the current object. More...
 
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...
 
void setCallback (const IlSymbol *callbackType, IlvGraphicCallback callback)
 Sets a new callback. More...
 
void setCallback (const IlSymbol *callbackType, const IlSymbol *callbackName, const IlSymbol *script=0)
 Removes all previously set callbacks. More...
 
void setCallback (const IlSymbol *callbackType, IlvGraphicCallback callback, IlAny data)
 Removes all previously set callbacks. More...
 
void setCallback (IlvGraphicCallback callback, IlAny data)
 Sets the main callback function. More...
 
void setCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback, IlAny data)
 Sets the callback user data for a callback function. More...
 
void setCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName, IlAny data)
 Sets the callback user data for a callback function. More...
 
void setCallbackName (const IlSymbol *callbackName)
 Sets the symbol that identifies the main callback. More...
 
void setClientData (IlAny clientData)
 Sets client data. More...
 
void setFirstFocusGraphic ()
 Sets the object to be first in the focus chain.
 
void setFocusable (IlBoolean value)
 Set the focusable state of the object. More...
 
IlBoolean setInteractor (IlvInteractor *inter)
 Attaches an interactor to the current object. More...
 
IlBoolean setInteractor (const char *name)
 Attaches an interactor to the current object. More...
 
void setLastFocusGraphic ()
 Sets the object to be last in the focus chain.
 
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...
 
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...
 
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...
 

Static Public Member Functions

static IlvPaletteGetDefaultPalette (IlvDisplay *display)
 Returns the default palette used to create selection objects. More...
 
static IlvDim GetDefaultSize ()
 Returns the default size for the selection handles. More...
 
static IlBoolean IsVisibleWhenObjectIsInvisible ()
 Returns the visibility policy for selection objects. More...
 
static void SetDefaultPalette (IlvPalette *palette)
 Sets the default palette used to create selection objects. More...
 
static void SetDefaultSize (IlvDim size)
 Sets the default size for the selection handles. More...
 
static void SetVisibleWhenObjectIsInvisible (IlBoolean f)
 Sets the visibility policy for selection objects. More...
 

Protected Member Functions

 IlvDrawSelection (IlvDisplay *display, IlvGraphic *object, IlvDim size=0, IlvPalette *palette=0)
 Constructor. More...
 

Detailed Description

Base class for selection objects.

Library: views

IlvDrawSelection is the abstract base class for selection objects. A selection object draws several selection handles that can be used to edit its associated graphic object.

Constructor & Destructor Documentation

IlvDrawSelection::IlvDrawSelection ( IlvDisplay display,
IlvGraphic object,
IlvDim  size = 0,
IlvPalette palette = 0 
)
protected

Constructor.

The constructor initializes an IlvDrawSelection object with the IlvGraphic object object. If palette is equal to 0, then this new instance will use the palette set with the IlvDrawSelection::SetDefaultPalette method. The parameter size indicates the size of the squares to be drawn (the actual dimension of the squares will be twice this size). If size is equal to 0, then the object will be initialized with the size returned by the IlvDrawSelection::GetDefaultSize method.

Parameters
displayThe display connection that will handle the drawing of this object.
objectThe selected object to which this instance is associated.
sizeThe size of the squares
paletteThe palette used to draw this object.

Member Function Documentation

virtual void IlvDrawSelection::apply ( IlvApplyObject  function,
IlAny  arg 
)
virtual

Applies a function to objects that compose another object.

Implements a technique for applying a function to objects that compose another object. This member function is useful only when the object is a composite one like an instance of IlvGraphicSet or IlvGraphicHandle. The IlvApplyObject function successively receives each of the components as well as the arg parameter.

Parameters
functionThe function to be applied.
argAn argument parameter.

Reimplemented from IlvGraphic.

virtual void IlvDrawSelection::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 from IlvGraphic.

virtual void IlvDrawSelection::applyTransform ( const IlvTransformer t)
virtual

Applies a transformation function to the graphic object.

Applies the transformer t to the shape of the object. Unless the transformation is a scaling operation, the result of applying it to certain objects can be insignificant. For example, applying a non-scaling transformer to an IlvRectangle object is meaningless, since the rectangle remains a rectangle. On the other hand, meaningful transformations can be applied to objects that are instances of types such as IlvLine or IlvPolyPoints.

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

Implements IlvGraphic.

virtual void IlvDrawSelection::boundingBox ( IlvRect bbox,
const IlvTransformer t = 0 
) const
virtual

Retrieves the bounding box of the graphic object.

Sets bbox, the rectangle reference parameter, to be the bounding box of the object. Since the object can appear within a transformed environment (for example, in a multiview editor), an IlvTransformer object occurs as an optional parameter in order to compute the bounding box in the coordinate system of the transformed environment. When there is no transformation, t is set to 0.

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

Implements IlvGraphic.

Reimplemented in IlvReshapeSelection, and IlvPolyPointsSelection.

virtual void IlvDrawSelection::computeRegion ( IlvRegion r,
const IlvTransformer t = 0 
) const
virtual

Returns the region covered by the object.

This method returns in region the region that covers the selection object if it is displayed with the transformer t. The default implementation fills the region with the rectangles returned by the IlvDrawSelection::getHandleRect method for each selection handle.

Parameters
rThe returned region.
tThe transformer applied to this object.

Reimplemented in IlvReshapeSelection, and IlvPolyPointsSelection.

virtual IlBoolean IlvDrawSelection::contains ( const IlvPoint p,
const IlvPoint tp,
const IlvTransformer t 
) 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 from IlvGraphic.

virtual IlvDirection IlvDrawSelection::direction ( const IlvPoint p,
const IlvTransformer t = 0 
) const
virtual

Returns the direction associated to a given point.

Returns the direction associated to the selection handles containing the point p. This method is used to assign a resizing behavior to selection handles. The default implementation returns IlvBadPosition.

Parameters
pThe considered point.
tThe transformer applied to this object.
Returns
The direction value of the selection handle containing the point p, or IlvBadPosition if p doesn't lie in any of the selection handle.
See Also
IlvReshapeSelection.

Reimplemented in IlvReshapeSelection.

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

Draws the graphic object.

Draws the object in the given IlvPort using the transformer t which might have the value 0. The clip parameter, which can also be 0, represents the clipping region relative to the transformed object.

Parameters
dstThe destination port.
tThe transformer value. If 0, no transformation is performed.
clipThe clipping region, or 0 if none.

Implements IlvGraphic.

Reimplemented in IlvReshapeSelection, IlvSplineSelection, and IlvPolyPointsSelection.

virtual void IlvDrawSelection::drawHandle ( IlvPort dst,
IlUInt  idx,
const IlvRect rect,
const IlvRegion clip = 0 
) const
virtual

Draws a selection handle.

Draws the selection handle of index idx, defined by the rectangle rect. The default implementation draws rectangle filled with the background color of the object's palette and outlined with the foreground color of the object's palette.

Parameters
dstThe drawing port.
idxThe index of the considered handle.
rectThe rectangle of the considered handle.
clipThe clip applied to the drawing.
static IlvPalette* IlvDrawSelection::GetDefaultPalette ( IlvDisplay display)
static

Returns the default palette used to create selection objects.

Returns the default palette that will be used to create selection objects through the display connection dpy. This palette is used when 0 is passed to the palette parameter of the IlvDrawSelection constructor.

Parameters
displayThe display connection for the created objects
Returns
The default palette.
See Also
SetDefaultPalette.
static IlvDim IlvDrawSelection::GetDefaultSize ( )
static

Returns the default size for the selection handles.

This size is used when 0 is passed to the size parameter of the IlvDrawSelection constructor.

Returns
The default size for the selection handles.
See Also
SetDefaultSize.
virtual IlBoolean IlvDrawSelection::getHandleLocation ( IlUInt  idx,
IlvPoint p,
const IlvTransformer t 
) const
pure virtual

Returns the location of a given selection handle.

This method must be redefined in subclasses.

Parameters
idxThe index of the considered handle.
pThe returned point.
tThe transformer applied to the object.
Returns
IlTrue if idx is a valid index and IlFalse otherwise.

Implemented in IlvReshapeSelection, IlvSplineSelection, and IlvPolyPointsSelection.

IlBoolean IlvDrawSelection::getHandleRect ( IlUInt  idx,
IlvRect rect,
const IlvTransformer t 
) const

Returns the rectangle covered by a given selection handle.

This method returns the square of size 2*getSize() centered at the point returned by the IlvDrawSelection::getHandleLocation method.

Parameters
idxThe index of the considered handle.
rectThe returned rectangle.
tThe transformer applied to the object.
Returns
IlTrue if idx is a valid index and IlFalse otherwise.
virtual IlUInt IlvDrawSelection::getHandlesCount ( const IlvTransformer t = 0) const
pure virtual

Returns the number of selection handles.

This method must be redefined in subclasses.

Parameters
tThe transformer applied to the object.
Returns
The number of selection handles.

Implemented in IlvReshapeSelection, and IlvPolyPointsSelection.

IlvGraphic* IlvDrawSelection::getObject ( ) const

Returns the referenced graphic object.

Returns
The referenced graphic object.
IlvDim IlvDrawSelection::getSize ( ) const

Returns the size of the selection handles.

Returns
Half the length of the side of the square used to draw the selection handles.
See Also
setSize.
IlBoolean IlvDrawSelection::isVisible ( const IlvPort dst) const

Indicates whether the selection object is visible.

The visibility of a selection object depends on the policy specified by the IlvDrawSelection::IsVisibleWhenObjectIsInvisible method.

Parameters
dstThe considered port.
Returns
IlTrue if the selection object is visible in the port dst, and IlFalse otherwise.
static IlBoolean IlvDrawSelection::IsVisibleWhenObjectIsInvisible ( )
static

Returns the visibility policy for selection objects.

If this method returns IlFalse, then the selection handle will be invisible if its referenced object is invisible. The default value, which is IlTrue, indicates that the selection remains visible even when the object is not visible.

Returns
The visibility policy for selection objects.
static void IlvDrawSelection::SetDefaultPalette ( IlvPalette palette)
static

Sets the default palette used to create selection objects.

Sets palette as the default palette that will be used to create selection objects. The initial default palette is build using two application resources:

  • selHandleFg for the default foreground.
  • selHandleBg for the default background.

If these resources are not defined, selection handles are drawn with a white background and a black foreground.

Parameters
paletteThe new default palette.
See Also
GetDefaultPalette.
static void IlvDrawSelection::SetDefaultSize ( IlvDim  size)
static

Sets the default size for the selection handles.

Parameters
Thenew default size for the selection handles..
See Also
GetDefaultSize.
virtual void IlvDrawSelection::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 from IlvSimpleGraphic.

void IlvDrawSelection::setObject ( IlvGraphic object)

Changes the referenced graphic object.

Parameters
objectThe new associated graphic object.
virtual void IlvDrawSelection::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 from IlvSimpleGraphic.

virtual void IlvDrawSelection::setPalette ( IlvPalette palette)
virtual

Sets the internal palette to the given palette value.

Sets the internal palette to the given palette value. The previous palette is unlocked, and palette is locked.

Parameters
paletteThe new palette of this object.

Reimplemented from IlvSimpleGraphic.

void IlvDrawSelection::setSize ( IlvDim  size)

Changes the size of the selection handles.

Sets to 2 * size the size of the square used by the object to draw the selection handles.

Parameters
sizeThe new size.
See Also
getSize.
static void IlvDrawSelection::SetVisibleWhenObjectIsInvisible ( IlBoolean  f)
static

Sets the visibility policy for selection objects.

Parameters
fA Boolean indicating whether the selection handle is visible when its referenced object is invisible.
See Also
IsVisibleWhenObjectIsInvisible.
virtual IlUInt IlvDrawSelection::whichHandle ( const IlvPoint p,
const IlvTransformer t = 0 
) const
virtual

Returns the selection handle containing a given point.

Parameters
pThe considered point.
tThe transformer applied to the object.
Returns
The index of the handle containing the point p, or IlvBadIndex if it does not lie in any of the handle.

Reimplemented in IlvReshapeSelection, and IlvSplineSelection.

virtual void IlvDrawSelection::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
{
// 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.

Implements IlvGraphic.

virtual IlBoolean IlvDrawSelection::zoomable ( ) const
virtual

Checks whether this object is zoomable.

Returns
IlTrue if the graphic object can be zoomed, and IlFalse otherwise. See the member functions IsZoomAllowed and AllowZoom below.

Reimplemented from IlvGraphic.


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