ubit::UEvent Class Reference

Ubit Event class. More...

#include <uevent.hpp>

Inheritance diagram for ubit::UEvent:

ubit::UInputEvent ubit::UMessageEvent ubit::UPaintEvent ubit::UKeyEvent ubit::UMouseEvent ubit::UWheelEvent List of all members.

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 UInputEventinputEvent ()
virtual UMouseEventmouseEvent ()
virtual UKeyEventkeyEvent ()
virtual UWheelEventwheelEvent ()
virtual UPaintEventpaintEvent ()
virtual UMessageEventmessageEvent ()
 dynamic cast.
const UCondgetCond () const
 returns the event condition that detected this event.
UGroupgetSource () const
 returns the object that received this event.
UViewgetView () const
 returns the object's view that received this event (or null).
UViewgetParentView () const
 returns the parent view (if any, null for windows).
UBrickgetTarget () const
 returns an object that is related to this event (or null).
UWingetWin () const
 returns the window that received this event.
UViewgetWinView () const
 returns the window's view that received this event.
UEventFlowgetFlow () 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).
UDispgetDisp () const
 returns the display that received this event.
UNatDispgetNatDisp () 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 UFlagdefgetFlagdef (const UFlag &) const
 [advanced] returns the flagdef associated to this flag (if any); see: UFlag.
const UPropdefgetPropdef (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

Detailed Description

Ubit Event class.


Constructor & Destructor Documentation

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.


Member Function Documentation

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

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().

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)).

See also:
UAppli and UAppli::getFlow().

int ubit::UEvent::getFlowID (  )  const

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

See also:
: getFlow() and UEventFlow::getID() note: returns 0 for the native Event Flow on the Default Display.

UBrick * ubit::UEvent::getTarget (  )  const

returns an object that is related to this event (or null).

the returned object depends on the event condition (

See also:
getCond()). Examples: for UOn::change/add/remove returns the object that was modified, selected, added, removed...

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


The documentation for this class was generated from the following files:
Generated on Mon Jan 29 00:20:49 2007 for Ubit by  doxygen 1.4.7