Castor3D 0.12.0
Multiplatform 3D engine
Public Types | Public Member Functions | Protected Types | Protected Attributes | List of all members
castor3d::NonClientEventHandler< Derived > Class Template Reference

Description of an event handler, class that can receive event. More...

#include <EventHandler.hpp>

Inheritance diagram for castor3d::NonClientEventHandler< Derived >:
Inheritance graph
[legend]
Collaboration diagram for castor3d::NonClientEventHandler< Derived >:
Collaboration graph
[legend]

Public Types

using ClientMouseFunction = EventHandler::ClientMouseFunction
 
using ClientKeyboardFunction = EventHandler::ClientKeyboardFunction
 
using ClientHandlerFunction = EventHandler::ClientHandlerFunction
 
using NonClientMouseFunction = std::function< void(DerivedSPtr, MouseEvent const &) >
 
using NonClientKeyboardFunction = std::function< void(DerivedSPtr, KeyboardEvent const &) >
 
using NonClientHandlerFunction = std::function< void(DerivedSPtr, HandlerEvent const &) >
 
using OnNonClientMouseEvent = castor::SignalT< NonClientMouseFunction >
 
using OnNonClientKeyboardEvent = castor::SignalT< NonClientKeyboardFunction >
 
using OnNonClientHandlerEvent = castor::SignalT< NonClientHandlerFunction >
 
using OnNonClientMouseEventConnection = typename OnNonClientMouseEvent::connection
 
using OnNonClientKeyboardEventConnection = typename OnNonClientKeyboardEvent::connection
 
using OnNonClientHandlerEventConnection = typename OnNonClientHandlerEvent::connection
 
- Public Types inherited from castor3d::EventHandler
using ClientMouseFunction = std::function< void(MouseEvent const &) >
 
using ClientKeyboardFunction = std::function< void(KeyboardEvent const &) >
 
using ClientHandlerFunction = std::function< void(HandlerEvent const &) >
 
using OnClientMouseEvent = castor::SignalT< ClientMouseFunction >
 
using OnClientKeyboardEvent = castor::SignalT< ClientKeyboardFunction >
 
using OnClientHandlerEvent = castor::SignalT< ClientHandlerFunction >
 
using OnClientMouseEventConnection = OnClientMouseEvent::connection
 
using OnClientKeyboardEventConnection = OnClientKeyboardEvent::connection
 
using OnClientHandlerEventConnection = OnClientHandlerEvent::connection
 

Public Member Functions

 CU_DeclareSmartPtr (Derived)
 
 NonClientEventHandler (bool catchMouseEvents)
 
void connectNC (MouseEventType event, NonClientMouseFunction function)
 
void connectNC (KeyboardEventType event, NonClientKeyboardFunction function)
 
void connectNC (HandlerEventType event, NonClientHandlerFunction function)
 
- Public Member Functions inherited from castor3d::EventHandler
 EventHandler (bool catchMouseEvents)
 
virtual ~EventHandler ()
 
void processEvents ()
 
void pushEvent (MouseEvent const &event)
 
void connect (MouseEventType event, ClientMouseFunction function)
 
void pushEvent (KeyboardEvent const &event)
 
void connect (KeyboardEventType event, ClientKeyboardFunction function)
 
bool catchesMouseEvents () const
 
void setCatchesMouseEvents (bool value)
 
void pushEvent (HandlerEvent const &event)
 
void connect (HandlerEventType event, ClientHandlerFunction function)
 
bool catchesTabKey () const
 
bool catchesReturnKey () const
 

Protected Types

using EventHandlerFunction = EventHandler::EventHandlerFunction
 
using EventQueue = EventHandler::EventQueue
 
- Protected Types inherited from castor3d::EventHandler
using EventHandlerFunction = std::function< void() >
 
using EventQueue = std::deque< std::pair< UserInputEventSPtr, EventHandlerFunction > >
 

Protected Attributes

std::array< OnNonClientMouseEvent, size_t(MouseEventType::eCount) > m_ncMouseSlots
 
std::array< std::vector< OnNonClientMouseEventConnection >, size_t(MouseEventType::eCount) > m_ncMouseSlotsConnections
 
std::array< OnNonClientKeyboardEvent, size_t(KeyboardEventType::eCount) > m_ncKeyboardSlots
 
std::array< std::vector< OnNonClientKeyboardEventConnection >, size_t(KeyboardEventType::eCount) > m_ncKeyboardSlotsConnections
 
std::array< OnNonClientHandlerEvent, size_t(HandlerEventType::eCount) > m_ncHandlerSlots
 
std::array< std::vector< OnNonClientHandlerEventConnection >, size_t(HandlerEventType::eCount) > m_ncHandlerSlotsConnections
 
- Protected Attributes inherited from castor3d::EventHandler
std::array< OnClientMouseEvent, size_t(MouseEventType::eCount) > m_mouseSlots
 
std::array< std::vector< OnClientMouseEventConnection >, size_t(MouseEventType::eCount) > m_mouseSlotsConnections
 
std::array< OnClientKeyboardEvent, size_t(KeyboardEventType::eCount) > m_keyboardSlots
 
std::array< std::vector< OnClientKeyboardEventConnection >, size_t(KeyboardEventType::eCount) > m_keyboardSlotsConnections
 
std::array< OnClientHandlerEvent, size_t(HandlerEventType::eCount) > m_handlerSlots
 
std::array< std::vector< OnClientHandlerEventConnection >, size_t(HandlerEventType::eCount) > m_handlerSlotsConnections
 

Additional Inherited Members

- Protected Member Functions inherited from castor3d::EventHandler
void processMouseEvent (MouseEventSPtr event)
 
void processKeyboardEvent (KeyboardEventSPtr event)
 
void processHandlerEvent (HandlerEventSPtr event)
 

Detailed Description

template<class Derived>
class castor3d::NonClientEventHandler< Derived >

Description of an event handler, class that can receive event.

Author
Sylvain DOREMUS
Date
17/04/2016
Version
0.9.0

Member Typedef Documentation

◆ ClientHandlerFunction

template<class Derived >
using castor3d::NonClientEventHandler< Derived >::ClientHandlerFunction = EventHandler::ClientHandlerFunction

◆ ClientKeyboardFunction

template<class Derived >
using castor3d::NonClientEventHandler< Derived >::ClientKeyboardFunction = EventHandler::ClientKeyboardFunction

◆ ClientMouseFunction

template<class Derived >
using castor3d::NonClientEventHandler< Derived >::ClientMouseFunction = EventHandler::ClientMouseFunction

◆ EventHandlerFunction

template<class Derived >
using castor3d::NonClientEventHandler< Derived >::EventHandlerFunction = EventHandler::EventHandlerFunction
protected

◆ EventQueue

template<class Derived >
using castor3d::NonClientEventHandler< Derived >::EventQueue = EventHandler::EventQueue
protected

◆ NonClientHandlerFunction

template<class Derived >
using castor3d::NonClientEventHandler< Derived >::NonClientHandlerFunction = std::function< void( DerivedSPtr, HandlerEvent const & ) >

Catcher definition for non client handler events.

◆ NonClientKeyboardFunction

template<class Derived >
using castor3d::NonClientEventHandler< Derived >::NonClientKeyboardFunction = std::function< void( DerivedSPtr, KeyboardEvent const & ) >

Catcher definition for non client keyboard events.

◆ NonClientMouseFunction

template<class Derived >
using castor3d::NonClientEventHandler< Derived >::NonClientMouseFunction = std::function< void( DerivedSPtr, MouseEvent const & ) >

Catcher definition for non client mouse events.

◆ OnNonClientHandlerEvent

template<class Derived >
using castor3d::NonClientEventHandler< Derived >::OnNonClientHandlerEvent = castor::SignalT< NonClientHandlerFunction >

Non client handler event signal definition.

◆ OnNonClientHandlerEventConnection

template<class Derived >
using castor3d::NonClientEventHandler< Derived >::OnNonClientHandlerEventConnection = typename OnNonClientHandlerEvent::connection

Non client handler event signal connection definition.

◆ OnNonClientKeyboardEvent

template<class Derived >
using castor3d::NonClientEventHandler< Derived >::OnNonClientKeyboardEvent = castor::SignalT< NonClientKeyboardFunction >

Non client keyboard event signal definition.

◆ OnNonClientKeyboardEventConnection

template<class Derived >
using castor3d::NonClientEventHandler< Derived >::OnNonClientKeyboardEventConnection = typename OnNonClientKeyboardEvent::connection

Non client keyboard event signal connection definition.

◆ OnNonClientMouseEvent

template<class Derived >
using castor3d::NonClientEventHandler< Derived >::OnNonClientMouseEvent = castor::SignalT< NonClientMouseFunction >

Non client mouse event signal definition.

◆ OnNonClientMouseEventConnection

template<class Derived >
using castor3d::NonClientEventHandler< Derived >::OnNonClientMouseEventConnection = typename OnNonClientMouseEvent::connection

Non client mouse event signal connection definition.

Constructor & Destructor Documentation

◆ NonClientEventHandler()

template<class Derived >
castor3d::NonClientEventHandler< Derived >::NonClientEventHandler ( bool  catchMouseEvents)
inlineexplicit

Member Function Documentation

◆ connectNC() [1/3]

template<class Derived >
void castor3d::NonClientEventHandler< Derived >::connectNC ( HandlerEventType  event,
NonClientHandlerFunction  function 
)
inline

◆ connectNC() [2/3]

template<class Derived >
void castor3d::NonClientEventHandler< Derived >::connectNC ( KeyboardEventType  event,
NonClientKeyboardFunction  function 
)
inline

◆ connectNC() [3/3]

template<class Derived >
void castor3d::NonClientEventHandler< Derived >::connectNC ( MouseEventType  event,
NonClientMouseFunction  function 
)
inline

◆ CU_DeclareSmartPtr()

template<class Derived >
castor3d::NonClientEventHandler< Derived >::CU_DeclareSmartPtr ( Derived  )

Member Data Documentation

◆ m_ncHandlerSlots

template<class Derived >
std::array< OnNonClientHandlerEvent, size_t( HandlerEventType::eCount ) > castor3d::NonClientEventHandler< Derived >::m_ncHandlerSlots
protected

The non client handler events slots.

Referenced by castor3d::NonClientEventHandler< Derived >::connectNC().

◆ m_ncHandlerSlotsConnections

template<class Derived >
std::array< std::vector< OnNonClientHandlerEventConnection >, size_t( HandlerEventType::eCount ) > castor3d::NonClientEventHandler< Derived >::m_ncHandlerSlotsConnections
protected

The non client handler events slots.

Referenced by castor3d::NonClientEventHandler< Derived >::connectNC().

◆ m_ncKeyboardSlots

template<class Derived >
std::array< OnNonClientKeyboardEvent, size_t( KeyboardEventType::eCount ) > castor3d::NonClientEventHandler< Derived >::m_ncKeyboardSlots
protected

The non client keyboard events slots.

Referenced by castor3d::NonClientEventHandler< Derived >::connectNC().

◆ m_ncKeyboardSlotsConnections

template<class Derived >
std::array< std::vector< OnNonClientKeyboardEventConnection >, size_t( KeyboardEventType::eCount ) > castor3d::NonClientEventHandler< Derived >::m_ncKeyboardSlotsConnections
protected

The non client keyboard events slots.

Referenced by castor3d::NonClientEventHandler< Derived >::connectNC().

◆ m_ncMouseSlots

template<class Derived >
std::array< OnNonClientMouseEvent, size_t( MouseEventType::eCount ) > castor3d::NonClientEventHandler< Derived >::m_ncMouseSlots
protected

The non client mouse events slots.

Referenced by castor3d::NonClientEventHandler< Derived >::connectNC().

◆ m_ncMouseSlotsConnections

template<class Derived >
std::array< std::vector< OnNonClientMouseEventConnection >, size_t( MouseEventType::eCount ) > castor3d::NonClientEventHandler< Derived >::m_ncMouseSlotsConnections
protected

The non client mouse events slots.

Referenced by castor3d::NonClientEventHandler< Derived >::connectNC().


The documentation for this class was generated from the following file: