#include <uevent.hpp>
Public Types | |
enum | ID { rawEvent = 0, mpress = 1<<0, mrelease = 1<<1, mmove = 1<<2, mdrag = 1<<3, kpress = 1<<4, krelease = 1<<5, enter = 1<<6, leave = 1<<7, change = 1<<8, select = 1<<9, unselect = 1<<10, action = 1<<11, add = 1<<15, remove = 1<<16, close = 1<<17, destruct = 1<<18, viewPaint = 1<<20, viewResize = 1<<21, viewMove = 1<<22, search = 1<<23, umessage = 1<<26, notifyEvent = 1<<27 } |
standard Event IDs (correspond to UOn conditions: see class UOn for details). | |
Public Member Functions | |
int | getID () const |
returns the event id (see: UEvent::ID). | |
const class UCond * | getCond () const |
returns the xxx condition of the: UOn::xxx / ucall( ) | |
UView * | getView () const |
returns the source VIEW that received this event | |
UGroup * | getSource () const |
UBox * | getBoxSource () const |
returns the object that produced this event | |
UGroup * | getTarget () const |
UBox * | getBoxTarget () const |
UBrick * | getBrickTarget () const |
returns the object that was modified by this event (when available) | |
UAppli * | getAppli () const |
returns the Application Context. | |
UDisp * | getDisp () const |
int | getDispID () const |
returns the Display or Display ID where this event was produced | |
UFlow * | getFlow () const |
int | getFlowID () const |
returns the Event Flow that produced this event | |
u_time | getTime () const |
returns the time when this event was produced (when available). | |
u_pos | getX () const |
u_pos | getY () const |
(mouse events) return the location of the mouse in the Source VIEW | |
u_pos | getXscreen () const |
u_pos | getYscreen () const |
(mouse events) return the location of the mouse on the SCREEN. | |
u_pos | getXwin () const |
u_pos | getYwin () const |
(mouse events) return the location of the mouse in the WINDOW that caught this event | |
int | getClickCount () const |
(mouse events) returns the number of mouse clicks. | |
u_id | getButtons () const |
(mouse events) returns the button(s) that are being pressed | |
u_id | getMods () const |
(mouse & keyboard events) returns the key modifiers that are being pressed | |
int | getKeyChar () const |
(key events) returns the typed character (in ASCII encoding). | |
void | setKeyChar (int) |
(key events) changes the typed character (in ASCII encoding). | |
u_id | getKeySym () const |
(key events) returns the X KeySym | |
UProp * | getChangedProp () const |
UElem * | getChangedElem () const |
UStr * | getChangedStr () const |
(UOn::change, propChange, elemChange, strChange callbacks) returns the object whose value was changed. | |
bool | getMessage (UStr &) const |
(UOn::umessage callbacks) returns the data sent through an Ubit message. | |
UElem * | getElem () |
returns the element that was under the mouse (null if none found). | |
UStr * | getStr () |
returns the UStr that was under the mouse (null if no str found) | |
UElem * | getElem (class UElemProps &) |
UStr * | getStr (class UElemProps &) |
variants of getElem() and getStr() that return useful information | |
UElem * | searchElem (class UElemProps &, const UElem *searched_elem, int strpos1=-1, int strpos2=-1) |
searches the element that is given as an argument | |
void | goThrough (UBox *) |
events will go through this object. | |
void | setMouse (u_pos x, u_pos y) |
changes mouse coordinates (x,y are in window coordinates). | |
void | addFlagdef (const class UFlagdef *) |
adds a Flag to the Event (for transparent tools, etc); see: UFlag. | |
const class UFlagdef * | getFlagdef (const class UFlag &) const |
const class UPropdef * | getPropdef (const class UFlag &) const |
const class UFlagdef ** | getFlagdefs () const |
u_count | getFlagdefCount () const |
UWin * | getHardWin () const |
UView * | getHardWinView () const |
[impl] returns the HARD Window that received this event. | |
USourceProps & | getSourceProps () |
[impl] gets the source properties. | |
UX_Event | getXEvent () const |
[impl] returns the X Event (NB: only valid at reception time). | |
UEvent (int event_id, class UFlow *, class UView *hardwin_view, UX_Event) | |
[impl] 'win_view' must be a valid UWin view or null. | |
Static Public Attributes | |
const u_id | MButton1 |
const u_id | MButton2 |
const u_id | MButton3 |
const u_id | MButton4 |
const u_id | MButton5 |
mouse button IDs for UEvent::getButtons() | |
const u_id | MShift |
const u_id | MLock |
const u_id | MControl |
const u_id | MOption |
const u_id | UbitEventFlow = UMSprotocol::UBIT_EVENT_FLOW |
state mask raised for non standard event flows |
|
returns the object that produced this event
|
|
returns the object that was modified by this event (when available) used for UOn::childSelect/childUnselect/add/remove/DND callbacks to indicate the object that was selected, unselected, added, removed, etc. |
|
(mouse events) returns the button(s) that are being pressed details:
|
|
returns the xxx condition of the: UOn::xxx / ucall( ) Note: as the same UEvent can be catched by several ucall() conditions this value should be checked immediately in the callback function as it can be changed at a later time |
|
returns the Display or Display ID where this event was produced the ID of the default Display is 0. |
|
returns the Event Flow that produced this event the ID of the default event flow (= the standard X event flow) is 0. |
|
(key events) returns the X KeySym Note: key modifiers (Shift, Alt..) are not taken into into account. |
|
(mouse & keyboard events) returns the key modifiers that are being pressed returns an ORed combination of these modifiers exple: if (e.getMods() & (UEvent::KShift | UEvent::KControl)) |
|
variants of getElem() and getStr() that return useful information argument UElemProps (see this class) is filled with useful data such as the elem location, its graphical properties, etc. Note on getStr() : the region returned in UElemProps does not contain the entire string but just the line that is beneath the mouse (in case of UFlowView rendering) |
|
returns the UStr that was under the mouse (null if no str found) Note: same function as getElem() but discards elements that are not strings. |
|
returns the source VIEW that received this event Note: a box can control several Views. |
|
(mouse events) return the location of the mouse in the Source VIEW returns -1 if source view wasn't found (= when getView() returns null) |
|
(mouse events) return the location of the mouse in the WINDOW that caught this event this location is relative to the window returned by getHardWin()) |
|
searches the element that is given as an argument returns useful information about this element in UElemProps notes:
|
|
Initial value:
|
|
mouse button IDs for UEvent::getButtons() note: same values as X defs: Button1Mask etc. |
|
Initial value:
|
|
state mask raised for non standard event flows note: same values as X defs: ShiftMask etc. one of the possible ORed values of getState(). if true, getFlow() will return an non standard event flow. |