19 #include <ubit/ubox.hpp> 20 #include <ubit/ugeom.hpp> 21 #include <ubit/ukey.hpp> 50 virtual UKeyEvent* toKeyEvent() {
return null;}
52 virtual UViewEvent* toViewEvent() {
return null;}
56 virtual UWinEvent* toWinEvent() {
return null;}
59 virtual UUserEvent* toUserEvent() {
return null;}
61 void setCond(
const UCond&);
78 unsigned long when,
int state);
96 unsigned long getWhen()
const {
return when;}
99 virtual int getModifiers()
const;
113 bool isShiftDown()
const;
114 bool isControlDown()
const;
115 bool isMetaDown()
const;
116 bool isAltDown()
const;
117 bool isAltGraphDown()
const;
119 UWin* getWin()
const;
122 UView* getWinView()
const;
132 UDisp* getDisp()
const;
152 unsigned PROPAGATE:1;
154 unsigned IS_FIRST_MDRAG:1;
155 unsigned IS_BROWSING:1;
156 unsigned DONT_CLOSE_MENU:1;
157 unsigned SOURCE_IN_MENU:1;
164 UElem* event_observer;
179 float getX()
const {
return pos.x;}
182 float getY()
const {
return pos.y;}
194 UPoint getPosIn(
const UBox& parent_box)
const;
234 int getButtons()
const;
241 void translatePos(
float x,
float y);
247 void setFirstDrag(
bool s) {modes.IS_FIRST_MDRAG = s;}
248 bool isFirstDrag()
const {
return modes.IS_FIRST_MDRAG;}
249 bool isBrowsing()
const {
return modes.IS_BROWSING;}
277 int button, click_count;
288 enum {WHEEL_DELTA = 120};
291 unsigned long time,
int state,
293 int wheel_btn,
int wheel_delta);
297 bool isVertical()
const {
return (button & 1) == 0;}
319 unsigned long time,
int state,
320 int keycode,
short keychar);
322 virtual UKeyEvent* toKeyEvent() {
return this;}
330 virtual void setKeyChar(
short keychar);
335 virtual void setKeyCode(
int keycode);
350 virtual UViewEvent* toViewEvent() {
return this;}
358 UDisp* getDisp()
const;
386 void getClip(
URect& r)
const;
396 virtual bool setSourceAndProps(
UView*);
430 virtual UWinEvent* toWinEvent() {
return this;}
432 UView* getView()
const {
return source_view;}
433 int getType()
const {
return type;}
434 int getState()
const {
return state;}
450 UView* getView()
const {
return source_view;}
451 void* getSysEvent() {
return sys_event;}
470 const UStr* getMessage()
const;
493 unsigned long getWhen()
const {
return when;}
508 virtual UUserEvent* toUserEvent() {
return this;}
511 int getType()
const {
return type;}
512 void* getData()
const {
return data;}
529 URect getBounds()
const;
549 long strpos, strpos2;
561 const URect&,
int _strpos,
bool exact_match);
563 const URect&,
bool exact_match);
information on UData objects that are being retrieved by UEvent::getData() or UEvent::getStr().
Definition: uevent.hpp:524
keyboard events
Definition: uevent.hpp:316
Definition: uviewImpl.hpp:92
float getX() const
returns the X coordinate of the mouse in getView().
Definition: uevent.hpp:179
float getY() const
returns the Y coordinate of the mouse in getView().
Definition: uevent.hpp:182
text selection.
Definition: uselection.hpp:25
a UTimer object fires callbacks after a given delay.
Definition: utimer.hpp:45
UMessagePort * getMessagePort() const
returns the corresponding messagge port.
Definition: uevent.hpp:473
Box container.
Definition: ubox.hpp:64
2D Point.
Definition: ugeom.hpp:25
bool isClipSet()
true if the clipping zone is vaild.
Definition: uevent.hpp:383
const UPoint & getScreenPos() const
returns the screen coordinates of the mouse.
Definition: uevent.hpp:188
int getWheelDelta() const
returns the amount of wheel movement.
Definition: uevent.hpp:299
Ubit Event class.
Definition: uevent.hpp:30
class for drawing on widgets.
Definition: ugraph.hpp:44
2D Rectangle.
Definition: ugeom.hpp:165
Display Context.
Definition: udisp.hpp:44
int getClickCount() const
returns the number of mouse clicks.
Definition: uevent.hpp:204
Base class for Ubit conditions.
Definition: ucond.hpp:29
short getKeyChar() const
returns the typed character (in ISO Latin).
Definition: uevent.hpp:324
UView * getView() const
returns the view of getSource() that received this event.
Definition: uevent.hpp:355
Text editing and caret controller.
Definition: uedit.hpp:30
Impl.
Definition: umessage.hpp:50
Base class for Viewable Objects.
Definition: udata.hpp:31
Paint event.
Definition: uevent.hpp:377
int getButton() const
returns the button that was just pressed or released.
Definition: uevent.hpp:207
const UPoint & getPos() const
returns the coordinates of the mouse in getView().
Definition: uevent.hpp:185
const URect getClip() const
shortcut for getClip(URect& r).
Definition: uevent.hpp:392
lightweight general purpose container.
Definition: uelem.hpp:44
view event: base class for UPaintEvent and UResizeEvent.
Definition: uevent.hpp:347
int getKeyCode() const
returns the key code (
Definition: uevent.hpp:327
Definition: uevent.hpp:426
wheel events
Definition: uevent.hpp:286
Definition: uview.hpp:335
Modifier masks.
Definition: ukey.hpp:27
Event Flow.
Definition: ueventflow.hpp:34
Platform-dependent window manager events.
Definition: uevent.hpp:444
Box View.
Definition: uview.hpp:65
User events.
Definition: uevent.hpp:504
Definition: uupdatecontext.hpp:32
Ubit Message Port.
Definition: umessage.hpp:36
Definition: uhardfont.hpp:31
const UCond & getCond() const
returns the event condition that detected this event.
Definition: uevent.hpp:36
void propagate()
propagates events in children:
Definition: uevent.hpp:244
Base class for windows and menus.
Definition: uwin.hpp:47
timer event.
Definition: uevent.hpp:485
Definition: uviewImpl.hpp:78
virtual UObject * getSource() const
returns the object that received this event.
Definition: uevent.hpp:41
Resize event.
Definition: uevent.hpp:418
virtual UObject * getAux() const
returns auxilliary data.
Definition: uevent.hpp:44
Ubit String.
Definition: ustr.hpp:72
mouse events
Definition: uevent.hpp:172
virtual UInputEvent * toInputEvent()
dynamic cast: returns 'this' converted to the requested class or null.
Definition: uevent.hpp:48
Ubit Message events.
Definition: uevent.hpp:462
Base class of most Ubit objects (SEE DETAILS!).
Definition: uobject.hpp:113