Castor3D 0.16.0
Multiplatform 3D engine
Public Member Functions | List of all members
castor3d::RenderWindow::InputListener Class Reference

#include <RenderWindow.hpp>

Inheritance diagram for castor3d::RenderWindow::InputListener:
Inheritance graph
[legend]
Collaboration diagram for castor3d::RenderWindow::InputListener:
Collaboration graph
[legend]

Public Member Functions

 InputListener (Engine &engine, RenderWindow &window)
 
- Public Member Functions inherited from castor3d::UserInputListener
 UserInputListener (UserInputListener const &)=delete
 
 UserInputListener (UserInputListener &&) noexcept=delete
 
UserInputListeneroperator= (UserInputListener const &)=delete
 
UserInputListeneroperator= (UserInputListener &&) noexcept=delete
 
C3D_API UserInputListener (Engine &engine, castor::String const &name)
 Constructor.
 
virtual C3D_API ~UserInputListener () noexcept=default
 Destructor.
 
C3D_API bool initialise ()
 Initialises the listener.
 
C3D_API void cleanup ()
 Cleans up the listener.
 
C3D_API void processEvents ()
 Processes all queued events.
 
castor::Position const & getMousePosition () const
 
EventHandlerRPtr getActiveControl () const
 
EventHandlerRPtr getFocusedControl () const
 
FrameListenergetFrameListener () const
 
C3D_API void registerMouseMoveAction (castor::String const &handler, OnMouseMoveActionFunction function)
 Registers a function to call when a mouse move event is raised by the given handler.
 
C3D_API void registerClickAction (castor::String const &handler, OnClickActionFunction function)
 Registers a function to call when a mouse click event is raised by the given handler.
 
C3D_API void registerSelectAction (castor::String const &handler, OnSelectActionFunction function)
 Registers a function to call when a select event is raised by the given handler.
 
C3D_API void registerTextAction (castor::String const &handler, OnTextActionFunction function)
 Registers a function to call when a text event is raised by the given handler.
 
C3D_API void registerExpandAction (castor::String const &handler, OnExpandActionFunction function)
 Registers a function to call when an expand event is raised by the given handler.
 
C3D_API void registerCursorAction (OnCursorActionFunction function)
 Registers a function to call when a mouse cursor event is raised by the given handler.
 
C3D_API void registerClipboardTextAction (OnClipboardTextActionFunction function)
 Registers a function to call when a clipboard event is raised by the given handler.
 
C3D_API void unregisterMouseMoveAction (castor::String const &handler)
 Unregisters ths function to call when a mouse move event is raised by the given handler.
 
C3D_API void unregisterClickAction (castor::String const &handler)
 Unregisters ths function to call when a mouse click event is raised by the given handler.
 
C3D_API void unregisterSelectAction (castor::String const &handler)
 Unregisters ths function to call when a select event is raised by the given handler.
 
C3D_API void unregisterTextAction (castor::String const &handler)
 Unregisters ths function to call when a text event is raised by the given handler.
 
C3D_API void unregisterExpandAction (castor::String const &handler)
 Unregisters ths function to call when an expand event is raised by the given handler.
 
C3D_API void unregisterCursorAction ()
 Unregisters the function to call when mouse cursor event is raised by the given handler.
 
C3D_API void unregisterClipboardTextAction ()
 Unregisters the function to call when a clipboard event is raised by the given handler.
 
C3D_API void onMouseMoveAction (castor::String const &handler) const
 Event raised by the handler when the mouse is moved over it.
 
C3D_API void onClickAction (castor::String const &handler) const
 Event raised by the handler when it is clicked, if it supports clicking.
 
C3D_API void onSelectAction (castor::String const &handler, int index) const
 Event raised by the handler when one of its sub elements is selected.
 
C3D_API void onTextAction (castor::String const &handler, castor::U32String const &text) const
 Event raised by the handler when its caption has changed.
 
C3D_API void onExpandAction (castor::String const &handler, bool expand) const
 Event raised by the handler when its expansion has changed.
 
C3D_API void onCursorAction (MouseCursor cursor) const
 Event raised when mouse cursor has changed.
 
C3D_API castor::U32String onClipboardTextAction (bool set, castor::U32String text) const
 Event raised interaction with the clipboard is needed.
 
C3D_API void enableHandler (castor::String const &handler)
 Enables handler.
 
C3D_API void disableHandler (castor::String const &handler)
 Disables handler.
 
C3D_API bool fireMouseMove (castor::Position const &position, bool ctrl, bool alt, bool shift)
 Fires a mouse move event.
 
C3D_API bool fireMouseButtonPushed (MouseButton button, bool ctrl, bool alt, bool shift)
 Fires a mouse pushed event.
 
C3D_API bool fireMouseButtonReleased (MouseButton button, bool ctrl, bool alt, bool shift)
 Fires a mouse released event.
 
C3D_API bool fireMouseWheel (castor::Position const &offsets, bool ctrl, bool alt, bool shift)
 Fires a mouse wheel event.
 
C3D_API bool fireKeydown (KeyboardKey key, bool ctrl, bool alt, bool shift)
 Fires a keyboard key down event.
 
C3D_API bool fireKeyUp (KeyboardKey key, bool ctrl, bool alt, bool shift)
 Fires a keyboard key up event.
 
C3D_API bool fireChar (KeyboardKey key, castor::String const &c)
 Fires a printable key event.
 
- Public Member Functions inherited from castor::OwnedBy< Engine >
Engine * getOwner () const
 

Additional Inherited Members

- Public Types inherited from castor3d::UserInputListener
using OnClickActionFunction = castor::Function< void() >
 
using OnMouseMoveActionFunction = castor::Function< void( castor::Position const & ) >
 
using OnSelectActionFunction = castor::Function< void( int ) >
 
using OnTextActionFunction = castor::Function< void( castor::U32String const & ) >
 
using OnExpandActionFunction = castor::Function< void( bool ) >
 
using OnClipboardTextActionFunction = castor::Function< castor::U32String( bool, castor::U32String ) >
 
using OnCursorActionFunction = castor::Function< void( MouseCursor ) >
 
- Protected Member Functions inherited from castor3d::UserInputListener
castor::Vector< EventHandlerRPtr > doGetHandlers () const
 
bool doHasHandlers () const
 
EventHandlerRPtr doAddHandler (EventHandlerUPtr handler)
 Removes a handler.
 
void doRemoveHandlerNL (EventHandler const &handler)
 Removes a handler.
 
void doRemoveHandler (EventHandler const &handler)
 Removes a handler.
 
- Protected Member Functions inherited from castor::OwnedBy< Engine >
 OwnedBy (Engine &owner)
 Constructor.
 
- Protected Attributes inherited from castor3d::UserInputListener
castor::Mutex m_mutexHandlers
 
castor::Vector< EventHandlerUPtr > m_handlers
 
FrameListenerRPtr m_frameListener
 

Constructor & Destructor Documentation

◆ InputListener()

castor3d::RenderWindow::InputListener::InputListener ( Engine & engine,
RenderWindow & window )
inline

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