Divide Framework
0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
CEGUIInput.h
Go to the documentation of this file.
1
/*
2
Copyright (c) 2018 DIVIDE-Studio
3
Copyright (c) 2009 Ionut Cava
4
5
This file is part of DIVIDE Framework.
6
7
Permission is hereby granted, free of charge, to any person obtaining a copy
8
of this software
9
and associated documentation files (the "Software"), to deal in the Software
10
without restriction,
11
including without limitation the rights to use, copy, modify, merge, publish,
12
distribute, sublicense,
13
and/or sell copies of the Software, and to permit persons to whom the
14
Software is furnished to do so,
15
subject to the following conditions:
16
17
The above copyright notice and this permission notice shall be included in
18
all copies or substantial portions of the Software.
19
20
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
IMPLIED,
22
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
23
PARTICULAR PURPOSE AND NONINFRINGEMENT.
24
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
25
DAMAGES OR OTHER LIABILITY,
26
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
27
IN CONNECTION WITH THE SOFTWARE
28
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
30
*/
31
32
#pragma once
33
#ifndef DVD_CEGUI_INPUT_H_
34
#define DVD_CEGUI_INPUT_H_
35
36
#include "
Platform/Input/Headers/AutoKeyRepeat.h
"
37
#include "
Platform/Input/Headers/InputAggregatorInterface.h
"
38
39
namespace
Divide
{
40
41
class
GUI;
42
struct
Configuration;
43
45
class
CEGUIInput
final :
public
Input::InputAggregatorInterface
,
46
public
Input::AutoRepeatKey
{
47
public
:
48
explicit
CEGUIInput
(
GUI
&
parent
)
noexcept
;
49
void
init
(
const
Configuration
& config)
noexcept
;
50
52
bool
onKeyDown
(
const
Input::KeyEvent
& key)
override
;
54
bool
onKeyUp
(
const
Input::KeyEvent
& key)
override
;
56
bool
joystickAxisMoved
(
const
Input::JoystickEvent
& arg)
override
;
58
bool
joystickPovMoved
(
const
Input::JoystickEvent
& arg)
override
;
60
bool
joystickButtonPressed
(
const
Input::JoystickEvent
& arg)
override
;
62
bool
joystickButtonReleased
(
const
Input::JoystickEvent
& arg)
override
;
63
bool
joystickBallMoved
(
const
Input::JoystickEvent
& arg)
override
;
64
bool
joystickAddRemove
(
const
Input::JoystickEvent
& arg)
override
;
65
bool
joystickRemap
(
const
Input::JoystickEvent
&arg)
override
;
67
bool
mouseMoved
(
const
Input::MouseMoveEvent
& arg)
override
;
69
bool
mouseButtonPressed
(
const
Input::MouseButtonEvent
& arg)
override
;
71
bool
mouseButtonReleased
(
const
Input::MouseButtonEvent
& arg)
override
;
72
73
bool
onTextEvent
(
const
Input::TextEvent
& arg)
override
;
74
75
protected
:
76
GUI
&
_parent
;
77
bool
_enabled
{
false
};
79
bool
injectKey
(
bool
pressed,
const
Input::KeyEvent
& evt);
80
void
repeatKey
(
const
Input::KeyEvent
& evt)
override
;
81
};
82
83
};
// namespace Divide
84
85
#endif
//DVD_CEGUI_INPUT_H_
AutoKeyRepeat.h
InputAggregatorInterface.h
Divide::CEGUIInput
This class defines AutoRepeatKey::repeatKey(...) as CEGUI key inputs.
Definition:
CEGUIInput.h:46
Divide::CEGUIInput::_enabled
bool _enabled
Definition:
CEGUIInput.h:77
Divide::CEGUIInput::joystickButtonPressed
bool joystickButtonPressed(const Input::JoystickEvent &arg) override
Joystick button pressed: return true if input was consumed.
Definition:
CEGUIInput.cpp:355
Divide::CEGUIInput::joystickRemap
bool joystickRemap(const Input::JoystickEvent &arg) override
Definition:
CEGUIInput.cpp:386
Divide::CEGUIInput::mouseButtonReleased
bool mouseButtonReleased(const Input::MouseButtonEvent &arg) override
Mouse button released: return true if input was consumed.
Definition:
CEGUIInput.cpp:296
Divide::CEGUIInput::repeatKey
void repeatKey(const Input::KeyEvent &evt) override
Override this to define custom events for key repeats.
Definition:
CEGUIInput.cpp:214
Divide::CEGUIInput::joystickButtonReleased
bool joystickButtonReleased(const Input::JoystickEvent &arg) override
Joystick button released: return true if input was consumed.
Definition:
CEGUIInput.cpp:363
Divide::CEGUIInput::joystickPovMoved
bool joystickPovMoved(const Input::JoystickEvent &arg) override
Joystick direction change: return true if input was consumed.
Definition:
CEGUIInput.cpp:347
Divide::CEGUIInput::onKeyUp
bool onKeyUp(const Input::KeyEvent &key) override
Key released: return true if input was consumed.
Definition:
CEGUIInput.cpp:233
Divide::CEGUIInput::joystickBallMoved
bool joystickBallMoved(const Input::JoystickEvent &arg) override
Definition:
CEGUIInput.cpp:371
Divide::CEGUIInput::onKeyDown
bool onKeyDown(const Input::KeyEvent &key) override
Key pressed: return true if input was consumed.
Definition:
CEGUIInput.cpp:227
Divide::CEGUIInput::init
void init(const Configuration &config) noexcept
Definition:
CEGUIInput.cpp:178
Divide::CEGUIInput::mouseButtonPressed
bool mouseButtonPressed(const Input::MouseButtonEvent &arg) override
Mouse button pressed: return true if input was consumed.
Definition:
CEGUIInput.cpp:255
Divide::CEGUIInput::_parent
GUI & _parent
Definition:
CEGUIInput.h:76
Divide::CEGUIInput::joystickAxisMoved
bool joystickAxisMoved(const Input::JoystickEvent &arg) override
Joystick axis change: return true if input was consumed.
Definition:
CEGUIInput.cpp:339
Divide::CEGUIInput::injectKey
bool injectKey(bool pressed, const Input::KeyEvent &evt)
Called on key events: return true if the input was consumed.
Definition:
CEGUIInput.cpp:184
Divide::CEGUIInput::joystickAddRemove
bool joystickAddRemove(const Input::JoystickEvent &arg) override
Definition:
CEGUIInput.cpp:379
Divide::CEGUIInput::mouseMoved
bool mouseMoved(const Input::MouseMoveEvent &arg) override
Mouse moved: return true if input was consumed.
Definition:
CEGUIInput.cpp:239
Divide::CEGUIInput::onTextEvent
bool onTextEvent(const Input::TextEvent &arg) override
Definition:
CEGUIInput.cpp:393
Divide::GUI
Graphical User Interface.
Definition:
GUI.h:81
Divide::Input::AutoRepeatKey
Definition:
AutoKeyRepeat.h:44
Divide::Input::InputAggregatorInterface
Definition:
InputAggregatorInterface.h:144
Divide
Handle console commands that start with a forward slash.
Definition:
AIProcessor.cpp:7
Divide::parent
Project & parent
Definition:
DefaultScene.h:41
Divide::Configuration
Definition:
Configuration.h:41
Divide::Input::JoystickEvent
Definition:
InputAggregatorInterface.h:119
Divide::Input::KeyEvent
Definition:
InputAggregatorInterface.h:131
Divide::Input::MouseButtonEvent
Definition:
InputAggregatorInterface.h:79
Divide::Input::MouseMoveEvent
Definition:
InputAggregatorInterface.h:90
Divide::Input::TextEvent
Definition:
InputAggregatorInterface.h:125
Source
GUI
CEGUIAddons
Headers
CEGUIInput.h
Generated on Fri May 17 2024 16:59:52 for Divide Framework by
1.9.6