input::handler Class Reference

A reference to an input implementation. More...

#include <input.hpp>

List of all members.

Public Member Functions

 handler ()
 Default constructor (empty handler).
template<class T >
 handler (utils::refptr< T > pImpl)
 Implementation constructor.
void update ()
 Updates this handler.
bool is_manually_updated () const
 Checks if this handler is manually updated.
void set_manually_updated (bool bManuallyUpdated)
 Marks this handler as manually updated.
const handler_impl::key_stateget_key_state () const
 Returns the keyboard state of this input handler.
std::vector< char32_t > get_chars () const
 Returns the unicode characters that has been entered.
std::string get_key_name (key::code mKey) const
 Returns the name of the key as it appears on the keyboard.
const handler_impl::mouse_stateget_mouse_state () const
 Returns the mouse state of this input handler.
utils::wptr< handler_implget_impl ()
 Returns the implementation specific handler.

Detailed Description

A reference to an input implementation.

Note:
In case you want to share the same handler for several input::managers, you have to call set_manually_updated(true), and update the handler yourself. Else, it will be updated by each input::manager (and that may be something you don't want to happen).

Definition at line 80 of file input.hpp.


Constructor & Destructor Documentation

input::handler::handler (  ) 

Default constructor (empty handler).

Definition at line 12 of file input.cpp.

template<class T >
input::handler::handler ( utils::refptr< T >  pImpl  )  [inline]

Implementation constructor.

Parameters:
pImpl A pointer to the implementation handler

Definition at line 91 of file input.hpp.


Member Function Documentation

std::vector< char32_t > input::handler::get_chars (  )  const

Returns the unicode characters that has been entered.

Returns:
The unicode characters entered with the keyboard

Definition at line 41 of file input.cpp.

utils::wptr< handler_impl > input::handler::get_impl (  ) 

Returns the implementation specific handler.

Definition at line 56 of file input.cpp.

std::string input::handler::get_key_name ( key::code  mKey  )  const

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

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

Definition at line 46 of file input.cpp.

const handler_impl::key_state & input::handler::get_key_state (  )  const

Returns the keyboard state of this input handler.

Definition at line 36 of file input.cpp.

const handler_impl::mouse_state & input::handler::get_mouse_state (  )  const

Returns the mouse state of this input handler.

Definition at line 51 of file input.cpp.

bool input::handler::is_manually_updated (  )  const

Checks if this handler is manually updated.

Returns:
'true' if this handler is manually updated
Note:
See set_manually_updated().

Definition at line 26 of file input.cpp.

void input::handler::set_manually_updated ( bool  bManuallyUpdated  ) 

Marks this handler as manually updated.

Parameters:
bManuallyUpdated 'true' if this handler is manually updated
Note:
In case you want to share the same handler for several input::managers, you have to call set_manually_updated(true), and update the handler yourself. Else, it will be updated by each input::manager (and that may be something you don't want to happen).

Definition at line 31 of file input.cpp.

void input::handler::update (  ) 

Updates this handler.

Note:
This function calls pImpl->update().

Definition at line 16 of file input.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