class PCursor: public PContainer

This class represents the specification for a cursor that moves in tandem with the mouse or other pointing device.

Inheritance:


Public Methods

[more] PCursor ()
Create a standard arrow cursor.
[more] PCursor ( PRESOURCE_ID resID )
Create a cursor as loaded from the resources for the application.
[more] PCursor ( const PPixelImage & andMask, const PPixelImage & xorMask, const PPoint & hotSpot )
Create a cursor from the raw pixel images.
[more]virtual Comparison Compare ( const PObject & obj ) const
Determine if the two cursors are the same.

Public

[more] Overrides from class PObject


Inherited from PContainer:

Public

Construction

Common functions for containers

Protected Methods

ovirtual void DestroyContents()
ovirtual void AssignContents(const PContainer & c)
ovoid CopyContents(const PContainer & c)
ovoid CloneContents(const PContainer * src)
ovoid Destruct()


Inherited from PObject:

Public

Run Time Type functions

Comparison functions

I/O functions

Miscellaneous functions


Documentation

This class represents the specification for a cursor that moves in tandem with the mouse or other pointing device.

An instance of a cursor is attached to every PInteractor class and is automatically made current whenever the mouse is over that interactor.

A cursor consists of a small pixel image that interacts with the screen to yield transparent parts and or inverted parts as well as fixed colour image parts.

o PCursor()
Create a standard arrow cursor.

o PCursor( PRESOURCE_ID resID )
Create a cursor as loaded from the resources for the application. The resource identifier is a unique number associated with the cursor in the resources.
Parameters:
resID - Resource identifier constant.

o PCursor( const PPixelImage & andMask, const PPixelImage & xorMask, const PPoint & hotSpot )
Create a cursor from the raw pixel images. The dimensions of the pixel images must be the same as determined by the PApplication::GetCursorSize() function. They must also have a depth of 1 bit per pixel.

Pixels on the screen are determined by applying the and mask to it, then the xor mask. Thus pixels can be transparent, inverted, cleared or set as required.

The hot spot is the poin within the cursor bit map that is the actual cursor position, eg the point of the arrow cursor, the centre of a cross hair cursor etc.

Parameters:
andMask - Mask for pixels in the cursor.
xorMask - Value for pixels in the cursor.
hotSpot - Hot spot relative to corner of bit map

o Overrides from class PObject

ovirtual Comparison Compare( const PObject & obj ) const
Determine if the two cursors are the same. Note that this is different from having two cursors that merely look the same. They must be references to the same cursor or if loaded from resources, the same resource ID.

Returns:
EqualTo if reference the same cursor, GreaterThan if different.
Parameters:
obj - Other cursor to compare against.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.