Class: TMouseDownEvent

Declaration: MouseInput.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TMouseEvent

Inherited By:

None.

Purpose:

Derives from TMouseEvent, this class represents the action of a mouse button being pressed. This class is multibutton aware. In addition, it returns an indicator of which button was pressed. Mouse button numbering is one-based and starts with 1, not 0.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

This class will rarely be derived from.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TMouseDownEvent::TMouseDownEvent

  1. TMouseDownEvent (short clickCount, const TGPoint & position, TMouseInputDevice * device, TStandardEventReceiver * receiver, short button =1);
  2. TMouseDownEvent (const TMouseDownEvent & copy)

Interface Category:

API.

Purpose:

  1. Creates a mouse-down event from the specified position, device, and receiver. The mouse button number defaults to 1. Mouse button numbering is one-based and starts with 1, not 0.
  2. Copy constructor.

Calling Context:

  1. Called to create an event.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMouseDownEvent::~TMouseDownEvent

virtual ~ TMouseDownEvent ()

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: TMouseDownEvent::operator=

TMouseDownEvent & operator =(const TMouseDownEvent & assign)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function by using the operator in an assignment statement.

Parameters:

Return Value:

Returns a const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMouseDownEvent::GetClickCount

short GetClickCount () const

Interface Category:

API.

Purpose:

Each TMouseDownEvent contains the number of clicks in the current grouping of mouse clicks. The count is accessed via the GetClickCount. The developer should note that a double click sequence is seen by the program as a series of two TMouseDownEvents. The first event has a click count of one (the first click). The second click has a click count of two (the double click). This also generalizes to the N-click situation, which is seen as a series of N TMouseDownEvents; first a click count of one, then of two, then three, ..., then N-1, then N.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the current number of mouse clicks.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMouseDownEvent::GetButtonNumber

short GetButtonNumber() const;

Interface Category:

API.

Purpose:

Returns the mouse button number that caused the event to occur. Mouse button numbering is one-based and starts with 1, not 0.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the mouse button number that caused the event.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMouseDownEvent::DispatchToMouseEventHandler

virtual bool DispatchToMouseEventHandler (MMouseEventHandler & target)

Interface Category:

API.

Purpose:

Sends this event to the specified handler.

Calling Context:

Derived classes can call this function directly.

Parameters:

Return Value:

Returns true if successfully handled by target; false otherwise.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.