Castor3D 0.16.0
Multiplatform 3D engine
|
Description of an event handler, class that can receive event. More...
#include <EventHandler.hpp>
Public Member Functions | |
NonClientEventHandler (castor::String const &name, bool catchMouseEvents) | |
Constructor. | |
void | connectNC (MouseEventType event, NonClientMouseFunction function) |
Connects a function to a non client mouse event. | |
void | connectNC (KeyboardEventType event, NonClientKeyboardFunction function) |
Connects a function to a non client keyboard event. | |
void | connectNC (HandlerEventType event, NonClientHandlerFunction function) |
Connects a function to a non client handler event. | |
Public Member Functions inherited from castor3d::EventHandler | |
void | pushEvent (MouseEvent const &event) |
Adds a mouse event to the events queue. | |
void | connect (MouseEventType event, ClientMouseFunction function) |
Connects a function to a mouse event. | |
bool | catchesMouseEvents () const |
Tells if the control catches mouse events. | |
void | setCatchesMouseEvents (bool value) |
Sets if the control can catch mouse events. | |
void | pushEvent (KeyboardEvent const &event) |
Adds a keyboard event to the events queue. | |
void | connect (KeyboardEventType event, ClientKeyboardFunction function) |
Connects a function to a keyboard event. | |
bool | catchesTabKey () const |
Tells if the control catches 'tab' key. | |
bool | catchesReturnKey () const |
Tells if the control catches 'return' key. | |
EventHandler (castor::String const &name, bool catchMouseEvents) | |
Constructor. | |
virtual | ~EventHandler () noexcept |
Destructor. | |
void | processEvents () |
Processes all queued events. | |
bool | isEnabled () const |
void | enable () |
Sets if the control is enabled. | |
void | disable () |
Sets if the control is disabled. | |
void | pushEvent (HandlerEvent const &event) |
Adds a handler event to the events queue. | |
void | connect (HandlerEventType event, ClientHandlerFunction function) |
Connects a function to a handler event. | |
Public Member Functions inherited from castor::NamedBaseT< T > | |
NamedBaseT (T name) noexcept | |
Constructor. | |
T const & | getName () const noexcept |
Retrieves the name. | |
void | rename (T name) noexcept |
Protected Types | |
using | EventHandlerFunction = EventHandler::EventHandlerFunction |
using | EventQueue = EventHandler::EventQueue |
Protected Types inherited from castor3d::EventHandler | |
using | EventHandlerFunction = castor::Function< void() > |
using | EventQueue = castor::Deque< castor::Pair< UserInputEventSPtr, EventHandlerFunction > > |
Additional Inherited Members | |
Public Attributes inherited from castor3d::EventHandler | |
OnEnable | onEnable |
Protected Member Functions inherited from castor3d::EventHandler | |
void | processMouseEvent (MouseEventSPtr event) |
Mouse event processing function. | |
void | processKeyboardEvent (KeyboardEventSPtr event) |
Keyboard event processing function. | |
void | processHandlerEvent (HandlerEventSPtr event) |
Handler event processing function. | |
Description of an event handler, class that can receive event.
using castor3d::NonClientEventHandler< Derived >::ClientHandlerFunction = EventHandler::ClientHandlerFunction |
using castor3d::NonClientEventHandler< Derived >::ClientKeyboardFunction = EventHandler::ClientKeyboardFunction |
using castor3d::NonClientEventHandler< Derived >::ClientMouseFunction = EventHandler::ClientMouseFunction |
using castor3d::NonClientEventHandler< Derived >::DerivedPtr = Derived * |
|
protected |
|
protected |
using castor3d::NonClientEventHandler< Derived >::NonClientHandlerFunction = castor::Function< void( DerivedPtr, HandlerEvent const & ) > |
Catcher definition for non client handler events.
using castor3d::NonClientEventHandler< Derived >::NonClientKeyboardFunction = castor::Function< void( DerivedPtr, KeyboardEvent const & ) > |
Catcher definition for non client keyboard events.
using castor3d::NonClientEventHandler< Derived >::NonClientMouseFunction = castor::Function< void( DerivedPtr, MouseEvent const & ) > |
Catcher definition for non client mouse events.
using castor3d::NonClientEventHandler< Derived >::OnNonClientHandlerEvent = castor::SignalT< NonClientHandlerFunction > |
Non client handler event signal definition.
using castor3d::NonClientEventHandler< Derived >::OnNonClientHandlerEventConnection = typename OnNonClientHandlerEvent::connection |
Non client handler event signal connection definition.
using castor3d::NonClientEventHandler< Derived >::OnNonClientKeyboardEvent = castor::SignalT< NonClientKeyboardFunction > |
Non client keyboard event signal definition.
using castor3d::NonClientEventHandler< Derived >::OnNonClientKeyboardEventConnection = typename OnNonClientKeyboardEvent::connection |
Non client keyboard event signal connection definition.
using castor3d::NonClientEventHandler< Derived >::OnNonClientMouseEvent = castor::SignalT< NonClientMouseFunction > |
Non client mouse event signal definition.
using castor3d::NonClientEventHandler< Derived >::OnNonClientMouseEventConnection = typename OnNonClientMouseEvent::connection |
Non client mouse event signal connection definition.
|
inlineexplicit |
Constructor.
[in] | name | The handler name. |
[in] | catchMouseEvents | Defines if the event handler catches mouse event. |
|
inline |
Connects a function to a non client handler event.
[in] | event | The event type. |
[in] | function | The function. |
References castor3d::EventHandler::connect(), castor3d::NonClientEventHandler< Derived >::m_ncHandlerSlots, and castor3d::NonClientEventHandler< Derived >::m_ncHandlerSlotsConnections.
|
inline |
Connects a function to a non client keyboard event.
[in] | event | The event type. |
[in] | function | The function. |
References castor3d::EventHandler::connect(), castor3d::NonClientEventHandler< Derived >::m_ncKeyboardSlots, and castor3d::NonClientEventHandler< Derived >::m_ncKeyboardSlotsConnections.
|
inline |
Connects a function to a non client mouse event.
[in] | event | The event type. |
[in] | function | The function. |
References castor3d::EventHandler::connect(), castor3d::NonClientEventHandler< Derived >::m_ncMouseSlots, and castor3d::NonClientEventHandler< Derived >::m_ncMouseSlotsConnections.
|
protected |
The non client handler events slots.
Referenced by castor3d::NonClientEventHandler< Derived >::connectNC().
|
protected |
The non client handler events slots.
Referenced by castor3d::NonClientEventHandler< Derived >::connectNC().
|
protected |
The non client keyboard events slots.
Referenced by castor3d::NonClientEventHandler< Derived >::connectNC().
|
protected |
The non client keyboard events slots.
Referenced by castor3d::NonClientEventHandler< Derived >::connectNC().
|
protected |
The non client mouse events slots.
Referenced by castor3d::NonClientEventHandler< Derived >::connectNC().
|
protected |
The non client mouse events slots.
Referenced by castor3d::NonClientEventHandler< Derived >::connectNC().