56 std::shared_ptr<View>
target() {
return _target; }
83 bool _default_prevented =
false;
84 bool _propagation_stopped =
false;
87 std::shared_ptr<View> _target;
88 std::shared_ptr<View> _current_target;
89 long long _timestamp = 0;
Base class for events being dispatched through the view hiarchy.
Definition UI/Events/event.h:48
friend class View
Definition UI/Events/event.h:91
bool default_prevented() const
Flag if the event default action should be executed after dispatch.
Definition UI/Events/event.h:62
long long timestamp() const
Timestamp for event in milliseconds since 1970.
Definition UI/Events/event.h:77
friend class ViewImpl
Definition UI/Events/event.h:92
void stop_propagation()
Stops event from propagating further.
Definition UI/Events/event.h:74
std::shared_ptr< View > current_target()
View the event is currently being dispatched to.
Definition UI/Events/event.h:59
virtual ~EventUI()
Definition UI/Events/event.h:50
EventUIPhase phase() const
Current active event phase during dispatch.
Definition UI/Events/event.h:53
void set_timestamp(long long ts)
Set event timestamp.
Definition UI/Events/event.h:80
bool propagation_stopped() const
Flag if event propagation should stop.
Definition UI/Events/event.h:71
friend class ViewTree
Definition UI/Events/event.h:93
std::shared_ptr< View > target()
The target view the event is fired for.
Definition UI/Events/event.h:56
void prevent_default()
Prevent default action from being executed after dispatch.
Definition UI/Events/event.h:65
View for an area of the user interface.
Definition view.h:66
@ none
Definition graphic_context.h:119
EventUIPhase
UI event dispatch phase.
Definition UI/Events/event.h:39
@ none
Definition UI/Events/event.h:40
@ at_target
Capture phase (inverse bubble from root to the target view)
Definition UI/Events/event.h:42
@ capturing
Event is not currently in any dispatch phase.
Definition UI/Events/event.h:41
@ bubbling
Currently being dispatched to the target view.
Definition UI/Events/event.h:43