ubit
Public Types | Public Member Functions | List of all members
ubit::UWheelEvent Class Reference

wheel events More...

#include <uevent.hpp>

Inheritance diagram for ubit::UWheelEvent:
ubit::UMouseEvent ubit::UInputEvent ubit::UEvent ubit::UModifier

Public Types

enum  { WHEEL_DELTA = 120 }
 

Public Member Functions

 UWheelEvent (const UCond &, UView *source, UEventFlow *, unsigned long time, int state, const UPoint &pos, const UPoint &abs_pos, int wheel_btn, int wheel_delta)
 
virtual UWheelEventtoWheelEvent ()
 
bool isVertical () const
 
int getWheelDelta () const
 returns the amount of wheel movement. More...
 
- Public Member Functions inherited from ubit::UMouseEvent
 UMouseEvent (const UCond &, UView *source, UEventFlow *, unsigned long time, int state, const UPoint &pos, const UPoint &abs_pos, int btn)
 
virtual UMouseEventtoMouseEvent ()
 
float getX () const
 returns the X coordinate of the mouse in getView().
 
float getY () const
 returns the Y coordinate of the mouse in getView().
 
const UPointgetPos () const
 returns the coordinates of the mouse in getView().
 
const UPointgetScreenPos () const
 returns the screen coordinates of the mouse.
 
UPoint getPosIn (const UView &view) const
 returns the coordinates of this event in this 'view'.
 
UPoint getPosIn (const UBox &parent_box) const
 returns the coordinates of this event in parent_box. More...
 
UPoint getPosAndViewIn (const UBox &parent, UView *&parent_view) const
 returns the coordinates of this event in 'parent' and the corresponding 'parent's view. More...
 
int getClickCount () const
 returns the number of mouse clicks.
 
int getButton () const
 returns the button that was just pressed or released. More...
 
int getButtons () const
 returns an ORed mask of mouse buttons after the event occured. More...
 
void translatePos (float x, float y)
 translates the mouse position.
 
void propagate ()
 propagates events in children: More...
 
void setFirstDrag (bool s)
 
bool isFirstDrag () const
 
bool isBrowsing () const
 
UStrgetStr ()
 returns the UStr object that is under the mouse ( More...
 
UStrgetStr (UDataContext &)
 returns the UStr object that is under the mouse and related properties ( More...
 
UDatagetData ()
 returns the UData object that is under the mouse ( More...
 
UDatagetData (UDataContext &)
 returns the UData object that is under the mouse and related properties. More...
 
- Public Member Functions inherited from ubit::UInputEvent
 UInputEvent (const UCond &, UView *source_view, UEventFlow *, unsigned long when, int state)
 
virtual UInputEventtoInputEvent ()
 dynamic cast: returns 'this' converted to the requested class or null.
 
virtual UElemgetSource () const
 returns the object that received this event.
 
UViewgetView () const
 returns the object's view that received this event. More...
 
UViewgetViewOf (const UBox &box) const
 returns the view of 'box' that (indirectly) received this event. More...
 
unsigned long getWhen () const
 returns the time when this event was produced.
 
virtual int getModifiers () const
 returns an ORed mask of mouse buttons and modifiers that are pressed. More...
 
bool isShiftDown () const
 
bool isControlDown () const
 
bool isMetaDown () const
 
bool isAltDown () const
 
bool isAltGraphDown () const
 
UWingetWin () const
 returns the hard window that received this event.
 
UViewgetWinView () const
 returns the view of the hard window that received this event.
 
UEventFlowgetFlow () const
 returns the Event Flow that received this event (for two-handed interaction or groupware). More...
 
UDispgetDisp () const
 returns the display that received this event. More...
 
bool dontCloseMenu () const
 impl.
 
- Public Member Functions inherited from ubit::UEvent
 UEvent (const UCond &c, UObject *source, UObject *aux=null)
 
const UCondgetCond () const
 returns the event condition that detected this event. More...
 
virtual UObjectgetAux () const
 returns auxilliary data.
 
virtual UKeyEventtoKeyEvent ()
 
virtual UViewEventtoViewEvent ()
 
virtual UPaintEventtoPaintEvent ()
 
virtual UResizeEventtoResizeEvent ()
 
virtual UTimerEventtoTimerEvent ()
 
virtual UWinEventtoWinEvent ()
 
virtual UMessageEventtoMessageEvent ()
 
virtual USysWMEventtoSysWMEvent ()
 
virtual UUserEventtoUserEvent ()
 
void setCond (const UCond &)
 

Additional Inherited Members

- Static Public Member Functions inherited from ubit::UModifier
static void mapKeys (UDisp *)
 impl: init keys mapping.
 
- Static Public Attributes inherited from ubit::UModifier
static const int LeftButton
 
static const int RightButton
 
static const int MidButton
 
static const int ShiftDown
 
static const int ControlDown
 
static const int & MetaDown
 
static const int & AltDown
 
static const int AltGraphDown
 
- Protected Attributes inherited from ubit::UMouseEvent
int button
 
int click_count
 
UPoint pos
 
UPoint abs_pos
 
- Protected Attributes inherited from ubit::UInputEvent
struct ubit::UInputEvent::Modes modes
 
int state
 
unsigned long when
 
UViewsource_view
 
UEventFloweflow
 
UElemevent_observer
 
- Protected Attributes inherited from ubit::UEvent
const UCondcond
 
UObjectsource
 
UObjectaux
 

Detailed Description

wheel events

See also
UOn::wheel;

Member Function Documentation

§ getWheelDelta()

int ubit::UWheelEvent::getWheelDelta ( ) const
inline

returns the amount of wheel movement.

  • a positive value indicates that the wheel was rotated forward, away from the user;
  • a negative value indicates that the wheel was rotated backward, toward the user.
  • One wheel click is defined as WHEEL_DELTA, which is 120.

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