19 #include <ubit/ucond.hpp> 98 mpress, mrelease, mdrag,
mmove,
157 &dragStart, &dragDone, &dropEnter, &dropLeave, &
dropDone,
230 propChange, dataChange, strChange,
249 CONTAINER_CB = 1<<13,
251 CHILD_CHANGE_CB = 1<<15,
252 VIEW_PAINT_CB = 1<<16,
253 VIEW_CHANGE_CB = 1<<17,
254 SHOW_HIDE_CB = 1<<18,
256 MOUSE_CROSS_CB = 1<<20,
257 MOUSE_DRAG_CB = 1<<21,
258 MOUSE_MOVE_CB = 1<<22,
262 WIN_STATE_CB = 1<<27,
264 USER_EVENT_CB = 1<<29,
266 CALLBACKS =
DESTRUCT_CB | CONTAINER_CB | CHANGE_CB | CHILD_CHANGE_CB
267 | VIEW_PAINT_CB | VIEW_CHANGE_CB | SHOW_HIDE_CB
268 | MOUSE_CB | MOUSE_CROSS_CB | MOUSE_DRAG_CB | MOUSE_MOVE_CB | KEY_CB | DND_CB
269 | MESSAGE_CB | WIN_STATE_CB | SYSWM_CB
279 DISABLED, ENTERED, ARMED, ACTIONED, DRAGGED, DROP_ENTERED,
285 UOn(
int id,
long callback_mask,
int istate = -1);
295 virtual int getID()
const {
return ID;}
298 virtual bool operator==(
const UCond&)
const;
299 virtual bool operator!=(
const UCond&)
const;
300 virtual const UCond* matches(
const UCond&)
const;
303 virtual UOn* toOn() {
return this;}
304 virtual const UOn* toOn()
const {
return this;}
310 virtual void setParentModes(
UElem& parent)
const;
319 UOn2(
int id,
long callback_mask,
int state, SetModeFunc);
322 virtual void setParentModes(UElem& parent)
const;
323 SetModeFunc set_mode_func;
static UOn krelease
fire callbacks when a key is pressed or released.
Definition: uon.hpp:41
static UOn ktype
fire callbacks when a text is entered by pressing a key.
Definition: uon.hpp:41
static UOn paint
detect that a widget was repainted.
Definition: uon.hpp:41
static UOn removeChild
fire callbacks when a child is added to / removed from an object.
Definition: uon.hpp:41
static UOn winState
fires callbacks when a window state is changed.
Definition: uon.hpp:41
virtual int getID() const
< creates a callback condition.
Definition: uon.hpp:295
Base class for Ubit conditions.
Definition: ucond.hpp:29
static UOn destruct
detects when an object is being destructed.
Definition: uon.hpp:41
static UOn action
detects that a high-level "action" was performed on a widget.
Definition: uon.hpp:41
static UOn change
fires callbacks when the value of an object is changed.
Definition: uon.hpp:41
static UOn close
fires callbacks when a window (or a menu) is closed by the window manager (
Definition: uon.hpp:41
static UOn & dropDone
detects drag and drop events occuring on a widget.
Definition: uon.hpp:41
static UOn doubleClick
detects that the mouse was clicked or double-clicked on a widget.
Definition: uon.hpp:41
lightweight general purpose container.
Definition: uelem.hpp:44
static UOn wheel
detects that the wheel was moved while the mouse was over a widget.
Definition: uon.hpp:41
static UOn hide
detect that a widget was shown or hidden.
Definition: uon.hpp:41
static UOn sysWM
fires callbacks when a platform-dependent window manager event is received.
Definition: uon.hpp:41
static UOn motion
detect that a widget was resized or moved.
Definition: uon.hpp:41
Callback conditions.
Definition: uon.hpp:35
static UOn userEvent
< child change conditions.
Definition: uon.hpp:41
Callback
Definition: uon.hpp:247
virtual bool verifies(const UUpdateContext &, const UElem &) const
Definition: uon.cpp:137
Definition: uupdatecontext.hpp:32
static UOn & deselect
detects that a widget was "selected" or "deselected".
Definition: uon.hpp:41
static UOn & disarm
detects that a widget was "armed" or "disarmed".
Definition: uon.hpp:41
Definition: uhardfont.hpp:31
callbacks this object is sensitive to
Definition: uon.hpp:248
static UOn idle
no event condition.
Definition: uon.hpp:41
static UOn mmove
detects that the mouse was pressed, released, dragged or moved.
Definition: uon.hpp:41
static UOn leave
detects that the mouse entered or left a widget.
Definition: uon.hpp:41