VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Attributes
makVrv::DtMouseState Class Reference

This class encapsulates the state associated with a mouse button event. More...

Public Types

enum  MouseButton { NoButton = 0x0, LeftButton = 0x1, MiddleButton = 0x2, RightButton = 0x4 }
 Describe which mouse button(s) are pressed or released. More...
 
enum  MouseModifier { NoModifier = 0x0, AltModifier = 0x1, CtrlModifier = 0x2, ShiftModifier = 0x4 }
 Describe which modifier(s) are pressed. More...
 

Public Member Functions

 DtMouseState ()
 Default constructor. More...
 
 DtMouseState (int x, int y, double nx, double ny, int wheel, MouseButton buttonState, MouseModifier modState)
 Construct a mouse event. More...
 
virtual ~DtMouseState ()
 Destructor. More...
 
 DtMouseState (const DtMouseState &)
 Copy constructor. More...
 
DtMouseStateoperator= (const DtMouseState &)
 Assignment operator. More...
 
virtual int x () const
 Return the X-axis coorindate of the mouse. More...
 
virtual void setX (int x)
 Set the X-axis value. More...
 
virtual int y () const
 Return the Y-axis coorindate of the mouse. More...
 
virtual void setY (int y)
 Set the Y-axis value. More...
 
virtual double normalizedX () const
 Get the X value normalized ( -1 .. 1) More...
 
virtual void setNormalizedX (double nx)
 Set the normalized X value. More...
 
virtual double normalizedY () const
 Get the Y value normalized ( -1 .. 1) More...
 
virtual void setNormalizedY (double ny)
 Set the normalized Y value. More...
 
virtual int wheel () const
 Returns the wheel value of the mouse. More...
 
virtual void setWheel (int wheel)
 Set the wheel value. More...
 
virtual bool leftDown () const
 Return state of the left button. More...
 
virtual void setLeftDown (bool leftDown)
 Set the state of the left mouse button. More...
 
virtual bool middleDown () const
 Return state of the middle button. More...
 
virtual void setMiddleDown (bool middleDown)
 Set the state of the middle mouse button. More...
 
virtual bool rightDown () const
 Return state of the right button. More...
 
virtual void setRightDown (bool rightDown)
 Set the state of the right mouse button. More...
 
virtual MouseButton buttonState () const
 get the entire state vector instead of using the boolean accessors More...
 
virtual void setButtonState (MouseButton buttonState)
 set the entire state vector instead of using the boolean mutators More...
 
virtual bool altDown () const
 Return if the alt modifier key was pressed with the mouse event. More...
 
virtual void setAltDown (bool altDown)
 Set the alt (modifier) variable. More...
 
virtual bool ctrlDown () const
 Return if the ctrl modifier key was pressed with the mouse event. More...
 
virtual void setCtrlDown (bool ctrlDown)
 Set the ctrl (modifier) variable. More...
 
virtual bool shiftDown () const
 Return if the shift modifier key was pressed with the mouse event. More...
 
virtual void setShiftDown (bool shiftDown)
 Set the shift (modifier) variable. More...
 
virtual MouseModifier modifiers () const
 Get the entire modifier vector instead of using the boolean accessors. More...
 
virtual void setModifiers (MouseModifier modifiers)
 Set the entire modifier vector instead of using the boolean mutators. More...
 

Protected Attributes

unsigned int myX
 
unsigned int myY
 
double myNormalizedX
 
double myNormalizedY
 
int myWheel
 
MouseButton myButtonState
 
MouseModifier myModifiers
 

Detailed Description

This class encapsulates the state associated with a mouse button event.

Member Enumeration Documentation

Describe which mouse button(s) are pressed or released.

Enumerator
NoButton 
LeftButton 
MiddleButton 
RightButton 

Describe which modifier(s) are pressed.

Enumerator
NoModifier 
AltModifier 
CtrlModifier 
ShiftModifier 

Constructor & Destructor Documentation

makVrv::DtMouseState::DtMouseState ( )

Default constructor.

makVrv::DtMouseState::DtMouseState ( int  x,
int  y,
double  nx,
double  ny,
int  wheel,
MouseButton  buttonState,
MouseModifier  modState 
)

Construct a mouse event.

virtual makVrv::DtMouseState::~DtMouseState ( )
virtual

Destructor.

makVrv::DtMouseState::DtMouseState ( const DtMouseState )

Copy constructor.

Member Function Documentation

DtMouseState& makVrv::DtMouseState::operator= ( const DtMouseState )

Assignment operator.

virtual int makVrv::DtMouseState::x ( ) const
virtual

Return the X-axis coorindate of the mouse.

virtual void makVrv::DtMouseState::setX ( int  x)
virtual

Set the X-axis value.

virtual int makVrv::DtMouseState::y ( ) const
virtual

Return the Y-axis coorindate of the mouse.

virtual void makVrv::DtMouseState::setY ( int  y)
virtual

Set the Y-axis value.

virtual double makVrv::DtMouseState::normalizedX ( ) const
virtual

Get the X value normalized ( -1 .. 1)

virtual void makVrv::DtMouseState::setNormalizedX ( double  nx)
virtual

Set the normalized X value.

virtual double makVrv::DtMouseState::normalizedY ( ) const
virtual

Get the Y value normalized ( -1 .. 1)

virtual void makVrv::DtMouseState::setNormalizedY ( double  ny)
virtual

Set the normalized Y value.

virtual int makVrv::DtMouseState::wheel ( ) const
virtual

Returns the wheel value of the mouse.

virtual void makVrv::DtMouseState::setWheel ( int  wheel)
virtual

Set the wheel value.

virtual bool makVrv::DtMouseState::leftDown ( ) const
virtual

Return state of the left button.

virtual void makVrv::DtMouseState::setLeftDown ( bool  leftDown)
virtual

Set the state of the left mouse button.

virtual bool makVrv::DtMouseState::middleDown ( ) const
virtual

Return state of the middle button.

virtual void makVrv::DtMouseState::setMiddleDown ( bool  middleDown)
virtual

Set the state of the middle mouse button.

virtual bool makVrv::DtMouseState::rightDown ( ) const
virtual

Return state of the right button.

virtual void makVrv::DtMouseState::setRightDown ( bool  rightDown)
virtual

Set the state of the right mouse button.

virtual MouseButton makVrv::DtMouseState::buttonState ( ) const
virtual

get the entire state vector instead of using the boolean accessors

virtual void makVrv::DtMouseState::setButtonState ( MouseButton  buttonState)
virtual

set the entire state vector instead of using the boolean mutators

virtual bool makVrv::DtMouseState::altDown ( ) const
virtual

Return if the alt modifier key was pressed with the mouse event.

virtual void makVrv::DtMouseState::setAltDown ( bool  altDown)
virtual

Set the alt (modifier) variable.

virtual bool makVrv::DtMouseState::ctrlDown ( ) const
virtual

Return if the ctrl modifier key was pressed with the mouse event.

virtual void makVrv::DtMouseState::setCtrlDown ( bool  ctrlDown)
virtual

Set the ctrl (modifier) variable.

virtual bool makVrv::DtMouseState::shiftDown ( ) const
virtual

Return if the shift modifier key was pressed with the mouse event.

virtual void makVrv::DtMouseState::setShiftDown ( bool  shiftDown)
virtual

Set the shift (modifier) variable.

virtual MouseModifier makVrv::DtMouseState::modifiers ( ) const
virtual

Get the entire modifier vector instead of using the boolean accessors.

virtual void makVrv::DtMouseState::setModifiers ( MouseModifier  modifiers)
virtual

Set the entire modifier vector instead of using the boolean mutators.

Member Data Documentation

unsigned int makVrv::DtMouseState::myX
protected
unsigned int makVrv::DtMouseState::myY
protected
double makVrv::DtMouseState::myNormalizedX
protected
double makVrv::DtMouseState::myNormalizedY
protected
int makVrv::DtMouseState::myWheel
protected
MouseButton makVrv::DtMouseState::myButtonState
protected
MouseModifier makVrv::DtMouseState::myModifiers
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)