Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Divide::CEGUIInput Class Referencefinal

This class defines AutoRepeatKey::repeatKey(...) as CEGUI key inputs. More...

#include <CEGUIInput.h>

+ Inheritance diagram for Divide::CEGUIInput:

Public Member Functions

 CEGUIInput (GUI &parent) noexcept
 
void init (const Configuration &config) noexcept
 
bool onKeyDown (const Input::KeyEvent &key) override
 Key pressed: return true if input was consumed.
 
bool onKeyUp (const Input::KeyEvent &key) override
 Key released: return true if input was consumed.
 
bool joystickAxisMoved (const Input::JoystickEvent &arg) override
 Joystick axis change: return true if input was consumed.
 
bool joystickPovMoved (const Input::JoystickEvent &arg) override
 Joystick direction change: return true if input was consumed.
 
bool joystickButtonPressed (const Input::JoystickEvent &arg) override
 Joystick button pressed: return true if input was consumed.
 
bool joystickButtonReleased (const Input::JoystickEvent &arg) override
 Joystick button released: return true if input was consumed.
 
bool joystickBallMoved (const Input::JoystickEvent &arg) override
 
bool joystickAddRemove (const Input::JoystickEvent &arg) override
 
bool joystickRemap (const Input::JoystickEvent &arg) override
 
bool mouseMoved (const Input::MouseMoveEvent &arg) override
 Mouse moved: return true if input was consumed.
 
bool mouseButtonPressed (const Input::MouseButtonEvent &arg) override
 Mouse button pressed: return true if input was consumed.
 
bool mouseButtonReleased (const Input::MouseButtonEvent &arg) override
 Mouse button released: return true if input was consumed.
 
bool onTextEvent (const Input::TextEvent &arg) override
 
- Public Member Functions inherited from Divide::Input::InputAggregatorInterface
virtual ~InputAggregatorInterface ()=default
 
virtual bool onKeyDown (const KeyEvent &arg)=0
 Keyboard: return true if input was consumed.
 
virtual bool onKeyUp (const KeyEvent &arg)=0
 
virtual bool mouseMoved (const MouseMoveEvent &arg)=0
 Mouse: return true if input was consumed.
 
virtual bool mouseButtonPressed (const MouseButtonEvent &arg)=0
 
virtual bool mouseButtonReleased (const MouseButtonEvent &arg)=0
 
virtual bool joystickButtonPressed (const JoystickEvent &arg)=0
 Joystick or Gamepad: return true if input was consumed.
 
virtual bool joystickButtonReleased (const JoystickEvent &arg)=0
 
virtual bool joystickAxisMoved (const JoystickEvent &arg)=0
 
virtual bool joystickPovMoved (const JoystickEvent &arg)=0
 
virtual bool joystickBallMoved (const JoystickEvent &arg)=0
 
virtual bool joystickAddRemove (const JoystickEvent &arg)=0
 
virtual bool joystickRemap (const JoystickEvent &arg)=0
 
virtual bool onTextEvent (const TextEvent &arg)=0
 
- Public Member Functions inherited from Divide::Input::AutoRepeatKey
virtual ~AutoRepeatKey ()=default
 
 AutoRepeatKey (D64 repeatDelay=0.035, D64 initialDelay=0.300) noexcept
 Default constructor.
 
void begin (const KeyEvent &evt) noexcept
 Called when a key is pressed.
 
void end (const KeyEvent &evt) noexcept
 Called when a key is released.
 
void update (U64 deltaTimeUS)
 Update the internal time interval between frames (microseconds)
 
void setRepeatDelay (const D64 repeatDelay) noexcept
 Adjust delay between key injections.
 
void setInitialDelay (const D64 initialDelay) noexcept
 Adjust the initial delay before we start injecting key repeats.
 

Protected Member Functions

bool injectKey (bool pressed, const Input::KeyEvent &evt)
 Called on key events: return true if the input was consumed.
 
void repeatKey (const Input::KeyEvent &evt) override
 Override this to define custom events for key repeats.
 
virtual void repeatKey (const Input::KeyEvent &evt)=0
 Override this to define custom events for key repeats.
 

Protected Attributes

GUI_parent
 
bool _enabled { false }
 

Detailed Description

This class defines AutoRepeatKey::repeatKey(...) as CEGUI key inputs.

Definition at line 45 of file CEGUIInput.h.

Constructor & Destructor Documentation

◆ CEGUIInput()

Divide::CEGUIInput::CEGUIInput ( GUI parent)
explicitnoexcept

Definition at line 173 of file CEGUIInput.cpp.

Member Function Documentation

◆ init()

void Divide::CEGUIInput::init ( const Configuration config)
noexcept

Definition at line 178 of file CEGUIInput.cpp.

◆ injectKey()

bool Divide::CEGUIInput::injectKey ( bool  pressed,
const Input::KeyEvent evt 
)
protected

Called on key events: return true if the input was consumed.

Definition at line 184 of file CEGUIInput.cpp.

◆ joystickAddRemove()

bool Divide::CEGUIInput::joystickAddRemove ( const Input::JoystickEvent arg)
overridevirtual

Implements Divide::Input::InputAggregatorInterface.

Definition at line 379 of file CEGUIInput.cpp.

◆ joystickAxisMoved()

bool Divide::CEGUIInput::joystickAxisMoved ( const Input::JoystickEvent arg)
overridevirtual

Joystick axis change: return true if input was consumed.

Implements Divide::Input::InputAggregatorInterface.

Definition at line 339 of file CEGUIInput.cpp.

◆ joystickBallMoved()

bool Divide::CEGUIInput::joystickBallMoved ( const Input::JoystickEvent arg)
overridevirtual

Implements Divide::Input::InputAggregatorInterface.

Definition at line 371 of file CEGUIInput.cpp.

◆ joystickButtonPressed()

bool Divide::CEGUIInput::joystickButtonPressed ( const Input::JoystickEvent arg)
overridevirtual

Joystick button pressed: return true if input was consumed.

Implements Divide::Input::InputAggregatorInterface.

Definition at line 355 of file CEGUIInput.cpp.

◆ joystickButtonReleased()

bool Divide::CEGUIInput::joystickButtonReleased ( const Input::JoystickEvent arg)
overridevirtual

Joystick button released: return true if input was consumed.

Implements Divide::Input::InputAggregatorInterface.

Definition at line 363 of file CEGUIInput.cpp.

◆ joystickPovMoved()

bool Divide::CEGUIInput::joystickPovMoved ( const Input::JoystickEvent arg)
overridevirtual

Joystick direction change: return true if input was consumed.

Implements Divide::Input::InputAggregatorInterface.

Definition at line 347 of file CEGUIInput.cpp.

◆ joystickRemap()

bool Divide::CEGUIInput::joystickRemap ( const Input::JoystickEvent arg)
overridevirtual

Implements Divide::Input::InputAggregatorInterface.

Definition at line 386 of file CEGUIInput.cpp.

◆ mouseButtonPressed()

bool Divide::CEGUIInput::mouseButtonPressed ( const Input::MouseButtonEvent arg)
overridevirtual

Mouse button pressed: return true if input was consumed.

Implements Divide::Input::InputAggregatorInterface.

Definition at line 255 of file CEGUIInput.cpp.

◆ mouseButtonReleased()

bool Divide::CEGUIInput::mouseButtonReleased ( const Input::MouseButtonEvent arg)
overridevirtual

Mouse button released: return true if input was consumed.

Implements Divide::Input::InputAggregatorInterface.

Definition at line 296 of file CEGUIInput.cpp.

◆ mouseMoved()

bool Divide::CEGUIInput::mouseMoved ( const Input::MouseMoveEvent arg)
overridevirtual

Mouse moved: return true if input was consumed.

Implements Divide::Input::InputAggregatorInterface.

Definition at line 239 of file CEGUIInput.cpp.

◆ onKeyDown()

bool Divide::CEGUIInput::onKeyDown ( const Input::KeyEvent key)
overridevirtual

Key pressed: return true if input was consumed.

Implements Divide::Input::InputAggregatorInterface.

Definition at line 227 of file CEGUIInput.cpp.

◆ onKeyUp()

bool Divide::CEGUIInput::onKeyUp ( const Input::KeyEvent key)
overridevirtual

Key released: return true if input was consumed.

Implements Divide::Input::InputAggregatorInterface.

Definition at line 233 of file CEGUIInput.cpp.

◆ onTextEvent()

bool Divide::CEGUIInput::onTextEvent ( const Input::TextEvent arg)
overridevirtual

Implements Divide::Input::InputAggregatorInterface.

Definition at line 393 of file CEGUIInput.cpp.

◆ repeatKey()

void Divide::CEGUIInput::repeatKey ( const Input::KeyEvent evt)
overrideprotectedvirtual

Override this to define custom events for key repeats.

Implements Divide::Input::AutoRepeatKey.

Definition at line 214 of file CEGUIInput.cpp.

Member Data Documentation

◆ _enabled

bool Divide::CEGUIInput::_enabled { false }
protected

Definition at line 77 of file CEGUIInput.h.

◆ _parent

GUI& Divide::CEGUIInput::_parent
protected

Definition at line 76 of file CEGUIInput.h.


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