Assignments
Assignments
Ray::Mouse Class Reference

#include <mouse.h>

Public Member Functions

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

Public Attributes

bool shiftDown
 
bool ctrlDown
 
bool altDown
 
bool leftDown
 
bool middleDown
 
bool rightDown
 
bool 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::Mouse ( void  )

This constructor instantiates the mouse members

Member Function Documentation

◆ move()

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

◆ update()

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

◆ altDown

bool Ray::Mouse::altDown

Was the alt button depressed when the mouse state was updated

◆ ctrlDown

bool Ray::Mouse::ctrlDown

Was the control button depressed when the mouse state was updated

◆ endX

int Ray::Mouse::endX

The screen coordinates when the mouse was last moved

◆ endY

int Ray::Mouse::endY

◆ leftDown

bool Ray::Mouse::leftDown

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

◆ middleDown

bool Ray::Mouse::middleDown

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

◆ rightDown

bool Ray::Mouse::rightDown

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

◆ scrollDown

bool Ray::Mouse::scrollDown

Was the scroll wheel depressed when the mouse state was updated

◆ shiftDown

bool Ray::Mouse::shiftDown

Was the shift button depressed when the mouse state was updated

◆ startX

int Ray::Mouse::startX

The screen coordinates when the mouse state was updated

◆ startY

int Ray::Mouse::startY

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