Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: w32std.h
Link against: ws32.lib

Class RWindow

RWindow

Support

Supported from 5.0

Description

Handle to a standard window.

An RWindow is a handle to a server-side window which can be displayed and drawn to, and whose redraws are performed by the application.

Derivation

MWsClientClassBase class for all classes whose objects are clients of the window server engine
RDrawableWindowHandle to a drawable window
RWindowHandle to a standard window
RWindowBaseClient-side handle to a server-side window
RWindowTreeNodeHandle to a node in the server-side window tree

Defined in RWindow:
BeginRedraw(), Construct(), EndRedraw(), GetInvalidRegion(), Invalidate(), RWindow(), SetBackgroundColor(), SetExtent(), SetSize()

Inherited from MWsClientClass:
WsHandle()

Inherited from RDrawableWindow:
Scroll()

Inherited from RWindowBase:
Activate(), AddKeyRect(), AllocPointerMoveBuffer(), CancelPointerRepeatEventRequest(), ClaimPointerGrab(), DisablePointerMoveBuffer(), DiscardPointerMoveBuffer(), DisplayMode(), EnableBackup(), EnablePointerMoveBuffer(), FadeBehind(), FreePointerMoveBuffer(), InquireOffset(), IsFaded(), IsNonFading(), MoveToGroup(), PasswordWindow(), PointerFilter(), Position(), RemoveAllKeyRects(), RequestPointerRepeatEvent(), RetrievePointerMoveBuffer(), SetCornerType(), SetExtentErr(), SetPointerCapture(), SetPointerGrab(), SetPosition(), SetRequiredDisplayMode(), SetShadowDisabled(), SetShadowHeight(), SetShape(), SetSizeErr(), SetVisible(), Size(), TCaptureDisabled, TCaptureDragDrop, TCaptureEnabled, TCaptureFlagAllGroups, TCaptureFlagDragDrop, TCaptureFlagEnabled, TCaptureFlags

Inherited from RWindowTreeNode:
Child(), ClearPointerCursor(), Close(), Destroy(), DisableErrorMessages(), DisableFocusChangeEvents(), DisableGroupChangeEvents(), DisableModifierChangedEvents(), DisableOnEvents(), EFadeIncludeChildren, EFadeWindowOnly, EnableErrorMessages(), EnableFocusChangeEvents(), EnableGroupChangeEvents(), EnableModifierChangedEvents(), EnableOnEvents(), FullOrdinalPosition(), NextSibling(), OrdinalPosition(), OrdinalPriority(), Parent(), PrevSibling(), SetCustomPointerCursor(), SetFaded(), SetNonFading(), SetOrdinalPosition(), SetPointerCursor(), TFadeControl


Construction and destruction


RWindow()

RWindow();

Description

Default constructor which creates a sessionless, uninitialised window handle.

Handles to server-side objects must be created in a session in order to be operational; this constructor is merely a convenience to allow the handle to be stored as a data member. See RWindowTreeNode::RWindowTreeNode() for details of how the complete setup of a handle field may be deferred until the window server session is known.


RWindow()

RWindow(RWsSession &aWs);

Description

Constructor which creates an initialised window handle within a server session.

Parameters

RWsSession &aWs

Window server session to use.


Construct()

TInt Construct(const RWindowTreeNode &parent,TUint32 aHandle);

Description

Completes the construction of the window handle.

This method should be called after the RWindow() constructor, before any other functions are performed on the window. It creates a window in the window server corresponding to the RWindow object. The window is initialised to inherit the size and extent of its parent window, given by aParent. If its's parent is a group window then it will be full screen.

The integer handle passed must be unique within the session, and can be used to store a useful pointer: see RBlankWindow::Construct().

Parameters

const RWindowTreeNode &parent

The window's parent.

TUint32 aHandle

Window handle (must be unique within the window server session).

Return value

TInt

KErrNone if successful, otherwise one of the system-wide error codes.

[Top]


Member functions


BeginRedraw()

void BeginRedraw();

Description

Begins redraw of the window's invalid region.

This method tells the window server that the window is about to respond to the last redraw event by redrawing the entire invalid region. This causes the window server to validate the entire invalid region.

After the redraw is complete the entire region that was previously invalid is validated. The window should then call EndRedraw().

Note:

See also:


BeginRedraw()

void BeginRedraw(const TRect& aRect);

Description

Begins the redraw of a rectangle within the window's invalid region.

This method tells the window server that the window about to respond to the last redraw event by redrawing the specified rectangle. This causes the window server to clear the rectangle, and remove it from the invalid region.

After the redraw is complete the window should call EndRedraw().

Note:

Parameters

const TRect& aRect

The rectangle to be redrawn.

See also:


EndRedraw()

void EndRedraw();

Description

Ends the current redraw.

This function should be called when redrawing is complete.


GetInvalidRegion()

void GetInvalidRegion(RRegion& aRegion);

Description

Gets the invalid region.

Note:

Parameters

RRegion& aRegion

On return, contains the invalid region.


Invalidate()

void Invalidate();

Description

Invalidates the entire window.

This function causes the window to get a redraw message specifying its entire visible area — allowing an application-initiated redraw.


Invalidate()

void Invalidate(const TRect& aRect);

Description

Invalidates an area within the window.

This function invalidates the specified rectangle, which causes the window to get a redraw message. This allows an application-initiated redraw of a specified rectangle.

Parameters

const TRect& aRect

Area to invalidate.


SetBackgroundColor()

void SetBackgroundColor(TRgb aColor);

Description

Sets the background colour used for clearing in server-initiated redraws.

The window will be cleared to its background colour when a window server-initiated redraw occurs. Background colour can be changed dynamically after a window has been created and activated, however, the new background colour will not be visible until the window has been redrawn.

Parameters

TRgb aColor

Background colour to be used during redraws.


SetBackgroundColor()

void SetBackgroundColor();

Description

Sets the background colour used for clearing in server-initiated redraws to none.

The window will not be cleared to its background colour when a window server-initiated redraw occurs.


SetExtent()

void SetExtent(const TPoint &point,const TSize &size);

Description

Sets the size and position of a window.

This function may be called at any time after the window's Construct() function: the window's extent will change dynamically.

If the window size is increased, any new area will be cleared to the background colour and a redraw event will be generated for it.

Parameters

const TPoint &point

The position of the window's origin, relative to its parent.

const TSize &size

The window size.

See also:


SetSize()

void SetSize(const TSize &size);

Description

Sets the size of a window.

This function may be called at any time after the window's Construct() function: the window's size will change dynamically.

If the window size is increased, any new area will be cleared to the background colour and a redraw event will be generated for it.

Parameters

const TSize &size

The window size.