Class: TMouseDevice

Declaration: MouseDevice.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

None.

Inherited By:

None.

Purpose:

Represents mouse device to applications.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Do not derive from TMouseDevice; this is a concrete class.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TMouseDevice::TMouseDevice

TMouseDevice ()

Interface Category:

API.

Purpose:

Default constructor

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This class is not streamable.

Member Function: TMouseDevice::~TMouseDevice

virtual ~ TMouseDevice ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMouseDevice::MouseMoved

virtual void MouseMoved (const TGPoint & atPoint)

Interface Category:

API.

Purpose:

Moves the mouse to the specified position (in global coordinates). As a result of this movement, the cursor can be updated and MouseMoved events can be generated.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMouseDevice::Sleep

virtual void Sleep ()

Interface Category:

API.

Purpose:

Tells the TMouseDevice object that the mouse is becoming temporarily inactive. This is useful if you have a virtual mouse (like the one provided by Timbuktu on the Macintosh) that sometimes leaves the desktop (causing the cursor to disappear). As a consequence of this deactivation, the framework can remove a user-visible representation of the mouse from the screen or give other feedback to indicate that the mouse is no longer available.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMouseDevice::SetNumberOfButtons

virtual void SetNumberOfButtons (short numOfButtons)

Interface Category:

API.

Purpose:

Sets the total number of buttons available on the mouse device.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function needs to be called just after a TMouseDevice object is constructed, otherwise TMouseDevice will have default number of buttons. Also, the button count is 1-based.

Member Function: TMouseDevice::SetMultiClickTime

virtual void SetMultiClickTime (const TTime &)

Interface Category:

API.

Purpose:

Sets the multiclick time between the subsequent button down or release.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMouseDevice::MouseUp

virtual void MouseUp (const short buttonNumber)

Interface Category:

API.

Purpose:

Sends a mouse-up event for a particular button at the current position of the mouse.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

The button number starts from 1.

Member Function: TMouseDevice::MouseDown

virtual void MouseDown (const short buttonNumber)

Interface Category:

API.

Purpose:

Sends a mouse-down event for a particular button at the current position of the mouse.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

The button number starts from 1.

Member Function: TMouseDevice::InternalMouseMoved

void InternalMouseMoved (const TGPoint & atPoint)

Interface Category:

API.

Purpose:

Developers should treat this function as private.

Calling Context:

Do not call this function.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

This function will be reclassified as private in the next release.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.