rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvAbstractView Class Reference

View class. More...

#include <ilviews/base/view.h>

Inheritance diagram for IlvAbstractView:
IlvSystemPort IlvPort IlvScrollView IlvView IlvDrawingView IlvElasticView IlvViewCOMAdapter IlvContainer

List of all members.

Public Member Functions

virtual IlBoolean applyValue (const IlvValue &val)
 Applies an accessor.
virtual void boundingBox (IlvRect &bbox) const
 Retrieves the relative dimensions of the view.
virtual IlBoolean changeValue (const IlvValue &val)
 Changes the value of an accessor.
void ensureVisible (const IlvRect &rect)
 Ensures that a rectangle remains visible.:.
void ensureVisible (const IlvPoint &point)
 Ensures that a point remains visible.
virtual void erase (IlBoolean reDraw=((IlBoolean) 0))
 Entirely erases the view.
virtual void erase (const IlvRect &rect, IlBoolean reDraw=((IlBoolean) 0))
 Erases an area of this view.
virtual void frameBBox (IlvRect &bbox) const
 Retrieves the dimension of the view frame.
IlvColorgetBackground () const
 Retrieves the background color of this view.
IlvBitmapgetBackgroundBitmap () const
 Gets the background bitmap of this view.
IlvCursorgetCursor () const
 Retrieves the cursor currently set in this view.
IlvIntensity getOpacity () const
 Returns the opacity level of the view.
IlvAbstractViewgetParent () const
 Gets the parent of this view.
IlvSystemView getShellSystemView () const
 Gets the system-dependent identifier of the top shell of this view.
IlvSystemView getSystemView () const
 Gets the system-dependent identifier of this view.
void getTransparentColorKey (IlvIntensity &r, IlvIntensity &g, IlvIntensity &b) const
 Returns the color used as a key for transparency.
virtual void globalBBox (IlvRect &bbox) const
 Retrieves the absolute dimensions of the view.
IlBoolean hasGrab () const
 Queries if this view has the display grab.
virtual void hide ()
 Hides the view.
IlBoolean isLayered () const
 Returns whether the view is layered or not.
virtual IlBoolean isScrolled () const
 Queries for scrolling capabilities.
IlBoolean isSensitive () const
 Retrieves the sensitivity of this view to input events.
virtual void lower ()
 Pushes this view below the others.
virtual void move (const IlvPoint &position)
 Moves the view.
virtual void moveResize (const IlvRect &newSize)
 Reshapes the view.
virtual void position (IlvPoint &position) const
 Retrieves the position of the view.
virtual IlvValuequeryValue (IlvValue &val) const
 Retrieves the value of an accessor.
virtual void raise ()
 Brings this view on top.
void removeWindowProc (IlvWindowProc windowProc, IlAny procArgument=0)
 Removes a user-defined window procedure.
virtual void resize (IlvDim w, IlvDim h)
 Resizes the view.
virtual void setBackground (IlvColor *c)
 Sets the background color of this view.
virtual void setBackgroundBitmap (IlvBitmap *b)
 Sets the background bitmap of this view.
void setCursor (IlvCursor *cursor)
 Sets the cursor for this view.
IlBoolean setFocus ()
 Sets the input focus to this view.
void setLayered (IlBoolean layered)
 Sets whether the window is layered or not.
void setOpacity (IlvIntensity level)
 Sets the opacity value of the view.
void setSensitive (IlBoolean sensitivity)
 Sets the sensitivity of this view to input events.
void setTransparentColorKey (IlvIntensity r, IlvIntensity g, IlvIntensity b)
 Sets the transparency color key value.
void setWindowProc (IlvWindowProc windowProc, IlAny procArgument=0)
 Sets a Windows window procedure.
virtual void show ()
 Shows the view.
virtual void sizeVisible (IlvRect &rect) const
 Retrieves the visible part of the view.

Detailed Description

View class.

Library: display

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 derived subclasses give rise to actual windows or views that are displayed on your screen. A view is a visual place holder -- a rectangular object on your 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).


Member Function Documentation

virtual IlBoolean IlvAbstractView::applyValue ( const IlvValue val  )  [virtual]

Applies an accessor.

This member function is called by the changeValue function and must not be called directly.
Moreover, no drawing operations are carried out here (and should not be). If you add your own new IlvValue, do not forget to override applyValue as well as changeValue and queryValue, since applyValue is called by changeValue.

Parameters:
val The new value of the accessor.
Returns:
IlTrue if the accessor was applied, IlFalse otherwise.

Reimplemented from IlvSystemPort.

Reimplemented in IlvView, and IlvContainer.

virtual void IlvAbstractView::boundingBox ( IlvRect bbox  )  const [virtual]

Retrieves the relative dimensions of the view.

Parameters:
bbox Is set to the geometry of this window, that is, its position and size relative to the parent view.
virtual IlBoolean IlvAbstractView::changeValue ( const IlvValue val  )  [virtual]

Changes the value of an accessor.

Changes the value of the accessor val. The changeValue method can be used in the following way:

 IlvValue arg("height", (IlvDim)150);
 graphic->changeValue(arg);

See IlvValue for more information.

Parameters:
val The new value of the accessor.
Returns:
IlTrue if the accessor was changed, IlFalse otherwise.
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.

Parameters:
rect The rectangle that is requested to remain visible.
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.

Parameters:
point The point that is requested to remain visible.
virtual void IlvAbstractView::erase ( IlBoolean  reDraw = ((IlBoolean) 0)  )  [virtual]

Entirely erases the view.

Erases the entire view, using the background color of background bitmap.

Parameters:
reDraw Can be set to IlTrue to trigger a refresh of the entire view.
virtual void IlvAbstractView::erase ( const IlvRect rect,
IlBoolean  reDraw = ((IlBoolean) 0) 
) [virtual]

Erases an area of this view.

Erases the indicated part of this view, using the background color of the background bitmap.

Parameters:
rect The area that must be erased.
reDraw Can be set to IlTrue to trigger a refresh of the indicated area.
virtual void IlvAbstractView::frameBBox ( IlvRect bbox  )  const [virtual]

Retrieves the dimension of the view frame.

Parameters:
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.

Returns:
The background color of this window.
IlvBitmap* IlvAbstractView::getBackgroundBitmap (  )  const

Gets the background bitmap of this view.

Returns:
The background bitmap currently set in this view.
IlvCursor* IlvAbstractView::getCursor (  )  const

Retrieves the cursor currently set in this view.

Returns:
The cursor currently set in this view. This cursor should never be deleted. If you want to use it, you should consider using lock and unLock on this resource (see IlvResource::lock and IlvResource::unLock).
IlvIntensity IlvAbstractView::getOpacity (  )  const

Returns the opacity level of the view.

Returns:
An IlvIntensity value. 0 means that the view is completely transparent and 65535 means that it is completely opaque.
IlvAbstractView* IlvAbstractView::getParent (  )  const

Gets the parent of this view.

Returns:
The parent IlvAbstractView of the view, or 0 if this view doesn't have an IlvAbstractView parent.
Warning:
[note] The parent is 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.

Returns:
The top shell system view. Returns 0 in every case but a Motif top window.
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.

Returns:
The system-dependent identifier of this view.
void IlvAbstractView::getTransparentColorKey ( IlvIntensity r,
IlvIntensity g,
IlvIntensity b 
) const

Returns the color used as a key for transparency.

Parameters:
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 void IlvAbstractView::globalBBox ( IlvRect bbox  )  const [virtual]

Retrieves the absolute dimensions of the view.

Parameters:
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.

Returns:
IlTrue if this view has the display grab.
virtual void IlvAbstractView::hide (  )  [virtual]

Hides the view.

Removes the window from the visible windows on your screen.

Reimplemented in IlvView, and IlvContainer.

IlBoolean IlvAbstractView::isLayered (  )  const

Returns whether the view is layered or not.

Returns:
IlTrue if the window is layered, IlFalse if not.
virtual IlBoolean IlvAbstractView::isScrolled (  )  const [virtual]

Queries for scrolling capabilities.

Returns:
IlTrue if this window is the subwindow of a system scrolling window (see IlvScrollView). Scrolling windows own a single subwindow, from which they display only a rectangular region. This allows you to manipulate bigger windows than your screen can display, and navigate within these by means of a smaller rectangular area.
IlBoolean IlvAbstractView::isSensitive (  )  const

Retrieves the sensitivity of this view to input events.

Returns:
The current behavior of this window concerning the event that may occur within its frame. If 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 void IlvAbstractView::lower (  )  [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 void IlvAbstractView::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:
position The new position of the window.

Reimplemented in IlvView.

virtual void IlvAbstractView::moveResize ( const IlvRect newSize  )  [virtual]

Reshapes the view.

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

Parameters:
newSize The new position and dimensions of the window.

Reimplemented in IlvView, and IlvElasticView.

virtual void IlvAbstractView::position ( IlvPoint position  )  const [virtual]

Retrieves the position of the view.

Parameters:
position Is set to the position of the upper left corner of the window.
virtual IlvValue& IlvAbstractView::queryValue ( IlvValue val  )  const [virtual]

Retrieves the value of an accessor.

Retrieves the value of the accessor val. The queryValue method can be used in the following way:

 IlvValue arg("height");
 IlvDim height = (char*)view->queryValue(arg);

See IlvValue for more information.

Returns:
The value of the accessor in val.

Reimplemented in IlvView, and IlvContainer.

virtual void IlvAbstractView::raise (  )  [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.

Parameters:
windowProc The window procedure that must be removed.
procArgument The user-defined argument that was used when setting this window procedure.
See also:
setWindowProc.
virtual void IlvAbstractView::resize ( IlvDim  w,
IlvDim  h 
) [virtual]

Resizes the view.

Parameters:
w The new width of the view.
h The new height of the view.

Reimplemented in IlvView, and IlvElasticView.

virtual void IlvAbstractView::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:
c The new background color of this view. This color is locked, and the previous color is unlocked.

Reimplemented in IlvContainer.

virtual void IlvAbstractView::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 the manager
 manager->draw(view, IlTrue); // Redraw the view

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

Warning:
[note] There is a limitation on Windows 95, because Windows 95 can only handle bitmaps with a size of 8x8.

Reimplemented in IlvContainer.

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 (see IlvResource::lock and IlvResource::unLock).

Parameters:
cursor The new cursor that is used in this view.
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.

Warning:
Each windowing system has its own policy of setting the focus in one window or another. Check that 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.

Parameters:
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.

Parameters:
level The opacity level of the view. 0 means that the view is completely transparent and 65535 means that it is completely opaque.
void IlvAbstractView::setSensitive ( IlBoolean  sensitivity  ) 

Sets the sensitivity of this view to input events.

Parameters:
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.
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.

Parameters:
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.

Warning:
[note] Using a specific window procedure you can force Rogue Wave Views not to process certain messages. You should be aware, however, that doing so might produce unpredictable behavior.
Parameters:
windowProc The new window procedure that is used for this view.
procArgument The user-defined argument that the window procedure will receive.
See also:
IlvWindowProc, removeWindowProc.
virtual void IlvAbstractView::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 in IlvView, and IlvContainer.

virtual void IlvAbstractView::sizeVisible ( IlvRect rect  )  const [virtual]

Retrieves the visible part of the view.

Parameters:
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.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.