ubit
Classes | Public Member Functions | Protected Attributes | Friends | List of all members
ubit::UInputEvent Class Reference

Base class for UMouseEvent and UKeyEvent Note that this class inherits from class UModifier that defines modifier masks such as LeftButton, RightButton... More...

#include <uevent.hpp>

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

Classes

struct  Modes
 

Public Member Functions

 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 UMouseEventtoMouseEvent ()
 
virtual UKeyEventtoKeyEvent ()
 
virtual UWheelEventtoWheelEvent ()
 
virtual UViewEventtoViewEvent ()
 
virtual UPaintEventtoPaintEvent ()
 
virtual UResizeEventtoResizeEvent ()
 
virtual UTimerEventtoTimerEvent ()
 
virtual UWinEventtoWinEvent ()
 
virtual UMessageEventtoMessageEvent ()
 
virtual USysWMEventtoSysWMEvent ()
 
virtual UUserEventtoUserEvent ()
 
void setCond (const UCond &)
 

Protected Attributes

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
 

Friends

class UElem
 
class UEventFlow
 
class UView
 
class UFlowView
 
class UViewFind
 

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
 

Detailed Description

Base class for UMouseEvent and UKeyEvent Note that this class inherits from class UModifier that defines modifier masks such as LeftButton, RightButton...

Member Function Documentation

§ getDisp()

UDisp * UInputEvent::getDisp ( ) const

returns the display that received this event.

A Ubit application can open windows on multiple displays. The default display is the UAppli.

See also
UAppli and UAppli::getDisp().

§ getFlow()

UEventFlow* ubit::UInputEvent::getFlow ( ) const
inline

returns the Event Flow that received this event (for two-handed interaction or groupware).

a Ubit application can manage 1 or several Event Flows. This is useful for two-handed interaction or groupware (each user controlling his own pointer on the screen(s)).

See also
UAppli and UAppli::getFlow().

§ getModifiers()

int UInputEvent::getModifiers ( ) const
virtual

returns an ORed mask of mouse buttons and modifiers that are pressed.

Modifier masks are defined in class UModifier. They are inherited by UEvent, and thus, UInputEvent. Exemple:

void callbackFunc(UEvent& e) {
   if (e.getModifiers() & (e.LeftButton | e.ControlDown))
       // done when the left mouse button AND the control key are pressed
}

alternatively, UEvent::LeftButton or UModifier::LeftButton can be used instead of e.LeftButton

§ getView()

UView* ubit::UInputEvent::getView ( ) const
inline

returns the object's view that received this event.

if getSource() derives from UBox, getView() returns the box's view where this event occured. null is returned otherwise.

§ getViewOf()

UView * UInputEvent::getViewOf ( const UBox box) const

returns the view of 'box' that (indirectly) received this event.

returns the view of 'box' that contains getView() if any (null otherwise)


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