Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: w32std.h
Link against: ws32.lib

Class RWsPointerCursor

RWsPointerCursor

Support

Supported from 5.0

Description

Pointer cursor.

The pointer cursor is created in a similar way to a sprite. It is first created, and then one or more sprite members containing the bitmaps to be displayed are added.

After a pointer cursor has been created and activated, it does not become visible until the application calls RWindowTreeNode::SetPointerCursor() or RWindowTreeNode::SetCustomPointerCursor(). The pointer cursor's origin automatically tracks the position of the pointing device, and the origin forms the pointer cursor's "hot spot", i.e., the point whose co-ordinates are sent to the client if a pointer event occurs. If the pointer cursor's bitmap needs to extend to the left or upwards from the pointer position, its sprite member should be given a negative offset in TSpriteMember::iOffset.

Note:

Derivation

MWsClientClassBase class for all classes whose objects are clients of the window server engine
RWsPointerCursorPointer cursor
RWsSpriteBaseSprite base class

Defined in RWsPointerCursor:
Construct(), RWsPointerCursor()

Inherited from MWsClientClass:
WsHandle()

Inherited from RWsSpriteBase:
Activate(), AppendMember(), Close(), UpdateMember()


Construction and destruction


RWsPointerCursor()

RWsPointerCursor();

Description

Default C++ constructor.

Use this version of the constructor to allow classes that contain an RWsPointerCursor to be constructed before an RWsSession exists.

Note:

RWsPointerCursor pointerCursor;
pointerCursor=RWsPointerCursor(iWsSession);


RWsPointerCursor()

RWsPointerCursor(RWsSession& aWs);

Description

Constructs a pointer cursor initialised with a window server session.

Initialisation must be completed using the Construct() function before the sprite can be activated using RWsSpriteBase::Activate().

Once initialisation is complete, the pointer cursor can be passed as an argument to RWsSession::SetSystemPointerCursor() or RWindowTreeNode::SetCustomPointerCursor().

Parameters

RWsSession& aWs

The window server session owning the pointer cursor.


Construct()

TInt Construct(TInt aFlags);

Description

Completes pointer cursor construction.

This function must be called before the pointer cursor is activated.

Parameters

TInt aFlags

ESpriteFlash to flash the sprite on and off or 0 for a non-flashing cursor. Note that pointer cursors always behave as if ESpriteNoChildClip and ESpriteNoShadows are set.

Return value

TInt

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