gcn::MouseInput Class Reference

#include <mouseinput.hpp>

List of all members.


Detailed Description

Internal class representing mouse input.

Generally you won't have to bother using this class.

Definition at line 69 of file mouseinput.hpp.

Public Types

 EMPTY = 0
 LEFT
 RIGHT
 MIDDLE
 WHEEL_UP
 WHEEL_DOWN
 PRESS
 RELEASE
 MOTION
enum  {
  EMPTY = 0, LEFT, RIGHT, MIDDLE,
  WHEEL_UP, WHEEL_DOWN, PRESS, RELEASE,
  MOTION
}
 Enum with mouse input values.

Public Member Functions

 MouseInput ()
 Constructor.
 MouseInput (int button, int type, int mousex, int mousey, int timeStamp)
 Constructor.
void setType (int type)
 Sets the input type.
int getType () const
 Gets the input type.
void setButton (int button)
 Sets the button pressed.
int getButton () const
 Gets the button pressed.
void setTimeStamp (int timeStamp)
 Sets the timestamp for the input.
int getTimeStamp () const
 Gets the time stamp of the input.

Public Attributes

int x
int y

Protected Attributes

int mType
int mButton
int mTimeStamp


Constructor & Destructor Documentation

gcn::MouseInput::MouseInput ( int  button,
int  type,
int  mousex,
int  mousey,
int  timeStamp 
)

Constructor.

Parameters:
button the button pressed.
type the type of input.
mousex the mouse x coordinate.
mousey the mouse y coordinate.
timeStamp the mouse inputs time stamp.

Definition at line 65 of file mouseinput.cpp.

References mButton, mTimeStamp, mType, x, and y.


Member Function Documentation

int gcn::MouseInput::getButton (  )  const

Gets the button pressed.

Returns:
the button pressed.

Definition at line 89 of file mouseinput.cpp.

References mButton.

Referenced by gcn::Widget::_mouseInputMessage().

int gcn::MouseInput::getTimeStamp (  )  const

Gets the time stamp of the input.

Returns:
the time stamp of the input.

Definition at line 94 of file mouseinput.cpp.

References mTimeStamp.

Referenced by gcn::Widget::_mouseInputMessage().

int gcn::MouseInput::getType (  )  const

Gets the input type.

Returns:
the input type.

Definition at line 79 of file mouseinput.cpp.

References mType.

Referenced by gcn::Widget::_mouseInputMessage().

void gcn::MouseInput::setButton ( int  button  ) 

Sets the button pressed.

Parameters:
button the button pressed.

Definition at line 84 of file mouseinput.cpp.

References mButton.

Referenced by gcn::SDLInput::pushInput(), gcn::GLUTInput::pushMotionInput(), and gcn::GLUTInput::pushMouseInput().

void gcn::MouseInput::setTimeStamp ( int  timeStamp  ) 

Sets the timestamp for the input.

Parameters:
timeStamp the timestamp of the input.

Definition at line 99 of file mouseinput.cpp.

References mTimeStamp.

Referenced by gcn::SDLInput::pushInput().

void gcn::MouseInput::setType ( int  type  ) 

Sets the input type.

Parameters:
type the type of input.

Definition at line 74 of file mouseinput.cpp.

References mType.

Referenced by gcn::SDLInput::pushInput(), gcn::GLUTInput::pushMotionInput(), and gcn::GLUTInput::pushMouseInput().


The documentation for this class was generated from the following files:
Generated on Sat Jul 29 19:38:48 2006 for Guichan by  doxygen 1.4.7