Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
inputhandler.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
17
#include "
core/refcounted.h
"
18
#include "
input/inputevent.h
"
19
20
namespace
Base
21
{
22
class
InputServerBase
;
23
}
24
25
//------------------------------------------------------------------------------
26
namespace
Input
27
{
28
class
InputHandler
:
public
Core::RefCounted
29
{
30
__DeclareClass
(
InputHandler
);
31
public
:
33
InputHandler
();
35
virtual
~InputHandler
();
36
38
bool
IsAttached
()
const
;
40
virtual
void
BeginCapture
();
42
virtual
void
EndCapture
();
44
bool
IsCapturing
()
const
;
45
48
virtual
void
Poll
();
49
50
protected
:
51
friend
class
Base::InputServerBase
;
52
54
virtual
void
OnAttach
();
56
virtual
void
OnRemove
();
58
virtual
void
OnBeginFrame
();
60
virtual
void
OnEndFrame
();
62
virtual
void
OnObtainCapture
();
64
virtual
void
OnReleaseCapture
();
66
virtual
bool
OnEvent
(
const
InputEvent
& inputEvent);
68
virtual
void
OnReset
();
69
70
bool
isAttached
;
71
bool
isCapturing
;
72
};
73
74
//------------------------------------------------------------------------------
77
inline
bool
78
InputHandler::IsAttached
()
const
79
{
80
return
this->
isAttached
;
81
}
82
83
//------------------------------------------------------------------------------
86
inline
bool
87
InputHandler::IsCapturing
()
const
88
{
89
return
this->
isCapturing
;
90
}
91
92
}
// namespace Input
93
//------------------------------------------------------------------------------
94
Base::InputServerBase
The InputServer is the central object of the Input subsystem.
Definition
inputserverbase.h:33
Core::RefCounted
The common base class of Nebula.
Definition
refcounted.h:45
Input::InputEvent
The input events of the Input subsystems.
Definition
inputevent.h:25
Input::InputHandler::BeginCapture
virtual void BeginCapture()
capture input to this event handler
Definition
inputhandler.cc:40
Input::InputHandler::OnObtainCapture
virtual void OnObtainCapture()
called when input handler obtains capture
Definition
inputhandler.cc:98
Input::InputHandler::IsCapturing
bool IsCapturing() const
return true if this input handler captures input
Definition
inputhandler.h:87
Input::InputHandler::OnEndFrame
virtual void OnEndFrame()
called on InputServer::EndFrame();
Definition
inputhandler.cc:89
Input::InputHandler::OnReleaseCapture
virtual void OnReleaseCapture()
called when input handler looses capture
Definition
inputhandler.cc:107
Input::InputHandler::OnRemove
virtual void OnRemove()
called when the handler is removed from the input server
Definition
inputhandler.cc:70
Input::InputHandler::isAttached
bool isAttached
Definition
inputhandler.h:70
Input::InputHandler::IsAttached
bool IsAttached() const
return true if the input handler is currently attached
Definition
inputhandler.h:78
Input::InputHandler::isCapturing
bool isCapturing
Definition
inputhandler.h:71
Input::InputHandler::Poll
virtual void Poll()
take this frame's state from the device.
Definition
inputhandler.cc:138
Input::InputHandler::OnEvent
virtual bool OnEvent(const InputEvent &inputEvent)
called when an input event should be processed
Definition
inputhandler.cc:116
Input::InputHandler::OnBeginFrame
virtual void OnBeginFrame()
called on InputServer::BeginFrame()
Definition
inputhandler.cc:80
Input::InputHandler::OnReset
virtual void OnReset()
called when the handler should reset itself
Definition
inputhandler.cc:150
Input::InputHandler::__DeclareClass
__DeclareClass(InputHandler)
Input::InputHandler::EndCapture
virtual void EndCapture()
end input capturing to this event handler
Definition
inputhandler.cc:51
Input::InputHandler::InputHandler
InputHandler()
constructor
Definition
inputhandler.cc:16
Input::InputHandler::OnAttach
virtual void OnAttach()
called when the handler is attached to the input server
Definition
inputhandler.cc:60
inputevent.h
Base
Definition
gamecontentserverbase.cc:10
Input
FIXME!
refcounted.h
code
input
input
inputhandler.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.