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

ufo::UMouseWheelEvent Class Reference

This event is used for mouse wheel events. More...

#include <umousewheelevent.hpp>

Inheritance diagram for ufo::UMouseWheelEvent:

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

Public Types

enum  { WHEEL_DATA = 120 }

Public Member Functions

 UMouseWheelEvent (UWidget *source, Type type, UMod_t modifiersA, const UPoint &pos, const UPoint &root, int delta, int wheel)
 UMouseWheelEvent (UWidget *source, Type type, UMod_t modifiersA, const UPoint &pos, int delta, int wheel)
const UPointgetLocation () const
const UPointgetRootLocation () const
int getX () const
int getY () const
int getRootX () const
int getRootY () const
void translate (const UPoint &pos)
int getWheel () const
int getDelta () const
int getWheelRotation () const

Protected Member Functions

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

Detailed Description

This event is used for mouse wheel events.

Author:
Johannes Schmidt


Constructor & Destructor Documentation

ufo::UMouseWheelEvent::UMouseWheelEvent UWidget source,
Type  type,
UMod_t  modifiersA,
const UPoint pos,
const UPoint root,
int  delta,
int  wheel
[inline]
 

Parameters:
wheel The number of the mouse wheel (some mices have two mouse wheels). '0' is the first wheel.
delta The amount that the mouse wheel was scrolled. If the mouse wheel was scrolled forwards/away from the user, the value is positive otherwise negative. Please Note: It is not the number of clicks but a multiple or a fraction of WHEEL_DELTA which was set to 120 by mouse vendors to allow the building of mouse wheels with a finer resolution.


Member Function Documentation

int ufo::UMouseWheelEvent::getDelta  )  const [inline]
 

The amount that the mouse wheel was scrolled as multiple or fraction of WHEEL_DATA

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

X value relative to the top most root pane.

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

Y value relative to the top most root pane.

int ufo::UMouseWheelEvent::getWheelRotation  )  const [inline]
 

This method is only for convenience and returns the numbers of "clicks" of the rotation with current "low-resolution" mouse wheels. A negative amount of clicks means a rotation towards the user, positive values are rotations away from the user. It is equal to getScrollAmount() / UMouseWheelEvent::WHEEL_DATA.

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

X value relative to the source widget.

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

Y value relative to the source widget.

virtual std::ostream& ufo::UMouseWheelEvent::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::UMouseWheelEvent::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