|
||
class RWsPointerCursor : public RWsSpriteBase;
Pointer cursor.
The pointer cursor is created in a similar way to a sprite. After creating it, 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(TInt)
or RWindowTreeNode::SetCustomPointerCursor(const RWsPointerCursor &)
. 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:
Pointer cursors are rarely used in pure pen architectures, but they are supported for mouse or tablet use.
MWsClientClass
- Base class for all classes whose objects are clients of the window server.
RWsSpriteBase
- Sprite base class.
RWsPointerCursor
- Pointer cursor.
Defined in RWsPointerCursor
:
Construct(TInt)
Completes pointer cursor construction.RWsPointerCursor()
Default C++ constructor.RWsPointerCursor(RWsSession &)
Constructs a pointer cursor initialised with a window server session.Inherited from MWsClientClass
:
WsHandle()const
Gets the server side handle for the object.Inherited from RWsSpriteBase
:
Activate()
Activates the sprite or pointer cursor.AppendMember(const TSpriteMember &)
Adds a sprite member to a sprite or pointer cursor.Close()
Destroys the sprite or pointer cursor in the window server, and frees client-sid...RWsSpriteBase(RWsSession &)
Protected constructor with a window server session.UpdateMember(TInt)
Updates the displayed sprite, taking into account any change to the content of t...UpdateMember(TInt,const TSpriteMember &)
Replaces one of a sprite's members.IMPORT_C RWsPointerCursor();
Default C++ constructor.
Use this constructor to allow classes that contain an RWsPointerCursor to be constructed before an RWsSession
exists.
Note: do not use this version of the constructor on its own. Before an RWsPointerCursor object can be used, it must be constructed using the RWsPointerCursor(RWsSession) constructor. An example of this might be as follows:
RWsPointerCursor pointerCursor;
pointerCursor=RWsPointerCursor(iWsSession);
IMPORT_C RWsPointerCursor(RWsSession &aWs);
Constructs a pointer cursor initialised with a window server session.
Initialisation must be completed using the RWsPointerCursor::Construct(TInt)
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(const RWsPointerCursor &,TInt)
or RWindowTreeNode::SetCustomPointerCursor(const RWsPointerCursor &)
.
|
IMPORT_C TInt Construct(TInt aFlags);
Completes pointer cursor construction.
This function must be called before the pointer cursor is activated.
It always causes a flush of the window server buffer.
|
|