input::sfml_handler Class Reference

#include <sfml_input_impl.hpp>

Inheritance diagram for input::sfml_handler:
input::handler_impl

List of all members.

Public Member Functions

 sfml_handler (const sf::Window &pWindow, bool bMouseGrab=false)
 Initializes this handler.
void toggle_mouse_grab () override
 Toggles mouse grab.
std::string get_key_name (key::code mKey) const override
 Returns the name of the key as it appears on the keyboard.
void update () override
 Updates this implementation handler.
void on_sfml_event (const sf::Event &mEvent)

Detailed Description

Definition at line 14 of file sfml_input_impl.hpp.


Constructor & Destructor Documentation

input::sfml_handler::sfml_handler ( const sf::Window &  pWindow,
bool  bMouseGrab = false 
) [explicit]

Initializes this handler.

Parameters:
pWindow The window from which to receive input

Definition at line 125 of file sfml_input_impl.cpp.


Member Function Documentation

std::string input::sfml_handler::get_key_name ( key::code  mKey  )  const [override, virtual]

Returns the name of the key as it appears on the keyboard.

Returns:
The name of the key as it appears on the keyboard

Implements input::handler_impl.

Definition at line 392 of file sfml_input_impl.cpp.

void input::sfml_handler::on_sfml_event ( const sf::Event &  mEvent  ) 

Definition at line 502 of file sfml_input_impl.cpp.

void input::sfml_handler::toggle_mouse_grab (  )  [override, virtual]

Toggles mouse grab.

When the mouse is grabbed, it is confined to the borders of the main window. The actual cursor behavior when reaching those borders is of no importance : what matters is that relative mouse movement is always aquired, i.e. the mouse is never blocked. The mouse is not grabbed by default.

Implements input::handler_impl.

Definition at line 148 of file sfml_input_impl.cpp.

void input::sfml_handler::update (  )  [override, virtual]

Updates this implementation handler.

Implements input::handler_impl.

Definition at line 448 of file sfml_input_impl.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Tue Jan 1 21:58:13 2013 for gui by  doxygen 1.6.1