- Your Widget Set For OpenGL
Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Related Pages

ufo::UMouseEvent Class Reference

This event is used for mouse button and mouse move events. More...

#include <umouseevent.hpp>

Inheritance diagram for ufo::UMouseEvent:

ufo::UInputEvent ufo::UWidgetEvent ufo::UEvent ufo::UObject ufo::UCollectable List of all members.

Public Member Functions

 UMouseEvent (UWidget *sourceA, Type typeA, UMod_t modifiersA, const UPoint &pos, UMod_t button, int clickCountA)
 UMouseEvent (UWidget *sourceA, Type typeA, UMod_t modifiersA, const UPoint &pos, const UPoint &relMove, UMod_t button, int clickCountA)
 UMouseEvent (UWidget *sourceA, Type typeA, UMod_t modifiersA, const UPoint &pos, const UPoint &relMove, const UPoint &root, UMod_t button, int clickCountA)
int getClickCount () const
UMod_t getButton () const
const UPointgetLocation () const
const UPointgetRootLocation () const
const UPointgetRelMovement () const
int getX () const
int getY () const
int getXRel () const
int getYRel () const
int getRootX () const
int getRootY () const
void translate (const UPoint &pos)

Protected Member Functions

virtual std::ostream & paramString (std::ostream &os) const

Detailed Description

This event is used for mouse button and mouse move events.

Author:
Johannes Schmidt


Constructor & Destructor Documentation

ufo::UMouseEvent::UMouseEvent UWidget sourceA,
Type  typeA,
UMod_t  modifiersA,
const UPoint pos,
UMod_t  button,
int  clickCountA
 

Creates a new mouse event.

Parameters:
sourceA The widge below the mouse cursor
typeA The event type. Should be UEvent::MousePressed, UEvent::MouseReleased, UEvent::MouseClicked, UEvent::MouseMoved, UEvent::MouseDragged, UEvent::MouseEntered, UEvent::MouseExited
modifiersA All modifiers which were being pressed immediately before the event was generated.

ufo::UMouseEvent::UMouseEvent UWidget sourceA,
Type  typeA,
UMod_t  modifiersA,
const UPoint pos,
const UPoint relMove,
UMod_t  button,
int  clickCountA
 

Creates a new mouse event.

Parameters:
sourceA The widge below the mouse cursor
typeA The event type. Should be UEvent::MousePressed, UEvent::MouseReleased, UEvent::MouseClicked, UEvent::MouseMoved, UEvent::MouseDragged, UEvent::MouseEntered, UEvent::MouseExited
modifiersA All modifiers which were being pressed immediately before the event was generated.
relMove The relative movement to the former mouse position. Strictly spoken is this a vector.

ufo::UMouseEvent::UMouseEvent UWidget sourceA,
Type  typeA,
UMod_t  modifiersA,
const UPoint pos,
const UPoint relMove,
const UPoint root,
UMod_t  button,
int  clickCountA
 

Creates a new mouse event.

Parameters:
sourceA The widge below the mouse cursor
typeA The event type. Should be UEvent::MousePressed, UEvent::MouseReleased, UEvent::MouseClicked, UEvent::MouseMoved, UEvent::MouseDragged, UEvent::MouseEntered, UEvent::MouseExited
modifiersA All modifiers which were being pressed immediately before the event was generated.
relMove The relative movement to the former mouse position. Strictly spoken is this a vector.


Member Function Documentation

UMod_t ufo::UMouseEvent::getButton  )  const [inline]
 

Returns the mouse button which was changed. Returned value is a modifier type and one of the values of:

  • NoButton no button changed
  • LeftButton left mouse button changed
  • MiddleButton middle mouse button changed
  • RightButton right mouse button changed
  • MouseButton{1-5} mouse button 1..5 changed

int ufo::UMouseEvent::getClickCount  )  const [inline]
 

returns how many times this mouse button was clicked within ?? ms

const UPoint & ufo::UMouseEvent::getLocation  )  const [inline]
 

Returns:
The mouse location relative to the source widget.

const UPoint & ufo::UMouseEvent::getRelMovement  )  const [inline]
 

Returns:
The relative mouse movement.

const UPoint & ufo::UMouseEvent::getRootLocation  )  const [inline]
 

Returns:
The mouse location relative to the UFO context.

int ufo::UMouseEvent::getRootX  )  const [inline]
 

X value relative to the top most root pane.

int ufo::UMouseEvent::getRootY  )  const [inline]
 

Y value relative to the top most root pane.

int ufo::UMouseEvent::getX  )  const [inline]
 

X value relative to the source widget.

int ufo::UMouseEvent::getXRel  )  const [inline]
 

The mouse movement in x direction.

int ufo::UMouseEvent::getY  )  const [inline]
 

Y value relative to the source widget.

int ufo::UMouseEvent::getYRel  )  const [inline]
 

The mouse movement in y direction.

virtual std::ostream& ufo::UMouseEvent::paramString std::ostream &  os  )  const [protected, virtual]
 

Prints some useful internal data to the ostream os. This method is meant only for debugging purposes.

Reimplemented from ufo::UInputEvent.

void ufo::UMouseEvent::translate const UPoint pos  )  [inline]
 

translates the origin of the event


The documentation for this class was generated from the following file:
The libUFO Project - written by Johannes Schmidt