Pioneer
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Input::Manager Class Reference

#include <Input.h>

Public Member Functions

 Manager (IniConfig *config, SDL_Window *window)
 
void InitGame ()
 
void NewFrame ()
 
void HandleSDLEvent (SDL_Event &ev)
 
void DispatchEvents ()
 
void EnableConfigSaving (bool enable)
 
BindingPageGetBindingPage (std::string id)
 
std::map< std::string, BindingPageGetBindingPages ()
 
bool AddInputFrame (InputFrame *frame)
 
const std::vector< InputFrame * > & GetInputFrames ()
 
bool HasInputFrame (InputFrame *frame)
 
void RemoveInputFrame (InputFrame *frame)
 
void MarkBindingsDirty ()
 
InputBindings::ActionAddActionBinding (std::string id, BindingGroup *group, InputBindings::Action &&binding)
 
InputBindings::ActionGetActionBinding (std::string id)
 
InputBindings::AxisAddAxisBinding (std::string id, BindingGroup *group, InputBindings::Axis &&binding)
 
InputBindings::AxisGetAxisBinding (std::string id)
 
void EnableBindings (bool enabled)
 
bool KeyState (SDL_Keycode k)
 
bool IsKeyDown (SDL_Keycode k)
 
bool IsKeyPressed (SDL_Keycode k)
 
bool IsKeyReleased (SDL_Keycode k)
 
int KeyModState ()
 
int JoystickButtonState (int joystick, int button)
 
int JoystickHatState (int joystick, int hat)
 
float JoystickAxisState (int joystick, int axis)
 
bool IsJoystickEnabled ()
 
void SetJoystickEnabled (bool state)
 
bool IsMouseYInvert ()
 
void SetMouseYInvert (bool state)
 
bool IsMouseButtonPressed (int button)
 
bool IsMouseButtonReleased (int button)
 
bool MouseButtonState (int button)
 
void SetMouseButtonState (int button, bool state)
 
void GetMousePosition (int position[2])
 
void GetMouseMotion (int motion[2])
 
int GetMouseWheel ()
 
bool IsCapturingMouse () const
 
void SetCapturingMouse (bool enabled)
 
void ClearMouse ()
 

Public Attributes

sigc::signal< void, SDL_Keysym * > onKeyPress
 
sigc::signal< void, SDL_Keysym * > onKeyRelease
 
sigc::signal< void, int, int, int > onMouseButtonUp
 
sigc::signal< void, int, int, int > onMouseButtonDown
 
sigc::signal< void, bool > onMouseWheel
 

Constructor & Destructor Documentation

◆ Manager()

Manager::Manager ( IniConfig config,
SDL_Window *  window 
)
Here is the call graph for this function:

Member Function Documentation

◆ AddActionBinding()

InputBindings::Action * Manager::AddActionBinding ( std::string  id,
BindingGroup group,
InputBindings::Action &&  binding 
)
Here is the call graph for this function:

◆ AddAxisBinding()

InputBindings::Axis * Manager::AddAxisBinding ( std::string  id,
BindingGroup group,
InputBindings::Axis &&  binding 
)
Here is the call graph for this function:

◆ AddInputFrame()

bool Manager::AddInputFrame ( InputFrame frame)

◆ ClearMouse()

void Manager::ClearMouse ( )

◆ DispatchEvents()

void Manager::DispatchEvents ( )
Here is the call graph for this function:

◆ EnableBindings()

void Input::Manager::EnableBindings ( bool  enabled)
inline

◆ EnableConfigSaving()

void Input::Manager::EnableConfigSaving ( bool  enable)
inline

◆ GetActionBinding()

InputBindings::Action * Manager::GetActionBinding ( std::string  id)

◆ GetAxisBinding()

InputBindings::Axis * Manager::GetAxisBinding ( std::string  id)

◆ GetBindingPage()

BindingPage * Input::Manager::GetBindingPage ( std::string  id)
inline

◆ GetBindingPages()

std::map< std::string, BindingPage > Input::Manager::GetBindingPages ( )
inline

◆ GetInputFrames()

const std::vector< InputFrame * > & Input::Manager::GetInputFrames ( )
inline

◆ GetMouseMotion()

void Input::Manager::GetMouseMotion ( int  motion[2])
inline

◆ GetMousePosition()

void Manager::GetMousePosition ( int  position[2])

◆ GetMouseWheel()

int Input::Manager::GetMouseWheel ( )
inline

◆ HandleSDLEvent()

void Manager::HandleSDLEvent ( SDL_Event &  ev)
Here is the call graph for this function:

◆ HasInputFrame()

bool Input::Manager::HasInputFrame ( InputFrame frame)
inline

◆ InitGame()

void Manager::InitGame ( )
Here is the call graph for this function:

◆ IsCapturingMouse()

bool Input::Manager::IsCapturingMouse ( ) const
inline

◆ IsJoystickEnabled()

bool Input::Manager::IsJoystickEnabled ( )
inline

◆ IsKeyDown()

bool Input::Manager::IsKeyDown ( SDL_Keycode  k)
inline

◆ IsKeyPressed()

bool Input::Manager::IsKeyPressed ( SDL_Keycode  k)
inline

◆ IsKeyReleased()

bool Input::Manager::IsKeyReleased ( SDL_Keycode  k)
inline

◆ IsMouseButtonPressed()

bool Input::Manager::IsMouseButtonPressed ( int  button)
inline

◆ IsMouseButtonReleased()

bool Input::Manager::IsMouseButtonReleased ( int  button)
inline

◆ IsMouseYInvert()

bool Input::Manager::IsMouseYInvert ( )
inline

◆ JoystickAxisState()

float Manager::JoystickAxisState ( int  joystick,
int  axis 
)
Here is the call graph for this function:

◆ JoystickButtonState()

int Manager::JoystickButtonState ( int  joystick,
int  button 
)
Here is the call graph for this function:

◆ JoystickHatState()

int Manager::JoystickHatState ( int  joystick,
int  hat 
)
Here is the call graph for this function:

◆ KeyModState()

int Input::Manager::KeyModState ( )
inline

◆ KeyState()

bool Input::Manager::KeyState ( SDL_Keycode  k)
inline
Here is the call graph for this function:

◆ MarkBindingsDirty()

void Input::Manager::MarkBindingsDirty ( )
inline

◆ MouseButtonState()

bool Input::Manager::MouseButtonState ( int  button)
inline

◆ NewFrame()

void Manager::NewFrame ( )

◆ RemoveInputFrame()

void Manager::RemoveInputFrame ( InputFrame frame)
Here is the call graph for this function:

◆ SetCapturingMouse()

void Manager::SetCapturingMouse ( bool  enabled)

◆ SetJoystickEnabled()

void Manager::SetJoystickEnabled ( bool  state)
Here is the call graph for this function:

◆ SetMouseButtonState()

void Input::Manager::SetMouseButtonState ( int  button,
bool  state 
)
inline

◆ SetMouseYInvert()

void Manager::SetMouseYInvert ( bool  state)
Here is the call graph for this function:

Member Data Documentation

◆ onKeyPress

sigc::signal<void, SDL_Keysym *> Input::Manager::onKeyPress

◆ onKeyRelease

sigc::signal<void, SDL_Keysym *> Input::Manager::onKeyRelease

◆ onMouseButtonDown

sigc::signal<void, int, int, int> Input::Manager::onMouseButtonDown

◆ onMouseButtonUp

sigc::signal<void, int, int, int> Input::Manager::onMouseButtonUp

◆ onMouseWheel

sigc::signal<void, bool> Input::Manager::onMouseWheel

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