View class. More...
#include <ilviews/base/view.h>
Public Member Functions | |
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... | |
IlvColor * | getBackground () const |
Retrieves the background color of this view. More... | |
IlvBitmap * | getBackgroundBitmap () 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... | |
IlvCursor * | getCursor () 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... | |
IlvAbstractView * | getParent () 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 IlvDisplay * | getStylableDisplay () const |
Returns the display for this object. More... | |
virtual void | getStylableSize (IlvDim &, IlvDim &) const |
Returns the size of this object. More... | |
virtual IlvStylist * | getStylist () 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... | |
virtual void | hide () |
Hides the view. 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 | move (const IlvPoint &position) |
Moves the view. More... | |
virtual void | moveResize (const IlvRect &newSize) |
Moves and resizes the view. 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 | resize (IlvDim w, IlvDim h) |
Resizes the view. 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... | |
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 | show () |
Shows the view. 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 | 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... | |
IlvDisplay * | getDisplay () 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 const char * | getName () const |
Returns the name of the instance. The semantic and implementation of this method are defined by concrete subclasses. The default implementation returns 0 . More... | |
virtual IlvValue & | queryValue (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 char * | getStylableName () const |
Returns the name of this object. More... | |
virtual const IlvStylable * | getStylableParent () 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... | |
Additional Inherited Members | |
Static Public Member Functions inherited from IlvSystemPort | |
static IlvBitmapData * | GetBitmapData (IlvSystemPort *port, const IlvRect *rect=0) |
Creates an IlvBitmapData from a rectangular area in an IlvSystemPort . More... | |
View class.
Library: xviews or winviews or mviews (mutually exclusive)
This is an abstract class without any constructor. Thus, instances can only be created from subtypes of this class. Objects of the IlvAbstractView
class and its subclasses represent actual windows displayed on your screen. A view is a rectangular place holder on the screen to display elements of an application. A window on the screen is an associated set of one or several views.
Every view is distinguished by its location (x, y coordinates), size (height and width), and visibility (that is, an existing view can be visible or not visible).
Name | Type | Equivalent methods |
---|---|---|
x | Int | globalBBox() , move() |
y | Int | globalBBox() , move() |
width | UInt | globalBBox() , resize() |
height | UInt | globalBBox() , resize() |
background | Color | getBackground() , setBackground() |
backgroundBitmap | Bitmap | getBackgroundBitmap() , setBackgroundBitmap() |
boundingBox | IlvRect | boundingBox() |
globalBBox | IlvRect | globalBBox() |
sizeVisible | IlvRect | sizeVisible() |
grab | Boolean | hasGrab() |
scrolled | Boolean | isScrolled() |
sensitive | Boolean | isSensitive() , setSensitive() |
Name | Return type | Equivalent methods |
---|---|---|
move(IlvPoint position) | Void | move(const IlvPoint& position) |
resize(UInt width, UInt height) | Void | resize(IlvDim width, IlvDim height) |
raise() | Void | raise() |
lower() | Void | lower() |
ensurePointVisible(IlvPoint position) | Void | ensureVisible(const IlvPoint& position) |
ensureRectVisible(IlvRect area) | Void | ensureVisible(const IlvRect& area) |
|
virtual |
Retrieves the relative dimensions of the view.
bbox | Is set to the geometry of this window, that is, its position and size relative to the parent view. |
Allows the view to receive multi-touch events.
enable | If IlTrue, the view will receive multi-touch events, if IlFalse, it will only receive usual events and multi-touch events will be translated into usual events. |
IlTrue
if the view receives multi-touch events, IlFalse
otherwise. void IlvAbstractView::ensureVisible | ( | const IlvPoint & | point | ) |
Ensures that a point remains visible.
This member function makes sure the given point p is visible to the user. This is meaningful only if isScrolled()
returns IlTrue
, that is, if this object is scrolled in a system scrolling view. The parent scrolling view takes care of its subwindow displacement to guarantee the visibility of p.
point | The point that is requested to remain visible. |
void IlvAbstractView::ensureVisible | ( | const IlvRect & | rect | ) |
Ensures that a rectangle remains visible.
This member function makes sure the given rectangle rect is visible to the user. This is meaningful only if isScrolled()
returns IlTrue
, that is, if this object is scrolled in a system scrolling view. The parent scrolling view takes care of its subwindow displacement to guarantee the visibility of rect.
If rect represents a bigger rectangle than the scrolling window is able to display, then the subwindow is centered in the scrolling region on the center of rect. That is, the center of rect is moved to the center of the scrolling window, but the boundaries of rect are not visible.
rect | The rectangle that is requested to remain visible. |
Erases an area of this view.
Erases the indicated part of this view, using the background color of the background bitmap.
rect | The area that must be erased. |
reDraw | Can be set to IlTrue to trigger a refresh of the indicated area. |
Entirely erases the view.
Erases the entire view, using the background color of background bitmap.
reDraw | Can be set to IlTrue to trigger a refresh of the entire view. |
|
virtual |
Retrieves the dimension of the view frame.
bbox | Is set to the absolute geometry of this view, including the title bar and the frame if the window is a top-level window. The coordinates returned in bbox correspond to the upper left corner of the window, in screen coordinates. |
IlvColor* IlvAbstractView::getBackground | ( | ) | const |
Retrieves the background color of this view.
IlvBitmap* IlvAbstractView::getBackgroundBitmap | ( | ) | const |
Gets the background bitmap of this view.
IlBoolean IlvAbstractView::getCompressButtonDragged | ( | ) | const |
Indicates if IlvButtonDragged
compression is enabled or not.
IlTrue
if the compression is enabled and IlFalse
if it is disabled. IlBoolean IlvAbstractView::getCompressPointerMoved | ( | ) | const |
Indicates if IlvPointerMoved
compression is enabled or not.
IlTrue
if the compression is enabled and IlFalse
if it is disabled. IlvCursor* IlvAbstractView::getCursor | ( | ) | const |
Retrieves the cursor currently set on this view.
IlvResource::lock()
, IlvResource::unLock()
. IlvIntensity IlvAbstractView::getOpacity | ( | ) | const |
Returns the opacity level of the view.
IlvIntensity
value. 0
means that the view is completely transparent and IlvFullIntensity
means that it is completely opaque. Returns the size of the outer stylable if any.
When a stylable is part of another one, this information allows for instance to compute relative sizes or placement.
If the stylable is not part of another one, this function returns the same results than getStylableSize()
.
w | The width of the container stylable. |
h | The height of the container stylable. |
Reimplemented from IlvStylable.
IlvAbstractView* IlvAbstractView::getParent | ( | ) | const |
Gets the parent of this view.
IlvAbstractView
of the view, or 0
if this view doesn't have an IlvAbstractView
parent. 0
if this view was built using an IlvSystemView
. IlvSystemView IlvAbstractView::getShellSystemView | ( | ) | const |
Gets the system-dependent identifier of the top shell of this view.
0
in every case but a Motif top window.
|
virtual |
Returns the class name of this object.
Reimplemented from IlvStylable.
|
virtual |
Returns the display for this object.
Implements IlvStylable.
Returns the size of this object.
It can be used for computing sizes relative to the object (image position, borders,...).
w | The width of the stylable. |
h | The height of the stylable. |
Reimplemented from IlvStylable.
|
virtual |
Returns the stylist for this object.
0
if there is none. Implements IlvStylable.
IlvSystemView IlvAbstractView::getSystemView | ( | ) | const |
Gets the system-dependent identifier of this view.
An IlvAbstractView
object encapsulates a real interface object of your display system (sometimes referred to as a widget). The member function getSystemView()
returns this object.
The IlvSystemView
type is the basic type of your display system widgets, and is thus platform-dependent.
void IlvAbstractView::getTransparentColorKey | ( | IlvIntensity & | r, |
IlvIntensity & | g, | ||
IlvIntensity & | b | ||
) | const |
Returns the color used as a key for transparency.
r | Will contain the red component value of the color key. |
g | Will contain the green component value of the color key. |
b | Will contain the blue component value of the color key. |
|
virtual |
Retrieves the absolute dimensions of the view.
bbox | The geometry of this window relative to the upper left corner of the whole screen. |
IlBoolean IlvAbstractView::hasGrab | ( | ) | const |
Queries if this view has the display grab.
IlTrue
if this view has the display grab.
|
virtual |
Hides the view.
Removes the window from the visible windows on your screen.
Reimplemented in IlvContainer, and IlvView.
IlBoolean IlvAbstractView::isLayered | ( | ) | const |
Returns whether the view is layered or not.
IlTrue
if the window is layered, IlFalse
if not. IlBoolean IlvAbstractView::isMultitouchEnabled | ( | ) |
Queries if the view is set to receive multi-touch events.
|
virtual |
Indicates if the view is a scrolling window subview.
A scrolling window owns a single subwindow (generally larger) and displays only a rectangular portion of it. This allows you to manipulate and visualize windows larger than your screen.
IlTrue
if this window is the subwindow of a system scrolling window. IlvScrollView
. IlBoolean IlvAbstractView::isSensitive | ( | ) | const |
Retrieves the sensitivity of this view to input events.
IlFalse
is returned, no keyboard or pointing device events are received by this object. The window is said to be sensitive if it can receive these events and isSensitive
returns IlTrue
.
|
virtual |
Pushes this view below the others.
Puts this view object below any other view on the screen. This is meaningful only if this view is a top window.
|
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.
position | The new position of the window. |
Reimplemented in IlvView.
|
virtual |
Moves and resizes the view.
Moves and changes the size of the window in the parent window.
newSize | The new position and dimensions of the window. |
Reimplemented in IlvElasticView, and IlvView.
|
virtual |
Retrieves the position of the view.
position | Is set to the position of the upper left corner of the window. |
|
virtual |
Brings this view on top.
Puts this view object on top of any other view on the screen. This is meaningful only if this view is a top window.
void IlvAbstractView::removeWindowProc | ( | IlvWindowProc | windowProc, |
IlAny | procArgument = 0 |
||
) |
Removes a user-defined window procedure.
windowProc | The window procedure that must be removed. |
procArgument | The user-defined argument that was used when setting this window procedure. |
setWindowProc()
. Resizes the view.
w | The new width of the view. |
h | The new height of the view. |
Reimplemented in IlvElasticView, and IlvView.
|
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.
c | The new background color of this view. This color is locked, and the previous color is unlocked. |
Reimplemented in IlvContainer.
|
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:
This code must be used also for containers (replaces manager by container in code).
Reimplemented in IlvContainer.
|
virtual |
Enables or disables IlvButtonDragged
event compression.
The IlvButtonDragged
compression is similar to IlvPointerMoved
compression. The difference is only in the event type: IlvButtonDragged
events occur when the pointer moves while one or more mouse buttons are kept pressed.
By default, IlvButtonDragged
event compression is enabled.
Applications that want to monitor every single IlvButtonDragged
event should disable this compression.
val | If IlTrue , the compression is enabled, otherwise it is disabled. |
|
virtual |
Enables or disables IlvPointerMoved
event compression.
The IlvPointerMoved
event compression is a mechanism to filter events in order to ignore pointer motion events that are redundant. This allows applications to be more reactive to fast successions of pointer motion events.
The event compression works iteratively. When the event loop handles an IlvPointerMoved
event in a window with compression enabled, it skips all similar events (same type and same window) that IMMEDIATELY follow in the event queue, only keeping the last one.
By default, pointer motion event compression is disabled.
Applications that want to monitor every single pointer motion event should disable this compression.
val | If IlTrue , the compression is enabled, otherwise it is disabled. |
void IlvAbstractView::setCursor | ( | IlvCursor * | cursor | ) |
Sets the cursor for this view.
Sets the given cursor pattern for your pointing device whenever it enters this window. This member function calls lock()
on the cursor provided as an argument, then unLock()
on the old cursor to release a reference to it.
cursor | The new cursor that is used in this view. |
IlvResource::lock()
, IlvResource::unLock()
. IlBoolean IlvAbstractView::setFocus | ( | ) |
Sets the input focus to this view.
Gives this window entire control of keyboard events, that is it "gets the focus." When you call this function, all keyboard events are sent to this object. The only way to let another window receive keyboard events is by giving the focus to another window.
setFocus()
does not lock your system permanently. void IlvAbstractView::setLayered | ( | IlBoolean | layered | ) |
Sets whether the window is layered or not.
Layered windows only work in Windows 2000 or higher systems. Layered windows are rendered in an offscreen bitmap by the system, and then blended to the screen using various attributes such as partial translucency. This attribute allows improved performance for shaped windows.
layered | The new layered value of this view. The view becomes layered if the layered argument is IlTrue . |
void IlvAbstractView::setOpacity | ( | IlvIntensity | level | ) |
Sets the opacity value of the view.
This method has only an effect on Windows 2000 and higher systems. The view must be a top window. The method setLayered(IlTrue)
is called to set the layered attribute.
level | The opacity level of the view. 0 means that the view is completely transparent and IlvFullIntensity means that it is completely opaque. |
void IlvAbstractView::setSensitive | ( | IlBoolean | sensitivity | ) |
Sets the sensitivity of this view to input events.
sensitivity | The new sensitivity of this view. The view becomes sensitive if the sensitivity argument is IlTrue . If sensitivity is set to IlFalse , none of the input events can reach the window. |
Sets a non-rectangular shape on the view according to a bitmap mask.
The bitmap defining the shape must be either a one-bit deep bitmap or a transparent bitmap with a transparency mask. If the bitmap is 0
or has no transparency mask, the method removes any existing shape on the view and restores its initial rectangular shape.
The bitmap (or its mask) is interpreted as a shape where bits set to 1
are included and bits set to 0
are excluded.
The origin of the bitmap corresponds to the origin of the view.
An additional parameter can be used to specify whether the region should be enlarged to include the window title or not. This value is only meaningful for top-level views (sub-views do not have a title area) on Windows platforms (on X Window, the title area is not accessible to the client).
The defined shape has a fixed size and will not be modified when the view is resized. It is up to the caller to update the shape according to changes in the view geometry. For this matter, one might consider using IlvView::setShape()
instead, as it allows to handle resize events.
mask | A one-bit deep bitmap or a transparent bitmap with a mask. The bitmap can be deleted after the call. |
addTitle | Specifies whether to add the window title area to the shape. |
IlTrue
if the operation succeeds and IlFalse
if it does not. void IlvAbstractView::setTransparentColorKey | ( | IlvIntensity | r, |
IlvIntensity | g, | ||
IlvIntensity | b | ||
) |
Sets the transparency color key value.
This method has only an effect on Windows 2000 and higher systems. The view must be a top window. All pixels painted in the window using this color will be transparent. The method setLayered(IlTrue)
is called to set the layered attribute.
r | The red component value of the color. |
g | The green component value of the color. |
b | The blue component value of the color. |
void IlvAbstractView::setWindowProc | ( | IlvWindowProc | windowProc, |
IlAny | procArgument = 0 |
||
) |
Sets a Windows window procedure.
This member function is available only for Windows ports of Rogue Wave Views.
It sets a window procedure for processing events that should not be handled by Rogue Wave Views but by Windows.
windowProc | The new window procedure that is used for this view. |
procArgument | The user-defined argument that the window procedure will receive. |
IlvWindowProc
, removeWindowProc()
.
|
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 in IlvContainer, and IlvView.
|
virtual |
Retrieves the visible part of the view.
rect | Is set to the visible rectangle of this window. This return value is meaningful only if this object is the subwindow of a scrolling window (that is, has a hidden area because of the view hierarchy). If this is not the case, sizeVisible() has the same meaning as boundingBox() . |