Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

MouseInputDevice Class Reference

Input device which gets the reactions from the mouse. More...

#include <mouseinputdevice.hpp>

Inheritance diagram for MouseInputDevice:

Inheritance graph
[legend]
Collaboration diagram for MouseInputDevice:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MouseInputDevice ()
 Constructor.
 ~MouseInputDevice ()
 Destructor.
int getLastButton () const
 Get the last mouse button pressed.

Protected Member Functions

bool poll ()
 Poll the mouse for pressed buttons.
bool handle (vector< bool > &states)
 InputDevice::handle().

Protected Attributes

int lastButton
 last button pressed

Detailed Description

Input device which gets the reactions from the mouse.

Definition at line 26 of file mouseinputdevice.hpp.


Constructor & Destructor Documentation

MouseInputDevice::MouseInputDevice  ) 
 

Constructor.

Definition at line 25 of file mouseinputdevice.cpp.

MouseInputDevice::~MouseInputDevice  ) 
 

Destructor.

Definition at line 33 of file mouseinputdevice.cpp.


Member Function Documentation

int MouseInputDevice::getLastButton  )  const
 

Get the last mouse button pressed.

Usually 1 is the left mouse button, 2 the right one and 3 the middle mouse button.

Warning:
This value might differ from mouse to mouse.
Returns:
mouse button pressed
Definition at line 61 of file mouseinputdevice.cpp.

References lastButton.

bool MouseInputDevice::handle vector< bool > &  states  )  [protected, virtual]
 

InputDevice::handle().

Reimplemented from InputDevice.

Definition at line 68 of file mouseinputdevice.cpp.

bool MouseInputDevice::poll  )  [protected, virtual]
 

Poll the mouse for pressed buttons.

Returns:
true if any mousebutton is pressed, else false

Reimplemented from InputDevice.

Definition at line 41 of file mouseinputdevice.cpp.

References PtfCore::getScheduler(), Singleton< PtfCore >::getSingleton(), lastButton, and Scheduler::quit().

Here is the call graph for this function:


Member Data Documentation

int MouseInputDevice::lastButton [protected]
 

last button pressed

Definition at line 28 of file mouseinputdevice.hpp.

Referenced by getLastButton(), and poll().


The documentation for this class was generated from the following files:
Generated on Fri Dec 17 14:54:29 2004 for Psychological Test Framework by doxygen 1.3.8