version 3.3

VRS::MotionEvent Class Reference

Mouse Motion Event. More...

#include <vrs/sg/motionevent.h>

Inheritance diagram for VRS::MotionEvent:

VRS::InputEvent VRS::CanvasEvent VRS::Event VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 MotionEvent (Canvas *canvas, InputEvent::Modifier modifiers=InputEvent::NoModifier, VRSTime t=0, int x=0, int y=0, bool sameWindow=false, InputEvent::Button button=InputEvent::AllMouseButtons)
int x () const
int y () const
bool sameWindow () const
int deltaX () const
int deltaY () const
void setDelta (int dx, int dy)
InputEvent::Button button () const
void setButton (InputEvent::Button button)
 VRS_TYPEINFO (MotionEvent, InputEvent)

Friends

class Canvas


Detailed Description

Mouse Motion Event.

Constructor & Destructor Documentation

VRS::MotionEvent::MotionEvent ( Canvas canvas,
InputEvent::Modifier  modifiers = InputEvent::NoModifier,
VRSTime  t = 0,
int  x = 0,
int  y = 0,
bool  sameWindow = false,
InputEvent::Button  button = InputEvent::AllMouseButtons 
)


Member Function Documentation

int VRS::MotionEvent::x (  )  const [inline]

int VRS::MotionEvent::y (  )  const [inline]

bool VRS::MotionEvent::sameWindow (  )  const [inline]

Mouse position in canvas coordinates. `sameWindow' is true if the mouse is still in the window where the motion started. It is false, if the mouse has been moved outside this window in the mean time.

int VRS::MotionEvent::deltaX (  )  const [inline]

int VRS::MotionEvent::deltaY (  )  const [inline]

void VRS::MotionEvent::setDelta ( int  dx,
int  dy 
) [inline]

`deltaX' and `deltaY' return the increments to the mouse position with respect to the last `MotionEvent'.

InputEvent::Button VRS::MotionEvent::button (  )  const [inline]

void VRS::MotionEvent::setButton ( InputEvent::Button  button  )  [inline]

Gets/sets the button for the motion event. NOTE: some GUI toolkits do not provide this information; in such a case InputEvent::AllMouseButtons should be returned.

VRS::MotionEvent::VRS_TYPEINFO ( MotionEvent  ,
InputEvent   
)


Friends And Related Function Documentation

friend class Canvas [friend]

Reimplemented from VRS::InputEvent.


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

Generated on Mon May 20 06:00:35 2013 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact