#include <uevent.hpp>
Inheritance diagram for ubit::UEvent:
Public Types | |
ShiftButton = 1<<0 | |
ControlButton = 1<<2 | |
LeftButton = 1<<8 | |
MidButton = 1<<9 | |
RightButton = 1<<10 | |
MButton1 = LeftButton | |
MButton2 = MidButton | |
MButton3 = RightButton | |
enum | { ShiftButton = 1<<0, ControlButton = 1<<2 } |
enum | { LeftButton = 1<<8, MidButton = 1<<9, RightButton = 1<<10 } |
enum | { MButton1 = LeftButton, MButton2 = MidButton, MButton3 = RightButton } |
Public Member Functions | |
virtual UInputEvent * | inputEvent () |
virtual UMouseEvent * | mouseEvent () |
virtual UKeyEvent * | keyEvent () |
virtual UWheelEvent * | wheelEvent () |
virtual UPaintEvent * | paintEvent () |
virtual UMessageEvent * | messageEvent () |
dynamic cast. | |
const UCond & | getCond () const |
returns the event condition that detected this event. | |
UGroup * | getSource () const |
returns the object that received this event. | |
UView * | getView () const |
returns the object's view that received this event (or null). | |
UView * | getParentView () const |
returns the parent view (if any, null for windows). | |
UBrick * | getTarget () const |
returns an object that is related to this event (or null). | |
UWin * | getWin () const |
returns the window that received this event. | |
UView * | getWinView () const |
returns the window's view that received this event. | |
UEventFlow * | getFlow () const |
returns the Event Flow that received this event (for two-handed interaction or groupware). | |
int | getFlowID () const |
returns the global ID of the Event Flow that received this event (for two-handed interaction or groupware). | |
UDisp * | getDisp () const |
returns the display that received this event. | |
UNatDisp * | getNatDisp () const |
[impl] returns the native display that received this event. | |
USysEvent | getSysEvent () const |
[impl] returns the corresponding native system Event (may be null). | |
UTime | getWhen () const |
returns the time when this event was produced (may be unavailable). | |
bool | isConsumed () const |
void | consume () |
[advanced] consume events. | |
bool | isIgnored () const |
void | ignore () |
[advanced] ignore events in UOn::filterEvent callbacks. | |
void | addFlagdef (const UFlagdef *) |
[advanced] adds a Flag to the Event (for transparent tools, etc); see: UFlag. | |
const UFlagdef * | getFlagdef (const UFlag &) const |
[advanced] returns the flagdef associated to this flag (if any); see: UFlag. | |
const UPropdef * | getPropdef (const UFlag &) const |
[advanced] returns the flagprop associated to this flag (if any); see: UFlag. | |
UEvent (UEventFlow *=null, UView *hardwin_view=null, USysEvent=null, UTime=0, const UCond *=null) | |
creates a UEvent produced by a system event. | |
UEvent (UBrick *source) | |
creates a UEvent from that is not a system event. | |
Friends | |
class | UEventFlow |
class | UControl |
class | UGroup |
class | UView |
ubit::UEvent::UEvent | ( | UEventFlow * | = null , |
|
UView * | hardwin_view = null , |
|||
USysEvent | = null , |
|||
UTime | = 0 , |
|||
const UCond * | = null | |||
) |
creates a UEvent produced by a system event.
'hardwin_view' must be a valid hard window view or null.
void ubit::UEvent::consume | ( | ) |
[advanced] consume events.
if consume() is called in a callback, the event is consumed and no other callback function is called for this event. consume() is especially useful in UOn::filterEvent callbacks.
const UCond& ubit::UEvent::getCond | ( | ) | const |
returns the event condition that detected this event.
e.g.: returns 'UOnchange' if the expression was: UOn::change / ucall(...)
UDisp * ubit::UEvent::getDisp | ( | ) | const |
UEventFlow* ubit::UEvent::getFlow | ( | ) | const |
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)).
int ubit::UEvent::getFlowID | ( | ) | const |
returns the global ID of the Event Flow that received this event (for two-handed interaction or groupware).
UBrick * ubit::UEvent::getTarget | ( | ) | const |
returns an object that is related to this event (or null).
the returned object depends on the event condition (
UView* ubit::UEvent::getView | ( | ) | const |
returns the object's view that received this event (or null).
if getSource() derives from UBox, getView() returns the box's view where this event occured. null is returned otherwise.
void ubit::UEvent::ignore | ( | ) |
[advanced] ignore events in UOn::filterEvent callbacks.
if ignore() is called in a UOn::filterEvent callback, the widget that invoked this callback is ignored. The event is then given to the widget parent