Views
Foundation Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Classes | Public Member Functions
IlvView Class Reference

View class. More...

#include <ilviews/base/view.h>

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

Classes

class  RoundedCornerShape
 
class  Shape
 

Public Member Functions

 IlvView (IlvAbstractView *parent, const IlvRect &size, IlBoolean visible=IlTrue, const char *cssElementName="IlvView")
 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, const char *cssElementName="IlvView")
 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, const char *cssElementName="IlvView")
 Initializes a new view object that is a new top window with specific top-window properties. More...
 
 IlvView (IlvDisplay *display, IlvSystemView available, const char *cssElementName="IlvView")
 Initializes a new view object by actually using an existing system view. More...
 
 IlvView (IlvDisplay *display, IlvSystemView parent, const IlvRect &size, IlBoolean visible=IlTrue, const char *cssElementName="IlvView")
 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...
 
virtual void draw (const IlvRegion *clip=0)
 Draws the view contents. More...
 
void ensureInScreen (IlvPos xMargin=0, IlvPos yMargin=0)
 Ensures that the view remains visible. More...
 
virtual IlBoolean getAutoBackgroundRedrawingMode ()
 Indicates whether the IlvView redraws background (e.g. on resize). 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...
 
IlString getStylableName () const override
 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...
 
virtual void hide ()
 Hides the view. 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 IlBoolean resizingInvalidatesBackground () const
 Indicates whether the entire background should be redrawn after the view is resized. For example, this function should return IlTrue if IlvView draws centered image on the background. More...
 
virtual IlBoolean setAutoBackgroundRedrawingMode (IlBoolean)
 Enable or disable background redrawing by IlvView. If set to IlTrue, IlvView will redraw background (e.g. on resize). Default value is IlTrue. 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 that is run after all resizing has been done. 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 void show ()
 Shows 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 (const IlvRegion &region, IlBoolean reDraw=IlFalse)
 Erases a region 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...
 
IlString getCssElementName () const override
 Returns the DOM element name of this stylable object. More...
 
IlvCursorgetCursor () const
 Retrieves the cursor currently set on this view. More...
 
virtual IlvLookFeelHandlergetLookFeelHandler () const
 Returns the look and feel handler of the view. More...
 
IlvObjectLFHandlergetObjectLFHandler (IlvClassInfo *c) const
 Returns the object look and feel handler of the 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...
 
IlvStylistgetParentStylist () const override
 Returns the parent stylist. More...
 
IlvSystemView getShellSystemView () const
 Gets the system-dependent identifier of the top shell of this view. More...
 
virtual IlvDisplaygetStylableDisplay () const
 Returns the display for this object. More...
 
virtual void getStylableSize (IlvDim &, IlvDim &) const
 Returns the size of this object. More...
 
IlvStylistgetStylist () const override
 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...
 
virtual void reDraw (const IlvRegion *clip=0)
 Redraws the entire view. More...
 
void removeWindowProc (IlvWindowProc windowProc, IlAny procArgument=0)
 Removes a user-defined window procedure. More...
 
virtual void setBackground (IlvColor *c)
 Sets the background color of this view. More...
 
virtual void setBackgroundBitmap (IlvBitmap *b)
 Sets the background bitmap of this view. 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...
 
virtual void setLookFeelHandler (IlvLookFeelHandler *lfh)
 Sets the look and feel handler of this container. 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 setupDefaultCssStyle () override
 virtual functions used to setupDefaultStyle. Override this to change default styling
 
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
 
virtual void drawPolyLine (const IlvPalette *, IlUInt, const IlvPoint *) const
 Draws a series of connected lines. More...
 
virtual void drawPolyLine (const IlvPalette *palette, const IlvPoint &firstPoint, const views::vector< IlvDeltaPoint > &relativePositions) const override
 Draws a series of connected lines relatively to a reference. 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 drawRoundRectangleDifferentRadiuses (const IlvPalette *palette, const IlvRoundRect &rect) 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, IlvValueInterface *drawingObj=NULL)
 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
 
virtual void fillPolyLine (const IlvPalette *, IlUInt, const IlvPoint *, IlBoolean=IlFalse) const
 Fills a polygon. More...
 
virtual void fillPolyLine (const IlvPalette *palette, const IlvPoint &firstPoint, const views::vector< IlvDeltaPoint > &relativePositions) const
 Fills a series of connected lines relatively to a reference. More...
 
virtual void fillRectangle (const IlvPalette *, const IlvRect &) const
 Fills the given rectangle. More...
 
virtual void fillRoundRectangle (const IlvPalette *, const IlvRect &, IlUShort) const
 Deprecated Fills a round rectangle. More...
 
virtual void fillRoundRectangleDifferentRadiuses (const IlvPalette *palette, const IlvRoundRect &rect) const
 Fills a round rectangle, with different radiuses, in the css way. 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 setTransformer (const IlvTransformer &)
 Applies another transformer to the coordinates provided for the drawing functions. 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 IlvStylist
void removeStyling ()
 Removes all styling information from the stylist.
 
IlBoolean setStyleSheet (const char *text, size_t length)
 Applies styling information to this stylist. More...
 
IlBoolean setStyleSheet (std::istream &file)
 Applies styling information to this stylist. More...
 
- Public Member Functions inherited from IlvStylable
 IlvStylable ()
 Constructor.
 
IlvStylablegetChildStylable (const IlString &cssElementName) const
 Returns child stylable with specified css element name. Returns null if the child is not found. More...
 
virtual IlString getCssElementClass () const
 Returns the DOM class of this stylable object. <cssElement class="cssClass"> More...
 
IlString getCssElementId () const
 Returns the DOM element id of this stylable object. <cssElement id="cssId"> More...
 
virtual IlvStylablegetStylableParent () const
 Returns the parent of this object in the style hierarchy. More...
 
void setCssId (const IlString &id)
 Sets the object's css styling id. The id is initially the same as the name property of the object, but can be overridden using this function. More...
 

Additional Inherited Members

- 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...
 
- Static Public Member Functions inherited from IlvStylable
static void DisableCssDom ()
 Disables any further DOM additions. More...
 

Detailed Description

View class.

Library: xviews or winviews or mviews (mutually exclusive)

The IlvView class is provided basically for drawing on the screen. It is designed to be used as the child of a previously created IlvAbstractView class, or as a new top-level window.

See also
IlvCursor, IlvDisplay, IlvDrawingView, IlvElasticView, IlvScrollView.

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

Data accessors

Name Type Equivalent methods
visible Boolean isVisible(), show(), hide()
title String getTitle(), setTitle()
iconified Boolean isIconified(), iconify(), show()
isModal Boolean isModal()

Method accessors

Name Return type Equivalent methods
showModal(Boolean systemModal) Boolean showModal(IlBoolean systemModal, IlvCursor*)

Constructor & Destructor Documentation

◆ IlvView() [1/5]

IlvView::IlvView ( IlvAbstractView parent,
const IlvRect size,
IlBoolean  visible = IlTrue,
const char *  cssElementName = "IlvView" 
)

Initializes a new view object that is a child of another view.

Parameters
parentThe parent view.
sizeThe initial location and size of the view, in the coordinate system of parent.
visibleCan be set to IlFalse to initially hide the window.
cssElementNamedefines the name of the stylable in the CSS DOM. The default implementation of getCssElementName() returns this parameter.

◆ IlvView() [2/5]

IlvView::IlvView ( IlvDisplay display,
IlvSystemView  available,
const char *  cssElementName = "IlvView" 
)

Initializes a new view object by actually using an existing system view.

Parameters
displayThe display instance.
availableThe system view on which this IlvView is based.
cssElementNamedefines the name of the stylable in the CSS DOM. The default implementation of getCssElementName() returns this parameter.

◆ IlvView() [3/5]

IlvView::IlvView ( IlvDisplay display,
IlvSystemView  parent,
const IlvRect size,
IlBoolean  visible = IlTrue,
const char *  cssElementName = "IlvView" 
)

Initializes a new view that is a child of an existing system view.

Parameters
displayThe display instance.
parentThe parent system view.
sizeThe initial location and size of the view, in the coordinate system of the existing system view.
visibleCan be set to IlFalse to initially hide the window.
cssElementNamedefines the name of the stylable in the CSS DOM. The default implementation of getCssElementName() returns this parameter.

◆ IlvView() [4/5]

IlvView::IlvView ( IlvDisplay display,
const char *  name,
const char *  title,
const IlvRect size,
IlBoolean  visible = IlTrue,
const char *  cssElementName = "IlvView" 
)

Initializes a new view object that is a new top window.

Parameters
displayThe display instance.
nameThe name of this view (used by the resource association mechanism).
titleThe title of this top window.
sizeThe initial location and size of the view, relative to the root window of display.
visibleCan be set to IlFalse to initially hide the window.
cssElementNamedefines the name of the stylable in the CSS DOM. The default implementation of getCssElementName() returns this parameter.

◆ IlvView() [5/5]

IlvView::IlvView ( IlvDisplay display,
const char *  name,
const char *  title,
const IlvRect size,
IlUInt  properties,
IlBoolean  visible = IlTrue,
IlvSystemView  transientFor = 0,
const char *  cssElementName = "IlvView" 
)

Initializes a new view object that is a new top window with specific top-window properties.

The parameter transientFor specifies the system view for which the IlvView is transient. It may be any top-level system view and not necessarily encapsulated by a IlvView. Saying that a view v1 is transient for view v2 means that:

  • v1 cannot be iconified.
  • v1 is automatically unmapped when v2 is iconified.
  • v1 is always on top of v2 (in the windows stacking order).

This notion is applicable to views built as top-level windows ("shells" in Motif). Note that on Windows platforms, if v1 is transient for v2, then the destruction of v2 will automatically destroy v1 as well. You may have to protect your application against this by setting a delete callback on v1 (see setDeleteCallback()).

Parameters
displayThe display instance.
nameThe name of this view (used by the resource association mechanism).
titleThe title of this top window.
sizeThe initial location and size of the view, relative to the root window of display.
propertiesThe properties of that view. This parameter is an OR combination of these flags:
  • IlvStandardBorder: the new top window has regular window borders, banner and resize handles.
  • IlvNoBorder: the new top window has no border. Note that on X Window, setting the property IlvNoBorder is more than a decoration issue. The view creates an override-redirect window; thus, the window manager will ignore it. The application then acts as temporary window manager, which very few applications are prepared to do. The main purpose of IlvNoBorder is to create pop-up windows, like menus.
  • IlvNoResizeBorder: the new top window has no resize handle; thus, the user cannot resize this window.
visibleCan be set to IlFalse to initially hide the window.
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.
cssElementNamedefines the name of the stylable in the CSS DOM. The default implementation of getCssElementName() returns this parameter.

Member Function Documentation

◆ addProperty()

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

Adds a property to the view.

Adds the property key to the view, associated with the value value.

Parameters
keyThe property key.
valueThe associated value.

◆ draw()

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

Draws the view contents.

This is the member function you will overload to perform the different drawing tasks that are needed by your application.

The default implementation does nothing.

Parameters
clipThe clipping region where the drawing must take place. If 0, there is no clipping region to be used.

Implements IlvAbstractView.

Reimplemented in IlvContainer.

◆ ensureInScreen()

void IlvView::ensureInScreen ( IlvPos  xMargin = 0,
IlvPos  yMargin = 0 
)

Ensures that the view remains visible.

This function is meaningful only for top-window views.

It moves this view so that it remains visible on the screen. If the view is higher than the screen, it will not move in the y direction. If the view is wider than the screen, it will not move in the x direction. xMargin and yMargin define margin distances that the view location must respect, as if the screen were 2*xMargin pixels less wide, and 2*yMargin pixels less high.

If the view is already entirely visible on the screen with the margins respected, this function does nothing.

Parameters
xMarginThe horizontal margin.
yMarginThe vertical margin.

◆ getAutoBackgroundRedrawingMode()

virtual IlBoolean IlvView::getAutoBackgroundRedrawingMode ( )
virtual

Indicates whether the IlvView redraws background (e.g. on resize).

Returns
IlTrue if view handles the redrawing of the background, IlFalse otherwise.

◆ getName()

const char* IlvView::getName ( ) const
virtual

Retrieves the name.

Each view is provided a name at its creation.

Returns
The name of this view. The returned string must not be modified or deleted.

Reimplemented from IlvValueInterface.

◆ getProperty()

IlAny IlvView::getProperty ( const IlSymbol key) const

Retrieves a property.

Parameters
keyThe property key.
Returns
The value associated with the property key. If there is no such property, it returns 0.

◆ getShape()

Shape* IlvView::getShape ( ) const

Returns the view shape.

Returns
The shape set on the view, or 0 if there is none.

◆ getStylableName()

IlString IlvView::getStylableName ( ) const
overridevirtual

Returns the name of this object.

Returns
The name of this object or 0 if it has none. This name may be used as the identifier discriminant in style sheets.

Reimplemented from IlvStylable.

◆ getTitle()

const char* IlvView::getTitle ( ) const

Retrieves the title of this view.

This function is meaningful only for top-window views.

Returns
The window title. You must not modify or delete the returned string.

◆ hasProperty()

IlBoolean IlvView::hasProperty ( const IlSymbol key) const

Checks the existence of a property.

Parameters
keyThe property key.
Returns
IlTrue if the property key exists for the view and IlFalse otherwise.

◆ hide()

virtual void IlvView::hide ( )
virtual

Hides the view.

Removes the window from the visible windows on your screen.

Reimplemented from IlvAbstractView.

Reimplemented in IlvContainer.

◆ iconBitmap()

void IlvView::iconBitmap ( IlvBitmap image,
IlvBitmap mask = 0 
)

Sets the icon aspect.

This function is meaningful only for top-window views.

It sets the new icon aspect when this window is to be iconified. The parameters image and mask are the same as for creating new cursors.

Parameters
imageThe image that must be used.
maskThe image mask that must be used.
See also
IlvCursor.

◆ iconify()

void IlvView::iconify ( )

Requests this window to iconify itself.

This function is meaningful only for top-window views.

◆ isIconified()

virtual IlBoolean IlvView::isIconified ( ) const
virtual

Retrieves the iconified state.

This function is meaningful only for top-window views.

Returns
IlTrue if this top window is iconified or IlFalse if it is not.

◆ isModal()

IlBoolean IlvView::isModal ( ) const

Queries the modality of this view.

This function is meaningful only for top-window views.

Returns
IlTrue if the view is in modal use, and IlFalse if it is not.

◆ isVisible()

IlBoolean IlvView::isVisible ( ) const

Retrieves the visibility.

Returns
A value indicating whether this view is visible or not. Note that the returned value may not be up to date if the event pool has not yet been emptied.

◆ move()

virtual void IlvView::move ( const IlvPoint position)
virtual

Moves the view.

Moves the upper left corner of the window to the indicated position in the parent window of this object, or the root window in the case of a top window.

Parameters
positionThe new position of the window.

Reimplemented from IlvAbstractView.

◆ moveResize()

virtual void IlvView::moveResize ( const IlvRect newSize)
virtual

Moves and resizes the view.

Moves and changes the size of the window in the parent window.

Parameters
newSizeThe new position and dimensions of the window.

Reimplemented from IlvAbstractView.

Reimplemented in IlvElasticView.

◆ moveToMouse()

void IlvView::moveToMouse ( IlvDirection  alignment = IlvCenter,
IlvPos  dx = 0,
IlvPos  dy = 0,
IlBoolean  ensureInScreen = IlTrue 
)

Moves the view relative to the location of the mouse.

This function is meaningful only for top-window views.

It moves this view so that the point indicated by alignment is moved to the pointing device, with an offset of dx and dy.

Parameters
alignmentSpecifies how the new location of this view is computed:
  • IlvCenter: the center of the view;
  • IlvTop: the middle of the top side of the view;
  • IlvBottom: the middle of the bottom side of the view;
  • IlvLeft: the middle of the left side of the view;
  • IlvRight: the middle of the right side of the view;
  • IlvTopLeft: the top left corner of the view;
  • IlvTopRight: the top right corner of the view;
  • IlvBottomLeft: the bottom left corner of the view;
  • IlvBottomRight: the bottom right corner of the view;
dxThe horizontal offset that is applied.
dyThe vertical offset that is applied.
ensureInScreenIf unspecified or set to IlTrue, the window is ensured to entirely remain in the screen, by calling ensureInScreen().

◆ moveToScreen()

void IlvView::moveToScreen ( IlvDirection  alignment = IlvCenter,
IlvPos  dx = 0,
IlvPos  dy = 0,
IlBoolean  ensureInScreen = IlTrue 
)

Moves the view relative to the root window.

This function is meaningful only for top-window views.

Moves this view to the position indicated by alignment, relative to the entire screen, with an offset of dx and dy.

Parameters
alignmentSpecifies how the new location of the view is computed:
  • IlvCenter: the center of the view is moved to the center of the screen.
  • IlvTop: the top of the view is moved to the top of the screen.
  • IlvBottom: the bottom side of the view is moved to the bottom of the screen.
  • IlvLeft: the left side of the view is moved to the left side of the screen.
  • IlvRight: the right side of the view is moved to the right side of the screen.
  • IlvTopLeft: the top left corner of the view is moved to the top left corner of the screen.
  • IlvTopRight: the top right corner of the view is moved to the top right corner of the screen.
  • IlvBottomLeft: the bottom left corner of the view is moved to the bottom left corner of the screen.
  • IlvBottomRight: the bottom right corner of the view is moved to the bottom right corner of the screen.
dxThe horizontal offset that is applied.
dyThe vertical offset that is applied.
ensureInScreenIf value is unspecified or set to IlTrue, the window is ensured to entirely remain in the screen, by calling ensureInScreen().

◆ moveToView()

void IlvView::moveToView ( const IlvView view,
IlvDirection  alignment = IlvCenter,
IlvPos  dx = 0,
IlvPos  dy = 0,
IlBoolean  ensureInScreen = IlTrue 
)

Moves the view relative to another view.

This function is meaningful only for top-window views.

It moves this view to the position indicated by alignment, relative to the position and size of view, which must be another top view, with an offset of dx and dy.

Parameters
viewThe reference view.
alignmentSpecifies how the new location of this view is computed. Valid values for this parameter are:
  • IlvCenter: the center of the view is moved to the center of view.
  • IlvTop: the bottom of the view is moved to the top of view.
  • IlvBottom: the top of the view is moved to the bottom of view.
  • IlvLeft: the right side of the view is moved to the left side of view.
  • IlvRight: the left side of the view is moved to the right side of view.
  • IlvTopLeft: the bottom right corner of the view is moved to the top left corner of view.
  • IlvTopRight: the bottom left corner of the view is moved to the top right corner of view.
  • IlvBottomLeft: the top right corner of the view is moved to the bottom left corner of view.
  • IlvBottomRight: the top left corner of the view is moved to the bottom right corner of view.
dxThe horizontal offset that is applied.
dyThe vertical offset that is applied.
ensureInScreenIf unspecified or set to IlTrue, the window is ensured to entirely remain in the screen, by calling ensureInScreen().

◆ removeDeleteCallback()

virtual void IlvView::removeDeleteCallback ( IlvDestroyCallback  del = 0,
IlAny  userArg = 0 
)
virtual

Removes a Delete callback.

The 0 default value for the first parameter is a mistake of the API but is kept for compatibility reasons. If 0 is used, no callback is removed.

Parameters
delThe callback that is removed.
userArgThe user argument that was provided when setDeleteCallback() was called.

◆ removeDestroyCallback()

virtual void IlvView::removeDestroyCallback ( IlvDestroyCallback  destroy = 0,
IlAny  userArg = 0 
)
virtual

Removes a Destroy callback.

The 0 default value for the first parameter is a mistake of the API but is kept for compatibility reasons. If 0 is used, no callback is removed.

This function is meaningful only for top-window views.

Parameters
destroyThe callback that is removed.
userArgThe user argument that was provided when setDestroyCallback() was called.

◆ removeExposeCallback()

virtual void IlvView::removeExposeCallback ( IlvExposeCallback  expose = 0,
IlAny  userArg = 0 
)
virtual

Removes an Expose callback.

The 0 default value for the first parameter is a mistake of the API but is kept for compatibility reasons. If 0 is used, no callback is removed.

Parameters
exposeThe callback that is removed.
userArgThe user argument that was provided when setExposeCallback() was called.

◆ removeInputCallback()

virtual void IlvView::removeInputCallback ( IlvInputCallback  input = 0,
IlAny  userArg = 0 
)
virtual

Removes an Input callback.

The 0 default value for the first parameter is a mistake of the API but is kept for compatibility reasons. If 0 is used, no callback is removed.

Parameters
inputThe callback that is removed.
userArgThe user argument that was provided when setInputCallback() was called.

◆ removePostResizeCallback()

virtual void IlvView::removePostResizeCallback ( IlvResizeCallback  resize,
IlAny  userArg = 0 
)
virtual

Removes a post Resize callback.

Parameters
resizeThe callback that is removed.
userArgThe user argument that was provided when setPostResizeCallback() was called.

◆ removeProperty()

IlBoolean IlvView::removeProperty ( const IlSymbol key)

Removes a property.

Removes the property key.

Parameters
keyThe property key.
Returns
IlFalse if this property does not exist in this view.

◆ removeResizeCallback()

virtual void IlvView::removeResizeCallback ( IlvResizeCallback  resize = 0,
IlAny  userArg = 0 
)
virtual

Removes a Resize callback.

The 0 default value for the first parameter is a mistake of the API but is kept for compatibility reasons. If 0 is used, no callback is removed.

Parameters
resizeThe callback that is removed.
userArgThe user argument that was provided when setResizeCallback() was called.

◆ replaceProperty()

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

Replaces a property.

Replaces the value of the property key with value.

Parameters
keyThe property key.
valueThe associated value to used.
Returns
IlFalse if this property does not exist in this view.

◆ resize()

virtual void IlvView::resize ( IlvDim  w,
IlvDim  h 
)
virtual

Resizes the view.

Parameters
wThe new width of the view.
hThe new height of the view.

Reimplemented from IlvAbstractView.

Reimplemented in IlvElasticView.

◆ resizingInvalidatesBackground()

virtual IlBoolean IlvView::resizingInvalidatesBackground ( ) const
virtual

Indicates whether the entire background should be redrawn after the view is resized. For example, this function should return IlTrue if IlvView draws centered image on the background.

Returns
Returns IlTrue if whole background should be redrawn after the view is resized.

◆ setAutoBackgroundRedrawingMode()

virtual IlBoolean IlvView::setAutoBackgroundRedrawingMode ( IlBoolean  )
virtual

Enable or disable background redrawing by IlvView. If set to IlTrue, IlvView will redraw background (e.g. on resize). Default value is IlTrue.

Returns
Returns previous value.

◆ setDeleteCallback()

virtual void IlvView::setDeleteCallback ( IlvDestroyCallback  del,
IlAny  userArg = 0 
)
virtual

Sets a callback that watches for destruction.

Specifies an IlvDestroyCallback function to be called when this view is deleted. You can set as many destroy callbacks as you need. The last callback you set is the last to be called.

Parameters
delThe function that is called when the view is deleted.
userArgThe user parameter that is transmitted to delete when it is called.

◆ setDestroyCallback()

virtual void IlvView::setDestroyCallback ( IlvDestroyCallback  destroy,
IlAny  userArg = 0 
)
virtual

Sets a callback for Destroy events.

This function is meaningful only for top-window views.

Specifies a callback function to be called when the windowing system requests the destruction of the window. This is usually performed using a Close button that the window manager of your system has added to the window frame.

When an event of this kind occurs, the IlvView object itself is not destroyed. You are expected to write the function in such a way that it takes into account the disappearance of the window if necessary.

You can set as many destroy callbacks as you need. The last callback set is the last to be called.

Parameters
destroyThe function that is called when the view receives a request for destruction.
userArgThe user parameter that is transmitted to delete when it is called.

◆ setExposeCallback()

virtual void IlvView::setExposeCallback ( IlvExposeCallback  expose,
IlAny  userArg = 0 
)
virtual

Sets a callback for Expose events.

Specifies an IlvExposeCallback function to be called for each expose event that occurs in this view. These events occur when an invisible part of the view is shown to the user (repaint notifications). You can set as many expose callbacks as you need. The last callback you set is the last to be called.

Parameters
exposeThe function that is called when Expose events occur in this view.
userArgThe user parameter that is transmitted to expose when it is called.

◆ setIconTitle()

void IlvView::setIconTitle ( const char *  title)

Sets the iconified title of this view.

This function is meaningful only for top-window views.

Parameters
titleThe new icon title of this view. The string is copied.

◆ setInputCallback()

virtual void IlvView::setInputCallback ( IlvInputCallback  input,
IlAny  userArg = 0 
)
virtual

Sets a callback for Input events.

Specifies an IlvInputCallback function to be called for each user event that occurs in this view. These events are all events but the destruction, the resize request and the repaint notification. You can set as many input callbacks as you need. The last callback you set is the last to be called.

Parameters
inputThe function that is called when Input events occur in this view.
userArgThe user parameter that is transmitted to input when it is called.

◆ setMaximumSize()

void IlvView::setMaximumSize ( IlvDim  w,
IlvDim  h 
)

Sets the maximum size of this view.

This function is meaningful only for top-window views.

Sets the maximum width and height of the window to the values w and h.

Parameters
wThe width dimension to set.
hThe height dimension to set.

◆ setMinimumSize()

void IlvView::setMinimumSize ( IlvDim  w,
IlvDim  h 
)

Sets the minimum size of this view.

This function is meaningful only for top-window views.

It sets the minimum width and height of the window to the values w and h.

Parameters
wThe width dimension to set.
hThe height dimension to set.

◆ setName()

virtual void IlvView::setName ( const char *  name)
virtual

Sets the name.

Parameters
nameThe new name of this view. The string is copied.

◆ setPostResizeCallback()

virtual void IlvView::setPostResizeCallback ( IlvResizeCallback  resize,
IlAny  userArg = 0 
)
virtual

Sets a callback for Resize events that is run after all resizing has been done.

Specifies an IlvResizeCallback function to be called for each resize event that occurs in this view, just after resizing has finished. You can set as many resize callbacks as you need. The last callback you set is the last to be called

Parameters
resizeThe function that is called when Resize events occur in this view.
userArgThe user parameter that is transmitted to resize when it is called.

◆ setProperty()

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

Sets or removes a property.

Sets the property key of the view to the value value.

Parameters
keyThe property key.
valueThe associated value to be set. If it is 0, the property is removed.

◆ setResizeCallback()

virtual void IlvView::setResizeCallback ( IlvResizeCallback  resize,
IlAny  userArg = 0 
)
virtual

Sets a callback for Resize events.

Specifies an IlvResizeCallback function to be called for each resize event that occurs in this view, just after it occurred. You can set as many resize callbacks as you need. The last callback you set is the last to be called. Resize callback is not quaranteed to be called before all resizing is done. For that, use IlvView::setPostResizeCallback

Parameters
resizeThe function that is called when Resize events occur in this view.
userArgThe user parameter that is transmitted to resize when it is called.

◆ setShape()

IlBoolean IlvView::setShape ( Shape newShape)

Sets a shape on the view.

This method installs a resize callback that will call resize() so that the newShape can adapt to geometry changes.

If the method succeeds:

  • the view takes ownership of newShape so it should not be modified or deleted.
  • if the view already has a Shape, it is deleted and replaced by newShape.
  • if newShape is 0, the window is restored to its initial rectangular shape and the resize callback is removed.
Parameters
newShapeThe shape to set on the view.
Returns
IlTrue if the operation is successful, otherwise IlFalse.

◆ setTitle()

virtual void IlvView::setTitle ( const char *  title)
virtual

Sets the title of the view.

This function is meaningful only for top-window views.

Note that if the title string begins with the "&" character, then it is considered as a multi-lingual string and is translated depending on the current language.

Parameters
titleThe new title of this view. The string is copied.

◆ show()

virtual void IlvView::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 IlvAbstractView.

Reimplemented in IlvContainer.

◆ showModal()

virtual IlBoolean IlvView::showModal ( IlBoolean  doesGrab = IlFalse,
IlvCursor cursor = 0 
)
virtual

Shows the window in a modal mode.

This function is meaningful only for top-window views.

Parameters
doesGrabMust be set to IlTrue to get system modal behavior. If this parameter is set to IlFalse, the view uses the application modal behavior. Under Windows, system modality is in contradiction with the concept of multi-tasking. As a consequence, this parameter must not be set to IlTrue under Windows, this usage is not supported.
cursorThe cursor that must be set on this view when it is shown (only applicable with systemModal set to IlTrue).
Returns
IlTrue on success. It returns IlFalse if an error occurred, that is, one of the following conditions is satisfied:
  • The view is not a top level view but a child view.
  • The view has no system view.
  • The view is already in modal use.
  • The grab failed (only applicable in system modal behavior).
  • The view has been deleted (not recommended practice!).
  • The view has been hidden.