My Project
Public Member Functions | Public Attributes | List of all members
Mouse Class Reference

#include <mouse.h>

Public Member Functions

 Mouse (void)
 
void update (int button, int state, int x, int y)
 
class Point2D move (int x, int y)
 

Public Attributes

int shiftDown
 
int ctrlDown
 
int altDown
 
int leftDown
 
int middleDown
 
int rightDown
 
int scrollDown
 
int startX
 
int startY
 
int endX
 
int endY
 

Detailed Description

This class represents the current state of the mouse

Constructor & Destructor Documentation

Mouse::Mouse ( void  )

This constructor instantiates the mouse members

Member Function Documentation

Point2D Mouse::move ( int  x,
int  y 
)

This method udpates the state of the mouse when the mouse is moved. The returned value indicates the distance (in screen coordinates) that the mouse has moved

void Mouse::update ( int  button,
int  state,
int  x,
int  y 
)

This method updates the state of the mouse when the state of a mouse button is changed

Member Data Documentation

int Mouse::altDown

Was the alt button depressed when the mouse state was updated

int Mouse::ctrlDown

Was the control button depressed when the mouse state was updated

int Mouse::endX

The screen coordinates when the mouse was last moved

int Mouse::leftDown

Was the left mouse button depressed when the mouse state was updated

int Mouse::middleDown

Was the middle mouse button depressed when the mouse state was updated

int Mouse::rightDown

Was the right mouse button depressed when the mouse state was updated

int Mouse::scrollDown

Was the scroll wheel depressed when the mouse state was updated

int Mouse::shiftDown

Was the shift button depressed when the mouse state was updated

int Mouse::startX

The screen coordinates when the mouse state was updated


The documentation for this class was generated from the following files: