37 class ActivationChangeEvent;
38 class FocusChangeEvent;
44 class ViewAction :
public std::enable_shared_from_this<ViewAction>
54 T *
view()
const {
return dynamic_cast<T*
>(view<View>()); }
114 std::unique_ptr<ViewActionImpl> impl;
Window was activated or deactivated event.
Definition: activation_change_event.h:44
Base class for events being dispatched through the view hiarchy.
Definition: UI/Events/event.h:48
View focus changed event.
Definition: focus_change_event.h:44
Keyboard key event.
Definition: key_event.h:48
Pointer event.
Definition: pointer_event.h:68
Recognizes actions in a view and captures input for the duration of the action.
Definition: view_action.h:45
virtual void deactivated(ActivationChangeEvent &e)
Handler for when the application is deactivated.
Definition: view_action.h:96
virtual void activated(ActivationChangeEvent &e)
Handler for when the application is activated.
Definition: view_action.h:93
virtual void focus_gained(FocusChangeEvent &e)
Handler for focus gained events.
Definition: view_action.h:99
virtual void key_press(KeyEvent &e)
Handler for key press events.
Definition: view_action.h:105
friend class ViewActionImpl
Definition: view_action.h:118
virtual void any_event(EventUI *e)
Handler for any UI event.
Definition: view_action.h:69
virtual void pointer_double_click(PointerEvent &e)
Handler for pointer double click events.
Definition: view_action.h:75
void end_action()
Releases capture of events.
virtual void pointer_press(PointerEvent &e)
Handler for pointer press events.
Definition: view_action.h:72
virtual void pointer_leave(PointerEvent &e)
Handler for pointer leave events.
Definition: view_action.h:87
virtual void focus_lost(FocusChangeEvent &e)
Handler for focus lost events.
Definition: view_action.h:102
void remove_from_view()
Removes recognizer from the view it is attached to.
virtual void pointer_proximity_change(PointerEvent &e)
Handler for pointer proximity change events.
Definition: view_action.h:90
View * view() const
Returns the view the action is attached to.
T * view() const
Definition: view_action.h:54
virtual void key_release(KeyEvent &e)
Handler for key release events.
Definition: view_action.h:108
virtual void pointer_release(PointerEvent &e)
Handler for pointer release events.
Definition: view_action.h:78
virtual void pointer_move(PointerEvent &e)
Handler for pointer movement events.
Definition: view_action.h:81
bool action_active() const
Returns true if the action is capturing events.
virtual void pointer_enter(PointerEvent &e)
Handler for pointer enter events.
Definition: view_action.h:84
void begin_action()
Captures events until end is called.
Base class for managing a tree of views.
Definition: view_tree.h:42
View for an area of the user interface.
Definition: view.h:66