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

View container class. More...

#include <ilviews/contain/contain.h>

Inheritance diagram for IlvContainer:
IlvDrawingView IlvView IlvAbstractView IlvSystemPort IlvStylable IlvPort IlvValueInterface

Public Member Functions

 IlvContainer (IlvAbstractView *parent, const IlvRect &size, IlBoolean useacc=IlTrue, IlBoolean visible=IlTrue)
 Initializes a new IlvContainer as a child of an existing view. More...
 
 IlvContainer (IlvDisplay *display, const char *name, const char *title, const IlvRect &dims, IlBoolean useacc=IlTrue, IlBoolean visible=IlTrue)
 Initializes a new IlvContainer as a top window. More...
 
 IlvContainer (IlvDisplay *display, const char *name, const char *title, const IlvRect &dims, IlUInt properties, IlBoolean useacc=IlTrue, IlBoolean visible=IlTrue, IlvSystemView transientFor=0)
 Initializes a new IlvContainer as a top window and specific top-level windows properties. More...
 
 IlvContainer (IlvDisplay *display, IlvSystemView parent, const IlvRect &size, IlBoolean useacc=IlTrue, IlBoolean visible=IlTrue)
 Initializes a new IlvContainer as a child of an existing system view. More...
 
 IlvContainer (IlvDisplay *display, IlvSystemView window, IlBoolean useacc=IlTrue)
 Initializes a new IlvContainer that uses an existing system view. More...
 
virtual ~IlvContainer ()
 Deletes all the graphic objects managed by this container.
 
void abortReDraw ()
 Aborts a redraw. More...
 
void addAccelerator (IlvContainerAccelerator *accelerator)
 Adds or replaces a specified accelerator. More...
 
void addAccelerator (IlvContainerAction action, IlvEventType type, IlUShort data=0, IlUShort modifiers=0, IlAny userArg=0, IlUShort optModifiers=0)
 Adds an accelerator to the container. More...
 
virtual void addObject (const char *objectName, IlvGraphic *obj, IlBoolean redraw=IlFalse)
 Adds an object to the top of the container list and names the object. More...
 
virtual void addObject (IlvGraphic *obj, IlBoolean redraw=IlFalse)
 Adds an object at the top of the container list. More...
 
virtual IlBoolean addSmartSet (IlvSmartSet *set, IlBoolean redraw=IlTrue)
 Adds a SmartSet. More...
 
void addTransformer (const IlvTransformer &t)
 Adds to the transformation function. More...
 
virtual void afterDraw (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0)
 Performs a specified draw after a redraw. More...
 
virtual void applyToObject (IlvGraphic *obj, IlvApplyObject func, IlAny arg, IlBoolean reDraw=IlFalse)
 Applies a user function to an object. More...
 
void applyToObjects (IlvApplyObject func, IlAny arg, IlBoolean redraw=IlFalse)
 Applies a user function to all objects. More...
 
void applyToTaggedObjects (const IlSymbol *tag, IlvApplyObject func, IlAny arg, IlBoolean reDraw=IlFalse)
 Applies a user function to all objects with a specified tag. More...
 
virtual void beforeDraw (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0)
 Performs a specified draw before a redraw. More...
 
void bufferedDraw (const IlvGraphic *object)
 Redraws an object with double buffering. More...
 
void bufferedDraw (const IlvRect &rect)
 Redraws a rectangle with double buffering. More...
 
void bufferedDraw (const IlvRegion &region)
 Redraws a region with double buffering. More...
 
IlvGraphiccontains (const IlvPoint &p) const
 Checks whether a point is in the container's objects. More...
 
virtual IlvViewInputFile * createInputFile (istream &stream)
 Creates an input file. More...
 
void disableRedrawTask ()
 Deactivates the lazy redraw mechanism. More...
 
virtual IlBoolean dispatchToObjects (IlvEvent &event)
 Dispatches an event to an object. More...
 
void draw (const IlvRect *rect)
 Draws all objects within a rectangle. More...
 
virtual void draw (const IlvRegion *clip=0)
 Draws all objects in this container with a clipping region. More...
 
virtual void draw (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0)
 Draws all objects with transformation and a clipping region. More...
 
virtual void fitToContents ()
 Resizes the container to fit the overall bounding box of the graphic objects. More...
 
virtual void fitTransformerToContents (IlBoolean redraw=IlTrue)
 Resizes the objects to fit the container. More...
 
virtual void flushRedraw ()
 Performs the actual redraw of invalid regions. More...
 
IlBoolean getAccelerator (IlvContainerAction *action, IlAny *userArg, IlvEventType type, IlUShort buttonOrKey=0, IlUShort modifiers=0) const
 Gets an accelerator by action and user argument. More...
 
IlvContainerAcceleratorgetAccelerator (IlvEventType type, IlUShort button=0, IlUShort modifiers=0) const
 Gets an accelerator by event. More...
 
IlUInt getCardinal () const
 Gets the number of objects in this container. More...
 
IlInt getIndex (IlvGraphic *obj) const
 Gets the index of a graphic object in this container. More...
 
IlvGraphicgetObject (const char *name) const
 Gets an object by name. More...
 
IlvGraphicgetObject (IlUInt index) const
 Gets an object by index. More...
 
IlvViewObjectInteractor * getObjectInteractor (const IlvGraphic *) const
 Gets an object interactor. More...
 
const char * getObjectName (const IlvGraphic *obj) const
 Gets an object name. More...
 
IlvGraphic *const * getObjects (IlUInt &count) const
 Gets all objects in the container. More...
 
IlvSmartSetgetSmartSet (const char *name) const
 Gets a SmartSet. More...
 
IlvGraphic *const * getTaggedObjects (const IlSymbol *tag, IlUInt &count) const
 Gets all objects with a specified tag. More...
 
IlvTransformergetTransformer () const
 Gets the transformation function. More...
 
virtual void handleExpose (IlvEvent &)
 Handles a newly exposed region. More...
 
virtual void handleInput (IlvEvent &)
 Handles an input event. More...
 
virtual void hide ()
 Hides the view. More...
 
void initReDraw ()
 Initializes an invalidated region to empty. More...
 
virtual void insertObject (IlvGraphic *obj, IlBoolean redraw=IlFalse)
 Inserts the object at the bottom of the container list. More...
 
void invalidateRegion (const IlvGraphic *object)
 Invalidates an object's region. More...
 
void invalidateRegion (const IlvRect &rect)
 Invalidates a rectangle's region. More...
 
void invalidateRegion (const IlvRegion &rect)
 Invalidates a region.. More...
 
void invalidateRegion (const IlvRegionUpdater &updater, const IlvGraphic *graphic=0)
 Updates the invalidated region. More...
 
IlBoolean isDoubleBuffering () const
 Tests the double buffering setting. More...
 
IlBoolean isInvalidating () const
 Indicates whether the container is in a phase of invalidating regions. More...
 
IlBoolean isVisible (const IlvGraphic *obj) const
 Tests the visibility setting of an object. More...
 
virtual IlBoolean read (istream &stream)
 Loads a Rogue Wave Views data file from the input stream. More...
 
virtual IlBoolean readFile (const char *filename)
 Reads a Rogue Wave Views data file. More...
 
void reDraw (const IlvRect *rect)
 Redraws all objects within a rectangular clipping area. More...
 
virtual void reDraw (const IlvRegion *clip=0)
 Redraws all objects with a clipping region. More...
 
void reDrawObj (IlvGraphic *obj)
 Redraws an object. More...
 
void reDrawView (IlBoolean erase=IlTrue, IlBoolean buffered=IlFalse)
 Redraws a view. More...
 
void registerCallback (const char *callbackName, IlvGraphicCallback callback)
 Registers a callback. More...
 
void removeAccelerator (IlvContainerAccelerator *acc)
 Removes a specified accelerator. More...
 
void removeAccelerator (IlvEventType type, IlUShort buttonOrKey=0, IlUShort modifiers=0)
 Removes an accelerator by event. More...
 
virtual IlBoolean removeObject (IlvGraphic *obj, IlBoolean redraw=IlFalse)
 Removes an object from the container. More...
 
virtual void removeObjects (IlBoolean destroy=IlTrue, IlBoolean redraw=IlTrue)
 Removes all objects from the container. More...
 
virtual IlBoolean removeSmartSet (IlvSmartSet *set)
 Removes a SmartSet from this container. More...
 
void removeTaggedObjects (const IlSymbol *tag, IlBoolean destroy=IlTrue, IlBoolean reDraw=IlTrue)
 Removes all objects with a specified tag. More...
 
virtual IlvGraphicreplace (IlvGraphic *oldObject, IlvGraphic *newObject, IlBoolean redraw=IlFalse)
 Replaces an object. More...
 
virtual void setBackground (IlvColor *c)
 Sets the background color of this view. More...
 
virtual void setBackgroundBitmap (IlvBitmap *)
 Sets the background bitmap of this view. More...
 
IlBoolean setDoubleBuffering (IlBoolean value)
 Sets double buffering. More...
 
IlBoolean setObjectInteractor (IlvGraphic *, IlvViewObjectInteractor *)
 Sets an object interactor on a graphic object. More...
 
virtual void setObjectName (IlvGraphic *obj, const char *name)
 Sets the name of an object. More...
 
virtual void setTransformer (const IlvTransformer &)
 Applies another transformer to the coordinates provided for the drawing functions. More...
 
void setTransformer (const IlvTransformer *t=0)
 Sets the transformation function. More...
 
virtual void setVisible (IlvGraphic *obj, IlBoolean visible, IlBoolean redraw=IlFalse)
 Sets the visibility of an object. More...
 
virtual IlBoolean shortCut (IlvEvent &event)
 Verbose: More...
 
virtual void show ()
 Shows the view. More...
 
virtual void swap (IlvGraphic *obj1, IlvGraphic *obj2)
 Swaps two objects. More...
 
void translateView (IlvPos dx, IlvPos dy, IlBoolean redraw=IlTrue)
 Translates the current view. More...
 
void unregisterCallback (const char *callbackName)
 Unregisters a callback. More...
 
void visibleBBox (IlvRect &bbox) const
 Determines the visible bounding box of the container. More...
 
void zoomView (const IlvPoint &center, IlFloat scaleX, IlFloat scaleY=0.0, IlBoolean redraw=IlTrue)
 Zooms the current view. More...
 
- Public Member Functions inherited from IlvDrawingView
 IlvDrawingView (IlvAbstractView *parent, const IlvRect &size, IlBoolean visible=IlTrue)
 Constructor. More...
 
 IlvDrawingView (IlvDisplay *display, const char *name, const char *title, const IlvRect &size, IlBoolean visible=IlTrue)
 Constructor. More...
 
 IlvDrawingView (IlvDisplay *display, const char *name, const char *title, const IlvRect &size, IlUInt properties, IlBoolean visible=IlTrue, IlvSystemView transientFor=0)
 Constructor. More...
 
 IlvDrawingView (IlvDisplay *display, IlvSystemView available)
 Constructor. More...
 
 IlvDrawingView (IlvDisplay *display, IlvSystemView parent, const IlvRect &size, IlBoolean visible=IlTrue)
 Constructor. More...
 
- Public Member Functions inherited from IlvView
 IlvView (IlvAbstractView *parent, const IlvRect &size, IlBoolean visible=IlTrue)
 Initializes a new view object that is a child of another view. More...
 
 IlvView (IlvDisplay *display, const char *name, const char *title, const IlvRect &size, IlBoolean visible=IlTrue)
 Initializes a new view object that is a new top window. More...
 
 IlvView (IlvDisplay *display, const char *name, const char *title, const IlvRect &size, IlUInt properties, IlBoolean visible=IlTrue, IlvSystemView transientFor=0)
 Initializes a new view object that is a new top window with specific top-window properties. More...
 
 IlvView (IlvDisplay *display, IlvSystemView available)
 Initializes a new view object by actually using an existing system view. More...
 
 IlvView (IlvDisplay *display, IlvSystemView parent, const IlvRect &size, IlBoolean visible=IlTrue)
 Initializes a new view that is a child of an existing system view. More...
 
void addProperty (const IlSymbol *key, IlAny value)
 Adds a property to the view. More...
 
void ensureInScreen (IlvPos xMargin=0, IlvPos yMargin=0)
 Ensures that the view remains visible. More...
 
const char * getName () const
 Retrieves the name. More...
 
IlAny getProperty (const IlSymbol *key) const
 Retrieves a property. More...
 
ShapegetShape () const
 Returns the view shape. More...
 
virtual const char * getStylableName () const
 Returns the name of this object. More...
 
const char * getTitle () const
 Retrieves the title of this view. More...
 
IlBoolean hasProperty (const IlSymbol *key) const
 Checks the existence of a property. More...
 
void iconBitmap (IlvBitmap *image, IlvBitmap *mask=0)
 Sets the icon aspect. More...
 
void iconify ()
 Requests this window to iconify itself. More...
 
virtual IlBoolean isIconified () const
 Retrieves the iconified state. More...
 
IlBoolean isModal () const
 Queries the modality of this view. More...
 
IlBoolean isVisible () const
 Retrieves the visibility. More...
 
virtual void move (const IlvPoint &point)
 Moves the view. More...
 
virtual void moveResize (const IlvRect &rect)
 Moves and resizes the view. More...
 
void moveToMouse (IlvDirection alignment=IlvCenter, IlvPos dx=0, IlvPos dy=0, IlBoolean ensureInScreen=IlTrue)
 Moves the view relative to the location of the mouse. More...
 
void moveToScreen (IlvDirection alignment=IlvCenter, IlvPos dx=0, IlvPos dy=0, IlBoolean ensureInScreen=IlTrue)
 Moves the view relative to the root window. More...
 
void moveToView (const IlvView *view, IlvDirection alignment=IlvCenter, IlvPos dx=0, IlvPos dy=0, IlBoolean ensureInScreen=IlTrue)
 Moves the view relative to another view. More...
 
virtual void removeDeleteCallback (IlvDestroyCallback del=0, IlAny userArg=0)
 Removes a Delete callback. More...
 
virtual void removeDestroyCallback (IlvDestroyCallback destroy=0, IlAny userArg=0)
 Removes a Destroy callback. More...
 
virtual void removeExposeCallback (IlvExposeCallback expose=0, IlAny userArg=0)
 Removes an Expose callback. More...
 
virtual void removeInputCallback (IlvInputCallback input=0, IlAny userArg=0)
 Removes an Input callback. More...
 
virtual void removePostResizeCallback (IlvResizeCallback resize, IlAny userArg=0)
 Removes a post Resize callback. More...
 
IlBoolean removeProperty (const IlSymbol *key)
 Removes a property. More...
 
virtual void removeResizeCallback (IlvResizeCallback resize=0, IlAny userArg=0)
 Removes a Resize callback. More...
 
IlBoolean replaceProperty (const IlSymbol *key, IlAny value)
 Replaces a property. More...
 
virtual void resize (IlvDim w, IlvDim h)
 Resizes the view. More...
 
virtual void setDeleteCallback (IlvDestroyCallback del, IlAny userArg=0)
 Sets a callback that watches for destruction. More...
 
virtual void setDestroyCallback (IlvDestroyCallback destroy, IlAny userArg=0)
 Sets a callback for Destroy events. More...
 
virtual void setExposeCallback (IlvExposeCallback expose, IlAny userArg=0)
 Sets a callback for Expose events. More...
 
void setIconTitle (const char *title)
 Sets the iconified title of this view. More...
 
virtual void setInputCallback (IlvInputCallback input, IlAny userArg=0)
 Sets a callback for Input events. More...
 
void setMaximumSize (IlvDim w, IlvDim h)
 Sets the maximum size of this view. More...
 
void setMinimumSize (IlvDim w, IlvDim h)
 Sets the minimum size of this view. More...
 
virtual void setName (const char *name)
 Sets the name. More...
 
virtual void setPostResizeCallback (IlvResizeCallback resize, IlAny userArg=0)
 Sets a callback for Resize events. More...
 
void setProperty (const IlSymbol *key, IlAny value)
 Sets or removes a property. More...
 
virtual void setResizeCallback (IlvResizeCallback resize, IlAny userArg=0)
 Sets a callback for Resize events. More...
 
IlBoolean setShape (Shape *newShape)
 Sets a shape on the view. More...
 
virtual void setTitle (const char *title)
 Sets the title of the view. More...
 
virtual IlBoolean showModal (IlBoolean doesGrab=IlFalse, IlvCursor *cursor=0)
 Shows the window in a modal mode. More...
 
- Public Member Functions inherited from IlvAbstractView
virtual void boundingBox (IlvRect &bbox) const
 Retrieves the relative dimensions of the view. More...
 
IlBoolean enableMultitouch (IlBoolean enable)
 Allows the view to receive multi-touch events. More...
 
void ensureVisible (const IlvPoint &point)
 Ensures that a point remains visible. More...
 
void ensureVisible (const IlvRect &rect)
 Ensures that a rectangle remains visible. More...
 
virtual void erase (const IlvRect &rect, IlBoolean reDraw=IlFalse)
 Erases an area of this view. More...
 
virtual void erase (IlBoolean reDraw=IlFalse)
 Entirely erases the view. More...
 
virtual void frameBBox (IlvRect &bbox) const
 Retrieves the dimension of the view frame. More...
 
IlvColorgetBackground () const
 Retrieves the background color of this view. More...
 
IlvBitmapgetBackgroundBitmap () const
 Gets the background bitmap of this view. More...
 
IlBoolean getCompressButtonDragged () const
 Indicates if IlvButtonDragged compression is enabled or not. More...
 
IlBoolean getCompressPointerMoved () const
 Indicates if IlvPointerMoved compression is enabled or not. More...
 
IlvCursorgetCursor () const
 Retrieves the cursor currently set on this view. More...
 
IlvIntensity getOpacity () const
 Returns the opacity level of the view. More...
 
virtual void getOuterStylableSize (IlvDim &, IlvDim &) const
 Returns the size of the outer stylable if any. More...
 
IlvAbstractViewgetParent () const
 Gets the parent of this view. More...
 
IlvSystemView getShellSystemView () const
 Gets the system-dependent identifier of the top shell of this view. More...
 
virtual const char * getStylableClassName () const
 Returns the class name of this object. More...
 
virtual IlvDisplaygetStylableDisplay () const
 Returns the display for this object. More...
 
virtual void getStylableSize (IlvDim &, IlvDim &) const
 Returns the size of this object. More...
 
virtual IlvStylistgetStylist () const
 Returns the stylist for this object. More...
 
IlvSystemView getSystemView () const
 Gets the system-dependent identifier of this view. More...
 
void getTransparentColorKey (IlvIntensity &r, IlvIntensity &g, IlvIntensity &b) const
 Returns the color used as a key for transparency. More...
 
virtual void globalBBox (IlvRect &bbox) const
 Retrieves the absolute dimensions of the view. More...
 
IlBoolean hasGrab () const
 Queries if this view has the display grab. More...
 
IlBoolean isLayered () const
 Returns whether the view is layered or not. More...
 
IlBoolean isMultitouchEnabled ()
 Queries if the view is set to receive multi-touch events. More...
 
virtual IlBoolean isScrolled () const
 Indicates if the view is a scrolling window subview. More...
 
IlBoolean isSensitive () const
 Retrieves the sensitivity of this view to input events. More...
 
virtual void lower ()
 Pushes this view below the others. More...
 
virtual void position (IlvPoint &position) const
 Retrieves the position of the view. More...
 
virtual void raise ()
 Brings this view on top. More...
 
void removeWindowProc (IlvWindowProc windowProc, IlAny procArgument=0)
 Removes a user-defined window procedure. More...
 
virtual void setCompressButtonDragged (IlBoolean val)
 Enables or disables IlvButtonDragged event compression. More...
 
virtual void setCompressPointerMoved (IlBoolean val)
 Enables or disables IlvPointerMoved event compression. More...
 
void setCursor (IlvCursor *cursor)
 Sets the cursor for this view. More...
 
IlBoolean setFocus ()
 Sets the input focus to this view. More...
 
void setLayered (IlBoolean layered)
 Sets whether the window is layered or not. More...
 
void setOpacity (IlvIntensity level)
 Sets the opacity value of the view. More...
 
void setSensitive (IlBoolean sensitivity)
 Sets the sensitivity of this view to input events. More...
 
IlBoolean setShapeMask (const IlvBitmap *mask, IlBoolean addTitle=IlFalse)
 Sets a non-rectangular shape on the view according to a bitmap mask. More...
 
void setTransparentColorKey (IlvIntensity r, IlvIntensity g, IlvIntensity b)
 Sets the transparency color key value. More...
 
void setWindowProc (IlvWindowProc windowProc, IlAny procArgument=0)
 Sets a Windows window procedure. More...
 
virtual void sizeVisible (IlvRect &rect) const
 Retrieves the visible part of the view. More...
 
- Public Member Functions inherited from IlvSystemPort
 IlvSystemPort (IlvDisplay *display, IlvWindowsHandle HDC, IlvDim width=0, IlvDim height=0)
 Windows-specific constructor. More...
 
virtual IlBoolean applyValue (const IlvValue &)
 Apply an accessor. More...
 
virtual void clearArea (const IlvRect &, IlBoolean=IlFalse) const
 Clears a rectangular area of the screen. More...
 
virtual void clearArea (const IlvRegion &, IlBoolean=IlFalse) const
 Clears a region of the screen. More...
 
virtual void clip (const IlvRect *) const
 Limits the drawing to the given rectangular area. More...
 
virtual void clip (const IlvRegion *) const
 Limits the drawing to the given region. More...
 
virtual IlUShort depth () const
 Gives the depth of the port. More...
 
virtual void drawArc (const IlvPalette *, const IlvRect &, IlFloat, IlFloat) const
 Draws an arc. More...
 
virtual void drawBitmap (const IlvPalette *, const IlvBitmap *, const IlvRect &, const IlvRegion *=0, IlvPosition=IlvCenter, IlBoolean=IlFalse) const
 Draws an image. More...
 
virtual void drawBitmap (const IlvPalette *, const IlvSystemPort *, const IlvRect &, const IlvPoint &) const
 Draws an image. More...
 
virtual void drawIString (const IlvPalette *, const IlvPoint &, const char *, int, IlvPosition=IlvLeft) const
 Draws a string at the given position. More...
 
virtual void drawLine (const IlvPalette *, const IlvPoint &, const IlvPoint &) const
 Draws a line between 2 points. More...
 
virtual void drawPoint (const IlvPalette *, const IlvPoint &) const
 Draws a point at the given position. More...
 
virtual void drawPoints (const IlvPalette *, IlUInt, const IlvPoint *) const
 Draws a series of points. More...
 
virtual void drawPolyLine (const IlvPalette *, const IlvPoint &, IlUInt, const IlvDeltaPoint *) const
 Draws a series of connected lines relatively to a reference. More...
 
virtual void drawPolyLine (const IlvPalette *, IlUInt, const IlvPoint *) const
 Draws a series of connected lines. More...
 
virtual void drawRectangle (const IlvPalette *, const IlvRect &) const
 Draws the given rectangle. More...
 
virtual void drawRoundRectangle (const IlvPalette *, const IlvRect &, IlUShort) const
 Draws a round rectangle. More...
 
virtual void drawSegments (const IlvPalette *, IlUInt, const IlvPoint *, const IlvPoint *) const
 Draws a set of segments. More...
 
virtual void drawString (const IlvPalette *, const IlvPoint &, const char *, int, IlvPosition=IlvLeft) const
 Draws a string at the given position. More...
 
virtual void drawTransformedString (const IlvPalette *, const char *, int, const IlvTransformer &, const IlvRegion *=0) const
 Draws a transformed string. More...
 
virtual void drawTransparentBitmap (const IlvPalette *, const IlvSystemPort *, const IlvRect &, const IlvPoint &) const
 Draws a transparent bitmap. More...
 
virtual void end ()
 Closed the dump device. More...
 
virtual void fillArc (const IlvPalette *, const IlvRect &, IlFloat, IlFloat) const
 Fills the arc. More...
 
virtual void fillPaths (const IlvPalette *, IlUInt, const IlvPointArray *) const
 Fills the shape defined by the given paths. More...
 
virtual void fillPolyLine (const IlvPalette *, const IlvPoint &, IlUInt, const IlvDeltaPoint *, IlBoolean=IlFalse) const
 Fills a polygon. More...
 
virtual void fillPolyLine (const IlvPalette *, IlUInt, const IlvPoint *, IlBoolean=IlFalse) const
 Fills a polygon. More...
 
virtual void fillRectangle (const IlvPalette *, const IlvRect &) const
 Fills the given rectangle. More...
 
virtual void fillRoundRectangle (const IlvPalette *, const IlvRect &, IlUShort) const
 Fills a round rectangle. More...
 
IlvWindowsHandle getDC () const
 Gets the Windows Handle Device Context. More...
 
virtual IlBoolean initDevice (const char *, IlvRect *=0)
 Initializes the dump device. More...
 
virtual IlBoolean isABitmap () const
 Indicates that this port is a bitmap (not a view or a dump device). More...
 
virtual IlBoolean isASystemPort () const
 Indicates that this port is a true system port (not a dump device). More...
 
virtual IlBoolean isBad () const
 Indicates whether this port is valid. More...
 
virtual IlBoolean newPage () const
 Produces an output page and prepares for a new page. More...
 
void releaseDC ()
 Releases the Windows Handle Device Context. More...
 
virtual void send (const char *) const
 Sends character strings to an output device. More...
 
virtual void stretchBitmap (const IlvPalette *, const IlvPoint &, const IlvBitmap *, const IlvTransformer &, const IlvRect *=0) const
 Stretches a bitmap. More...
 
virtual void stretchBitmap (const IlvPalette *, const IlvRect &, const IlvBitmap *, const IlvRect *=0) const
 Stretches a bitmap. More...
 
virtual void stretchBitmapData (const IlvPalette *palette, const IlvBitmapData *src, const IlvRect &from, const IlvRect &to, IlBoolean opaque=IlFalse) const
 Draws a bitmap data. More...
 
virtual void stretchTransparentBitmap (const IlvPalette *, const IlvPoint &, const IlvBitmap *, const IlvTransformer &, const IlvRect *=0) const
 Stretches a transparent bitmap. More...
 
virtual void stretchTransparentBitmap (const IlvPalette *, const IlvRect &, const IlvBitmap *, const IlvRect *=0) const
 Stretches a transparent bitmap. More...
 
- Public Member Functions inherited from IlvPort
 IlvPort (IlvDisplay *display=0)
 Constructor. More...
 
void composeAlpha (IlvIntensity alpha)
 Composes the current alpha value of the port. More...
 
virtual void drawArrow (const IlvPalette *palette, const IlvPoint &from, const IlvPoint &to, IlFloat position) const
 Draws an arrow. More...
 
virtual void drawBezier (const IlvPalette *palette, IlUInt count, const IlvPoint *points) const
 Draws a set of Bézier curves. More...
 
virtual void drawClosedBezier (const IlvPalette *palette, IlUInt count, const IlvPoint *points) const
 Appends a closing curve to a set of Bézier curves. More...
 
virtual void drawILabel (const IlvPalette *palette, const char *label, int length, const IlvRect &drawRect, const IlvRegion *clip=0, IlvPosition align=IlvCenter) const
 Draws a label in a rectangle. More...
 
virtual void drawLabel (const IlvPalette *palette, const char *label, int length, const IlvRect &drawRect, const IlvRegion *clip=0, IlvPosition align=IlvCenter) const
 Draws a label in a rectangle. More...
 
virtual void drawMarker (const IlvPalette *palette, const IlvPoint &location, IlvMarkerType type=IlvMarkerSquare, IlUShort size=IlvDefaultMarkerSize) const
 Draws a marker. More...
 
virtual void drawMnemonicLabel (const IlvPalette *palette, const char *label, const IlvRect &drawRect, const IlvRegion *clip=0, IlvPosition align=IlvCenter, IlBoolean underline=IlTrue) const
 Draws an underlined letter in a label. More...
 
virtual void drawOutlineRectangle (const IlvPalette *outlinePalette, const IlvPalette *fillPalette, const IlvRect &rect, const IlvRegion *clip=0) const
 Draws a rectangle with border effects. More...
 
virtual void drawPaths (const IlvPalette *palette, IlUInt count, const IlvPointArray *paths) const
 Draws an array of paths as polylines. More...
 
virtual void drawReliefDiamond (const IlvPalette *, const IlvPalette *invertedPalette, const IlvPalette *topShade, const IlvPalette *bottomShade, const IlvRect &bbox, IlUShort thickness, const IlvRegion *clip=0) const
 Draws a diamond with depth effects. More...
 
virtual void drawReliefRectangle (const IlvPalette *palette, const IlvPalette *invertedPalette, const IlvPalette *topShade, const IlvPalette *bottomShade, const IlvRect &bbox, IlUShort thickness, const IlvRegion *clip=0) const
 Draws a filled rectangle with depth effects. More...
 
virtual void drawShadowRectangle (const IlvPalette *palette, const IlvPalette *invertedPalette, const IlvRect &bbox, IlUShort thickness, IlvPosition shadowPosition, const IlvRegion *clip=0) const
 Draws a filled rectangle with its shadow. More...
 
virtual void fillBezier (const IlvPalette *palette, IlUInt count, const IlvPoint *points) const
 Fills an area specified by a set of Bézier curves. More...
 
IlvIntensity getAlpha () const
 Provides the alpha value of the port. More...
 
IlvAntialiasingMode getAntialiasingMode () const
 Provides the anti-aliasing mode of the port. More...
 
IlvDisplaygetDisplay () const
 Returns a pointer to the IlvDisplay of this port. More...
 
IlvDim height () const
 Provides the height of the port. More...
 
virtual IlBoolean isADevice () const
 Indicates that this port is a dump device. More...
 
void setAlpha (IlvIntensity alpha)
 Sets the alpha value of the port. More...
 
void setAntialiasingMode (IlvAntialiasingMode mode)
 Sets the anti-aliasing mode of the port. More...
 
void size (IlvDim &w, IlvDim &h) const
 Gives the dimensions of the port. More...
 
IlvDim width () const
 Provides the width of the port. More...
 
- Public Member Functions inherited from IlvValueInterface
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 void getAccessors (const IlSymbol *const **names, const IlvValueTypeClass *const **types, IlUInt &count) const
 Retrieves the list of available accessors of an object. 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...
 
- Public Member Functions inherited from IlvStylable
 IlvStylable ()
 Constructor.
 
virtual const IlvStylablegetStylableParent () const
 Returns the parent of this object in the style hierarchy. More...
 
virtual const IlSymbol *const * getStylableTags (IlUInt &nTags) const
 Returns the tags of this object. More...
 

Static Public Member Functions

static IlvContainerGetContainer (const IlvGraphic *obj)
 Gets an object's container. More...
 
- Static Public Member Functions inherited from IlvSystemPort
static IlvBitmapDataGetBitmapData (IlvSystemPort *port, const IlvRect *rect=0)
 Creates an IlvBitmapData from a rectangular area in an IlvSystemPort. More...
 

Protected Member Functions

virtual void eraseRegion (const IlvRegion &region)
 Erases a region. More...
 

Detailed Description

View container class.

Library: views

A container coordinates the storage and the display of graphic objects.

If your display device has touch-screen capability, the IlvContainer allows you to use it to pan, zoom or rotate the view using regular multi-touch gestures. If you do not want this, you can set the environment variable ILVTOUCHSCREENNAVIGATION or the display resource touchScreenNavigation to false. This will disable this default behavior for every window of your application.
You can also set the display resource touchScreenNavigation specifically for your IlvContainer class or identifier.

See also
IlvContainerAccelerator, IlvEvent, IlvGraphic, IlvTransformer, IlvContainerAction.

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 IlvDrawingView and adds the following ones:

Data accessors

Name Type Equivalent methods
doubleBuffering Boolean isDoubleBuffering(), setDoubleBuffering()
cardinal UInt getCardinal()

Method accessors

Name Return type Equivalent methods
getObject(String name) Object getObject(const char* name) const
getObjectAt(UInt index) Object getObject(IlUInt index) const
getIndex(Object object) Int getIndex(IlvGraphic* object) const
addObject(Object object) Void addObject(IlvGraphic* object, IlBoolean)
insertObject(Object object) Void insertObject(IlvGraphic* object, IlBoolean)
removeObject(Object object) Boolean removeObject(IlvGraphic* object, IlBoolean)
removeObjects(Boolean destroy) Void removeObjects(IlBoolean destroy, IlBoolean)
contains(IlvPoint position) Object contains(const IlvPoint& position) const
swap(Object object1, Object object2) Void swap(IlvGraphic* object1, IlvGraphic* object2)
translateView(Int dx, Int dy) Void translateView(IlvPos dx, IlvPos dy, IlBoolean)
zoomView(IlvPoint center, Float scaleX, Float scaleY) Void zoomView(const IlvPoint& center, IlFloat scaleX, IlFloat scaleY, IlBoolean)
fitToContents() Void fitToContents()
fit() Void fitTransformerToContents()
redraw() Void reDraw(const IlvRegion*)
readFile(String file) Boolean readFile(const char* file)

Constructor & Destructor Documentation

◆ IlvContainer() [1/5]

IlvContainer::IlvContainer ( IlvAbstractView parent,
const IlvRect size,
IlBoolean  useacc = IlTrue,
IlBoolean  visible = IlTrue 
)

Initializes a new IlvContainer as a child of an existing view.

Parameters
parentThe parent view.
sizeThe dimensions of the container.
useaccThis optional Boolean parameter must be set to IlFalse if you do not want the default accelerators to be installed at creation time.
visibleSpecifyies whether the container is to be initially visible (IlTrue) or invisible (IlFalse).

◆ IlvContainer() [2/5]

IlvContainer::IlvContainer ( IlvDisplay display,
IlvSystemView  parent,
const IlvRect size,
IlBoolean  useacc = IlTrue,
IlBoolean  visible = IlTrue 
)

Initializes a new IlvContainer as a child of an existing system view.

Parameters
displayThe display instance.
parentThe parent system view.
sizeThe dimensions of the container.
useaccMust be set to IlFalse if you do not want the default accelerators to be installed at creation time.
visibleSpecifyies whether the container is to be initially visible (IlTrue) or invisible (IlFalse).

◆ IlvContainer() [3/5]

IlvContainer::IlvContainer ( IlvDisplay display,
IlvSystemView  window,
IlBoolean  useacc = IlTrue 
)

Initializes a new IlvContainer that uses an existing system view.

Parameters
displayThe display instance.
windowThe existing system view.
useaccMust be set to IlFalse if you do not want the default accelerators to be installed at creation time.

◆ IlvContainer() [4/5]

IlvContainer::IlvContainer ( IlvDisplay display,
const char *  name,
const char *  title,
const IlvRect dims,
IlBoolean  useacc = IlTrue,
IlBoolean  visible = IlTrue 
)

Initializes a new IlvContainer as a top window.

Parameters
displayThe display window.
nameThe name of the view.
titleThe title of this top window.
dimsThe initial location and size of the view, relative to the root window of display.
useaccMust be set to IlFalse if you do not want the default accelerators to be installed at creation time.
visibleSpecifyies whether the container is to be initially visible (IlTrue) or invisible (IlFalse).

◆ IlvContainer() [5/5]

IlvContainer::IlvContainer ( IlvDisplay display,
const char *  name,
const char *  title,
const IlvRect dims,
IlUInt  properties,
IlBoolean  useacc = IlTrue,
IlBoolean  visible = IlTrue,
IlvSystemView  transientFor = 0 
)

Initializes a new IlvContainer as a top window and specific top-level windows properties.

Parameters
displayThe display instance.
nameThe name of the view.
titleThe title of this top window.
dimsThe initial location and size of the view, relative to the root window of display.
propertiesThe properties of the view.
useaccMust be set to IlFalse if you do not want the default accelerators to be installed at creation time.
visibleSpecifyies whether the view is to be initially visible (IlTrue) or invisible (IlFalse).
transientForThe possible system view for which this view is transient. If unspecified or set to 0, this view will not be transient for any view.

Member Function Documentation

◆ abortReDraw()

void IlvContainer::abortReDraw ( )

Aborts a redraw.

Forgets all invalidated areas. If calls to initReDraw() were embedded, they are all reset.

◆ addAccelerator() [1/2]

void IlvContainer::addAccelerator ( IlvContainerAccelerator accelerator)

Adds or replaces a specified accelerator.

Installs an accelerator as a new accelerator in this container. If there already was a matching accelerator (same type, data (button or key), and modifiers), then the previous accelerator is removed (but not destroyed).

Parameters
acceleratorThe accelerator.

◆ addAccelerator() [2/2]

void IlvContainer::addAccelerator ( IlvContainerAction  action,
IlvEventType  type,
IlUShort  data = 0,
IlUShort  modifiers = 0,
IlAny  userArg = 0,
IlUShort  optModifiers = 0 
)

Adds an accelerator to the container.

Creates an IlvContainerAccelerator using the same arguments and adds it to the IlvContainer accelerator list (see the constructor for argument descriptions). When the container receives an event, it checks its accelerator list. If an appropriate accelerator is found, that is, accelerator->trigger(<event description>) returns IlTrue, then accelerator->activate() is called.

Parameters
actionThe user function used as the accelerator action.
typeThe accelerator event type.
dataThe accelerator event data (button or key).
modifiersThe accelerator event modifiers.
userArgThe accelerator action user argument.
optModifiersThe accelerator optional event modifiers.

◆ addObject() [1/2]

virtual void IlvContainer::addObject ( const char *  objectName,
IlvGraphic obj,
IlBoolean  redraw = IlFalse 
)
virtual

Adds an object to the top of the container list and names the object.

Calls addObject(obj, redraw) then setObjectName(name).

Note
If the object has a name that is already in use in this container, the name is removed from the object.
Parameters
objectNameThe name of the object.
objThe object to be added.
redrawIf set to IlTrue the container is redrawn. If it is set to IlFalse, the container will not be redrawn.

◆ addObject() [2/2]

virtual void IlvContainer::addObject ( IlvGraphic obj,
IlBoolean  redraw = IlFalse 
)
virtual

Adds an object at the top of the container list.

The object is appended at the final position. In other words, the new object is placed "on top of" all the others.

Note
If the object has a name that is already in use in this container, the name is removed from the object.
Parameters
objThe object to be added.
redrawIf set to IlTrue the container display is updated.

◆ addSmartSet()

virtual IlBoolean IlvContainer::addSmartSet ( IlvSmartSet set,
IlBoolean  redraw = IlTrue 
)
virtual

Adds a SmartSet.

The set to be added must have a name. If there already is a SmartSet in this container with the same name, the SmartSet is renamed by adding 1 at the end of the name, or by incrementing the decimal value at the end of the name.

If the SmartSet contains objects that are not stored in this container, they are added to the container.

Parameters
setThe SmartSet to be added.
redrawIf set to IlTrue the container is redrawn. If it is set to IlFalse, the container will not be redrawn.
Returns
IlFalse on error, that is, if set contains objects located in another container.

◆ addTransformer()

void IlvContainer::addTransformer ( const IlvTransformer t)

Adds to the transformation function.

Composes the current transformer with the one given in t and sets the resulting transformer as the new current one for this container object. The transformer is internally copied during this function call.

Parameters
tThe additional transformer.

◆ afterDraw()

virtual void IlvContainer::afterDraw ( IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
)
virtual

Performs a specified draw after a redraw.

Acts in the same way as beforeDraw() but is called after the objects in the container have been drawn. This lets you create additional drawings on top of the container objects.

Parameters
dstThe destination drawing port.
tThe transformation to be applied, or 0 if none.
clipThe clipping region, or 0 if none.
See also
beforeDraw().

◆ applyToObject()

virtual void IlvContainer::applyToObject ( IlvGraphic obj,
IlvApplyObject  func,
IlAny  arg,
IlBoolean  reDraw = IlFalse 
)
virtual

Applies a user function to an object.

Applies the func user-defined function, typed IlvApplyObject, to the object obj which receives the additional arg parameter. You can set redraw to IlTrue to update the object's drawing automatically.

Parameters
objThe object to which the function is applied.
funcThe user function.
argA user argument passed with the user function.
reDrawIf set to IlTrue the object is redrawn. If it is set to IlFalse, the object will not be redrawn.

◆ applyToObjects()

void IlvContainer::applyToObjects ( IlvApplyObject  func,
IlAny  arg,
IlBoolean  redraw = IlFalse 
)

Applies a user function to all objects.

Applies the func user-defined function, typed IlvApplyObject, to each object of the IlvContainer which receives the additional arg parameter. You can set redraw to IlTrue to update the objects' drawing automatically.

This redraws all the objects simultaneously (and not one by one).

Parameters
funcThe user function.
argA user argument passed with the user function.
redrawIf set to IlTrue the container is redrawn. If it is set to IlFalse, the container will not be redrawn.

◆ applyToTaggedObjects()

void IlvContainer::applyToTaggedObjects ( const IlSymbol tag,
IlvApplyObject  func,
IlAny  arg,
IlBoolean  reDraw = IlFalse 
)

Applies a user function to all objects with a specified tag.

Calls the IlvApplyObject function func on every object tagged with tag in the container. This function is similar to the method applyToObject().

Note
For all the applyTo... member functions, you must not select nor remove an object within an applicative function, and calls to applyTo...() member functions should not be nested. Furthermore, when using these functions, you must not move an object from one layer to another.
Parameters
tagThe tag that defines the objects to be included.
funcThe user function.
argA user argument passed with the user function.
reDrawIf set to IlTrue the container is redrawn. If it is set to IlFalse, the container will not be redrawn.

◆ beforeDraw()

virtual void IlvContainer::beforeDraw ( IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
)
virtual

Performs a specified draw before a redraw.

Called internally by a container just before it redraws the objects stored in it. Use this function if you need to draw something before the objects stored in the container are drawn. Use the dst parameter as the output port for your drawing functions. This may differ from the actual output port of the container.

The clip parameter gives the clipping region that should be used.

Parameters
dstThe destination drawing port.
tThe transformation to be applied, or 0 if none.
clipThe clipping region, or 0 if none.

◆ bufferedDraw() [1/3]

void IlvContainer::bufferedDraw ( const IlvGraphic object)

Redraws an object with double buffering.

Performs temporary drawing in a hidden pixmap, then displays the pixmap on the screen at once. The main difference with double buffering is whether the operation is localized to a rectangle, a region, or an object. This function draws object (in the coordinate system of the object).

Parameters
objectThe object to be redrawn with double buffering.

◆ bufferedDraw() [2/3]

void IlvContainer::bufferedDraw ( const IlvRect rect)

Redraws a rectangle with double buffering.

Performs temporary drawing in a hidden pixmap, then displays the pixmap on the screen at once. The main difference with double buffering is whether the operation is localized to a rectangle (this member function), a region, or an object.

Parameters
rectThe rectangle to be redrawn with double buffering.

◆ bufferedDraw() [3/3]

void IlvContainer::bufferedDraw ( const IlvRegion region)

Redraws a region with double buffering.

Performs temporary drawing in a hidden pixmap, then displays the pixmap on the screen at once. The main difference with double buffering is whether the operation is localized to a rectangle, a region, or an object. This function draws the area included in region (in the coordinate system of the container).

Parameters
regionThe region to be redrawn with double buffering.

◆ contains()

IlvGraphic* IlvContainer::contains ( const IlvPoint p) const

Checks whether a point is in the container's objects.

Returns the topmost IlvGraphic object of this container that contains the given point, if such an object exists. If the object does not exist, the function returns 0.

Parameters
pThe point to be tested.
Returns
An object containing the given point, or 0 if there is none.

◆ createInputFile()

virtual IlvViewInputFile* IlvContainer::createInputFile ( istream &  stream)
virtual

Creates an input file.

Creates an IlvViewInputFile from an input stream.

Parameters
streamThe input stream.
Returns
An instance of the input file type corresponding to this type of container, opened in the stream stream.

◆ disableRedrawTask()

void IlvContainer::disableRedrawTask ( )

Deactivates the lazy redraw mechanism.

This function prevents the lazy redraw task from happening when the process is idle.

Any subsequent call to invalidateRegion() will restore the lazy redraw mechanism and reschedule the task.

◆ dispatchToObjects()

virtual IlBoolean IlvContainer::dispatchToObjects ( IlvEvent event)
virtual

Dispatches an event to an object.

Dispatches event to an object interactor if one exists.

Parameters
eventThe event.
Returns
IlFalse if the event is not handled by an interactor or IlTrue if it is.

◆ draw() [1/3]

void IlvContainer::draw ( const IlvRect rect)

Draws all objects within a rectangle.

Creates an IlvRegion from rect and calls the draw(const IlvRegion*) member function.

Parameters
rectThe initial rectangle stored in this region.

◆ draw() [2/3]

virtual void IlvContainer::draw ( const IlvRegion clip = 0)
virtual

Draws all objects in this container with a clipping region.

Draws all the IlvGraphic objects that are stored in this IlvContainer object.

Parameters
clipThe clipping region, or 0 if none.

Reimplemented from IlvDrawingView.

◆ draw() [3/3]

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

Draws all objects with transformation and a clipping region.

Draws all the objects that are stored in this IlvContainer in the drawing port dst, with the transformer t and the clipping region clip. This virtual function lets you draw the container contents on any destination port, with any possible drawing parameters. It was designed for dumping.

Parameters
dstThe destination drawing port.
tThe transformation to be applied, or 0 if none.
clipThe clipping region, or 0 if none.

◆ eraseRegion()

virtual void IlvContainer::eraseRegion ( const IlvRegion region)
protectedvirtual

Erases a region.

Erases the region region.

Parameters
regionThe region to be erased.

◆ fitToContents()

virtual void IlvContainer::fitToContents ( )
virtual

Resizes the container to fit the overall bounding box of the graphic objects.

Resizes the container so it contains all the visible objects. However, the top left coordinates of the view remain at the same location.

◆ fitTransformerToContents()

virtual void IlvContainer::fitTransformerToContents ( IlBoolean  redraw = IlTrue)
virtual

Resizes the objects to fit the container.

Computes a new transformer (scaling and translation only) for this container so that all objects that have the visibility attribute set to IlTrue can be seen in the view.

The computation is not always accurate: it assumes that the bounding box of a transformed graphic object is equal to the transformed bounding box, which is not true for non-zoomable objects. If there are such objects in the container, several calls to the method may be necessary to obtain the desired result.

Parameters
redrawIf set to IlTrue the container is redrawn after the transformation. If it is set to IlFalse, the container will not be redrawn.

◆ flushRedraw()

virtual void IlvContainer::flushRedraw ( )
virtual

Performs the actual redraw of invalid regions.

This function is called as an idle procedure just before a process becomes idle to handle all pending drawing tasks accumulated by calls to invalidateRegion(). You can call it if you want to force the refresh of your view at a given point in your program.

See also
IlvEventLoop::addIdleProc().

Reimplemented from IlvPort.

◆ getAccelerator() [1/2]

IlBoolean IlvContainer::getAccelerator ( IlvContainerAction action,
IlAny userArg,
IlvEventType  type,
IlUShort  buttonOrKey = 0,
IlUShort  modifiers = 0 
) const

Gets an accelerator by action and user argument.

Queries a container for a particular accelerator action and user argument. This function returns IlTrue if this accelerator exists in the container and fills in the action and userArg parameters if they are valid pointers (that is, non-0).

If no such accelerator exists, it returns IlFalse. You can thus test the existence of a particular accelerator by calling the member function getAccelerator() with 0 values for both action and userArg.

Parameters
actionThe returned accelerator action, or 0.
userArgThe returned user argument, or 0.
typeThe accelerator event type.
buttonOrKeyThe accelerator event data, or 0.
modifiersThe accelerator event modifiers, or 0.
Returns
IlTrue if the accelerator exists or IlFalse if not.

◆ getAccelerator() [2/2]

IlvContainerAccelerator* IlvContainer::getAccelerator ( IlvEventType  type,
IlUShort  button = 0,
IlUShort  modifiers = 0 
) const

Gets an accelerator by event.

Returns a pointer to the IlvContainerAccelerator instance that matches this event. If an accelerator to match this event does not exist, then 0 is returned.

- Predefined accelerators for containers -

Event Type

Key or button

Action

IlvKeyUp i Sets the transformer to identity
IlvKeyDown Right Moves view to the left.
IlvKeyDown Left Moves view to the right.
IlvKeyDown Down Moves view to the top (decreasing x).
IlvKeyDown Up Moves view to the bottom (increasing x).
IlvKeyUp Z Zooms down into the view.
IlvKeyUp U Zooms out from the view.
IlvKeyDown R Rotates view 90 degrees counter-clockwise.
IlvKeyDown f Computes a new transformer so that every object can be seen.
Parameters
typeThe accelerator event type.
buttonThe accelerator event data, or 0.
modifiersThe accelerator event modifiers, or 0.
Returns
A pointer to the IlvContainerAccelerator instance that matches this event, or 0 if none.

◆ getCardinal()

IlUInt IlvContainer::getCardinal ( ) const

Gets the number of objects in this container.

Returns
The number of objects managed by this container view.

◆ GetContainer()

static IlvContainer* IlvContainer::GetContainer ( const IlvGraphic obj)
static

Gets an object's container.

Use this static member function to retrieve the container where the specified object is stored. You cannot store an object in more than one container (or manager).

Parameters
objThe object.
Returns
The container where obj is stored, or 0 if this object is not stored in any container.

◆ getIndex()

IlInt IlvContainer::getIndex ( IlvGraphic obj) const

Gets the index of a graphic object in this container.

The first object stored has 0 for index.

Parameters
objThe graphic object.
Returns
The index of obj in this container. If obj is not located in this container, then the value -1 is returned, which must be considered as an error.

◆ getObject() [1/2]

IlvGraphic* IlvContainer::getObject ( const char *  name) const

Gets an object by name.

Attempts to return the object whose name is name.
If this name is shared by more than one object, the first object created in this container that has this name is returned.

Parameters
nameThe name of the object.
Returns
The first object in the container with this name, or 0 if no such object exists.

◆ getObject() [2/2]

IlvGraphic* IlvContainer::getObject ( IlUInt  index) const

Gets an object by index.

Returns the object stored at index in the container list.

Parameters
indexThe index of the object in the container list.
Returns
The object stored at index. If index is greater than the number of objects in the container, this member function returns 0.

◆ getObjectInteractor()

IlvViewObjectInteractor* IlvContainer::getObjectInteractor ( const IlvGraphic ) const

Gets an object interactor.

This method is obsolete. Use IlvGraphic::getInteractor().

See also
IlvGraphic::getInteractor().

◆ getObjectName()

const char* IlvContainer::getObjectName ( const IlvGraphic obj) const

Gets an object name.

Parameters
objThe garphic object.
Returns
The name of obj.

◆ getObjects()

IlvGraphic* const* IlvContainer::getObjects ( IlUInt count) const

Gets all objects in the container.

Parameters
countThe returned number of objects in the array.
Returns
An array of pointers to the objects stored in this container. The returned array is stored in a temporary buffer. It must not be modified or deleted by the programmer. Moreover, other Rogue Wave Views routines can overwrite this buffer so it should be copied in a safe place if it needs to be persistent.

◆ getSmartSet()

IlvSmartSet* IlvContainer::getSmartSet ( const char *  name) const

Gets a SmartSet.

Parameters
nameThe name of the SmartSet.
Returns
The SmartSet called name in this container, or 0 if there is none.

◆ getTaggedObjects()

IlvGraphic* const* IlvContainer::getTaggedObjects ( const IlSymbol tag,
IlUInt count 
) const

Gets all objects with a specified tag.

Returns an array of pointers to the objects stored in this container and tagged with tag (or 0 if none are found). count is set to the number of objects in this array. The returned array is stored in a temporary buffer. It must not be modified or deleted by the programmer. Moreover, other Rogue Wave Views routines can overwrite this buffer so it should be copied in a safe place if it needs to be persistent.

Parameters
tagThe tag that defines the objects to be included.
countThe returned number of objects found.
Returns
An array of pointers to the objects in this container tagged with tag, or 0 if none.

◆ getTransformer()

IlvTransformer* IlvContainer::getTransformer ( ) const

Gets the transformation function.

Returns
The transformer associated with the container view. If 0 is returned, this container has no transformer associated with it; that is, there is identity.

◆ handleExpose()

virtual void IlvContainer::handleExpose ( IlvEvent event)
virtual

Handles a newly exposed region.

This member function is called when this view reveals new regions that must be updated.

The default implementation calls reDraw with the relevant exposed region.

Parameters
eventThe event that is received for this expose event.

Reimplemented from IlvDrawingView.

◆ handleInput()

virtual void IlvContainer::handleInput ( IlvEvent event)
virtual

Handles an input event.

This member function is called when an input event (keystrokes or mouse events) is received by this view.

Its default implementation does nothing.

Parameters
eventThe input event that is received.

Reimplemented from IlvDrawingView.

◆ hide()

virtual void IlvContainer::hide ( )
virtual

Hides the view.

Removes the window from the visible windows on your screen.

Reimplemented from IlvView.

◆ initReDraw()

void IlvContainer::initReDraw ( )

Initializes an invalidated region to empty.

Initializes the invalidated region to an empty region. These calls can be embedded, that is, if there has been a previous call to initReDraw() and no matching reDrawView() or abortReDraw(), then this function does not reset the invalid region.

◆ insertObject()

virtual void IlvContainer::insertObject ( IlvGraphic obj,
IlBoolean  redraw = IlFalse 
)
virtual

Inserts the object at the bottom of the container list.

Adds obj at the beginning of the list, so that the object is displayed behind all the other objects.

Parameters
objThe object to be inserted.
redrawIf set to IlTrue the container is redrawn. If it is set to IlFalse, the container will not be redrawn.

◆ invalidateRegion() [1/4]

void IlvContainer::invalidateRegion ( const IlvGraphic object)

Invalidates an object's region.

Invalidates the area covered by object after it has been applied by the current container's transformer.

Parameters
objectThe object defining the invalid region.

◆ invalidateRegion() [2/4]

void IlvContainer::invalidateRegion ( const IlvRect rect)

Invalidates a rectangle's region.

Invalidates the rectangle rect in the view coordinate system.

Parameters
rectThe rectangle defining the invalid region.

◆ invalidateRegion() [3/4]

void IlvContainer::invalidateRegion ( const IlvRegion rect)

Invalidates a region..

Adds a rectangle to the update region and schedules a redraw task to happen before the process becomes idle.

Parameters
rectThe rectangle, specified in manager coordinates.

◆ invalidateRegion() [4/4]

void IlvContainer::invalidateRegion ( const IlvRegionUpdater updater,
const IlvGraphic graphic = 0 
)

Updates the invalidated region.

Uses the updater object to update the invalidated region and schedules a redraw task to happen before the process becomes idle.

Parameters
updaterThe object used to update the invalidated region.
graphicThe IlvGraphic that requested the invalidation of this region.
See also
IlvRegionUpdater::update().

◆ isDoubleBuffering()

IlBoolean IlvContainer::isDoubleBuffering ( ) const

Tests the double buffering setting.

Returns
Whether (IlTrue) or not (IlFalse) this container is actually using double buffering.

◆ isInvalidating()

IlBoolean IlvContainer::isInvalidating ( ) const

Indicates whether the container is in a phase of invalidating regions.

Returns
IlTrue if the container has scheduled some redraw task to perform when the process is idle.

◆ isVisible()

IlBoolean IlvContainer::isVisible ( const IlvGraphic obj) const

Tests the visibility setting of an object.

Parameters
objThe object.
Returns
IlTrue if the object is visible, or IlFalse if it is not.

◆ read()

virtual IlBoolean IlvContainer::read ( istream &  stream)
virtual

Loads a Rogue Wave Views data file from the input stream.

Reads a set of IlvGraphic objects from the input stream specified in stream.

Parameters
streamThe input stream.

◆ readFile()

virtual IlBoolean IlvContainer::readFile ( const char *  filename)
virtual

Reads a Rogue Wave Views data file.

Reads a set of IlvGraphic objects from the file named filename. This file is typically created through an IlvManager object.

If filename is a relative path name, then the file is searched in each directory referenced in the display path.

This function calls the member function read().

Note
Unix platforms may not properly read files that have been generated on Windows in text mode. Refer to the member function IlvManager::save() for more information. Rogue Wave Views Studio uses the text mode.
Parameters
filenameThe name of the file to be read from.
Returns
IlTrue on success or IlFalse if there has been an error.

◆ reDraw() [1/2]

void IlvContainer::reDraw ( const IlvRect rect)

Redraws all objects within a rectangular clipping area.

Creates an IlvRegion from rect and calls the reDraw(const IlvRegion*) member function.

Parameters
rectThe initial rectangle stored in this region.

◆ reDraw() [2/2]

virtual void IlvContainer::reDraw ( const IlvRegion clip = 0)
virtual

Redraws all objects with a clipping region.

Erases the entire clipping region, calls the eraseRegion() function, then calls the draw() function, giving this region as a parameter.

Parameters
clipThe clipping region, or 0 if none.

Reimplemented from IlvDrawingView.

◆ reDrawObj()

void IlvContainer::reDrawObj ( IlvGraphic obj)

Redraws an object.

Redraws the bounding box of the IlvGraphic object.

Parameters
objThe object whose bounding box is to be redrawn.

◆ reDrawView()

void IlvContainer::reDrawView ( IlBoolean  erase = IlTrue,
IlBoolean  buffered = IlFalse 
)

Redraws a view.

Refreshes all the invalidated regions. The view is first erased if the parameter erase is set to IlTrue. The redrawing is buffered if the parameter buffered is set to IlTrue. The invalid region is reset to an empty region.

If there has been more than one call to initReDraw() before reDrawView() is called, this function does nothing.

Parameters
eraseIndicates whether to erase the view (IlTrue) or not (IlFalse).
bufferedIndicates whether the redraw is buffered (IlTrue) or not (IlFalse).

◆ registerCallback()

void IlvContainer::registerCallback ( const char *  callbackName,
IlvGraphicCallback  callback 
)

Registers a callback.

Associates the user function callback with the string callbackName. This string will be registered using the class IlSymbol.

Parameters
callbackNameThe name under which the callback is registered.
callbackThe callback to be registered.

◆ removeAccelerator() [1/2]

void IlvContainer::removeAccelerator ( IlvContainerAccelerator acc)

Removes a specified accelerator.

Removes this accelerator from the accelerator list of the container.

Parameters
accThe accelerator to be removed. It is not deleted.

◆ removeAccelerator() [2/2]

void IlvContainer::removeAccelerator ( IlvEventType  type,
IlUShort  buttonOrKey = 0,
IlUShort  modifiers = 0 
)

Removes an accelerator by event.

Removes the association between the event description and the action.

Parameters
typeThe accelerator event type.
buttonOrKeyThe accelerator event data (button or key).
modifiersThe accelerator event modifiers.

◆ removeObject()

virtual IlBoolean IlvContainer::removeObject ( IlvGraphic obj,
IlBoolean  redraw = IlFalse 
)
virtual

Removes an object from the container.

Removes the association between the object and the container view. The object itself is not deleted.

When the object is removed from the container, all the properties related to the container are removed. However the other properties are retained (that is, the object name, its named properties, and so forth).

Parameters
objThe object to be removed.
redrawIf set to IlTrue the container is redrawn. If it is set to IlFalse, the container will not be redrawn.
Returns
IlFalse if the object was not stored in this container.

◆ removeObjects()

virtual void IlvContainer::removeObjects ( IlBoolean  destroy = IlTrue,
IlBoolean  redraw = IlTrue 
)
virtual

Removes all objects from the container.

Removes the association of all objects with the container view.

Parameters
destroySet to IlTrue to delete the objects. The objects themselves are not deleted if destroy is set to IlFalse.
redrawIf set to IlTrue the container is redrawn. If it is set to IlFalse, the container will not be redrawn.

◆ removeSmartSet()

virtual IlBoolean IlvContainer::removeSmartSet ( IlvSmartSet set)
virtual

Removes a SmartSet from this container.

The objects are renamed to their intrinsic name.

Parameters
setThe SmartSet to be removed.
Returns
IlFalse on error, that is, if set is not in the container.

◆ removeTaggedObjects()

void IlvContainer::removeTaggedObjects ( const IlSymbol tag,
IlBoolean  destroy = IlTrue,
IlBoolean  reDraw = IlTrue 
)

Removes all objects with a specified tag.

Removes from the container all the objects tagged with tag. If destroy is IlTrue, the objects are deleted. If reDraw is IlTrue, the container redraws the applicable areas.

Parameters
tagThe tag that defines the objects to be included.
destroySpecifies whether to delete the objects (IlTrue) or not IlFalse.
reDrawIf set to IlTrue the container is redrawn. If it is set to IlFalse, the container will not be redrawn.

◆ replace()

virtual IlvGraphic* IlvContainer::replace ( IlvGraphic oldObject,
IlvGraphic newObject,
IlBoolean  redraw = IlFalse 
)
virtual

Replaces an object.

Replaces the IlvGraphic instance oldObject by the IlvGraphic object newObject. If redraw is IlTrue, the reDrawObj() member function of newObject is called.

Parameters
oldObjectThe object to be replaced.
newObjectThe new object.
redrawIf set to IlTrue the container is redrawn. If it is set to IlFalse, the container will not be redrawn.

◆ setBackground()

virtual void IlvContainer::setBackground ( IlvColor c)
virtual

Sets the background color of this view.

The color is used when erasing is required. Thus, a call to setBackground() is effective only when regions are erased.

Parameters
cThe new background color of this view. This color is locked, and the previous color is unlocked.

Reimplemented from IlvAbstractView.

◆ setBackgroundBitmap()

virtual void IlvContainer::setBackgroundBitmap ( IlvBitmap b)
virtual

Sets the background bitmap of this view.

The bitmap provided (if it is not 0) is locked. The previous bitmap, if there was one, is unlocked. If the bitmap provided is 0, the background color is used to erase the view.

To remove properly a background bitmap that was previously set, you must do the following:

view->setBackgroundBitmap(0); // Remove the background bitmap
manager->setBackground(view, view->getBackground()); // Update manager
manager->draw(view, IlTrue); // Redraw the view

This code must be used also for containers (replaces manager by container in code).

Note
There is a limitation on Windows 95, because Windows 95 can only handle bitmaps with a size of 8x8.

Reimplemented from IlvAbstractView.

◆ setDoubleBuffering()

IlBoolean IlvContainer::setDoubleBuffering ( IlBoolean  value)

Sets double buffering.

Use this member function to indicate whether or not this container should use double buffering.

Parameters
valueIndicates if this container should use double buffering (IlTrue) or not (IlFalse).

◆ setObjectInteractor()

IlBoolean IlvContainer::setObjectInteractor ( IlvGraphic ,
IlvViewObjectInteractor *   
)

Sets an object interactor on a graphic object.

This method is obsolete. Use IlvGraphic::setInteractor().

See also
IlvGraphic::setInteractor().

◆ setObjectName()

virtual void IlvContainer::setObjectName ( IlvGraphic obj,
const char *  name 
)
virtual

Sets the name of an object.

You are allowed to give the same name to two different objects but the method getObject(const char*) will then return the first object whose name is name.

Parameters
objThe object.
nameThe name to be given to obj. This string is copied.

◆ setTransformer() [1/2]

virtual void IlvContainer::setTransformer ( const IlvTransformer t)
virtual

Applies another transformer to the coordinates provided for the drawing functions.

Applies another transformer to the coordinates provided for the drawing functions.

Parameters
tThe transformer that is applied.

Reimplemented from IlvSystemPort.

◆ setTransformer() [2/2]

void IlvContainer::setTransformer ( const IlvTransformer t = 0)

Sets the transformation function.

Sets the transformer associated with the container view. A 0 value means no transformer, that is, the identity transformer. The transformer is internally copied during this function call.

Parameters
tThe transformation to be applied, or 0 if none.

◆ setVisible()

virtual void IlvContainer::setVisible ( IlvGraphic obj,
IlBoolean  visible,
IlBoolean  redraw = IlFalse 
)
virtual

Sets the visibility of an object.

This method only works with an object that is already in this container.

Parameters
objThe object.
visibleIndicates whether the object is to be visible (IlTrue) or invisible (IlFalse).
redrawIf set to IlTrue the container is redrawn. If it is set to IlFalse, the container will not be redrawn.

◆ shortCut()

virtual IlBoolean IlvContainer::shortCut ( IlvEvent event)
virtual

Verbose:

Dispatches event to an accelerator.

Parameters
eventThe incoming event.
Returns
IlTrue if the accelerator exists; otherwise, it returns IlFalse.

◆ show()

virtual void IlvContainer::show ( )
virtual

Shows the view.

Displays the window on the screen. A window can be created in such a way that you cannot see it upon creation, which allows you to draw on that window before it is displayed.

Reimplemented from IlvView.

◆ swap()

virtual void IlvContainer::swap ( IlvGraphic obj1,
IlvGraphic obj2 
)
virtual

Swaps two objects.

Interchanges the two objects obj1 and obj2 with respect to their order in the list of objects of the container, thus modifying the order in which objects are stacked.

Parameters
obj1The first object.
obj2The second object.

◆ translateView()

void IlvContainer::translateView ( IlvPos  dx,
IlvPos  dy,
IlBoolean  redraw = IlTrue 
)

Translates the current view.

Composes the current transformer with a translation specified by dx and dy. Set the redraw parameter to IlFalse to prevent an immediate display update.

Parameters
dxTranslation along the horizontal axis.
dyTranslation along the vertical axis.
redrawIf set to IlTrue the container is redrawn after the transformation. If it is set to IlFalse, the container will not be redrawn.

◆ unregisterCallback()

void IlvContainer::unregisterCallback ( const char *  callbackName)

Unregisters a callback.

Removes the callback function which has been registered with the name callbackName, from the callback list.

Parameters
callbackNameThe name of the callback to be removed.

◆ visibleBBox()

void IlvContainer::visibleBBox ( IlvRect bbox) const

Determines the visible bounding box of the container.

Returns the bounding box of all visible objects in the view coordinate system.

Parameters
bboxThe returned visible bounding box.

◆ zoomView()

void IlvContainer::zoomView ( const IlvPoint center,
IlFloat  scaleX,
IlFloat  scaleY = 0.0,
IlBoolean  redraw = IlTrue 
)

Zooms the current view.

Composes the current transformer with a transformer that zooms by a factor of scaleX and scaleY, and leaves the center point in the container at its original place. If scaleY is 0, then we assume the scaling factor is the same in y as in x. Set the redraw parameter to IlFalse to prevent an immediate display update.

Parameters
centerThe center point of the transformation.
scaleXZooming factor on the horizontal axis.
scaleYZooming factor on the vertical axis.
redrawIf set to IlTrue the container is redrawn after the transformation. If it is set to IlFalse, the container will not be redrawn.
IlTrue
#define IlTrue
The constant true.
Definition: macros.h:245