CrystalSpace

Public API Reference

Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

csInputBinder Class Reference

Use this class to bind input events (keypress, button press, mouse move, etc.) to commands (shoot, jump, walk, etc.). More...

#include <csutil/binder.h>

Inheritance diagram for csInputBinder:

iInputBinder iBase List of all members.

Public Member Functions

 csInputBinder (iBase *parent=0, int btnSize=127, int axisSize=13)
 Create a new binder with an initial bindings hash size.
virtual iEventHandlerQueryHandler ()
 Get a pointer to the embedded iEventHander.
virtual int Axis (unsigned cmd)
 Returns the position of the given axis command.
virtual bool Button (unsigned cmd)
 Returns the status of the given button command.
virtual bool UnbindAxis (unsigned cmd)
 Remove a binding.
virtual bool UnbindButton (unsigned cmd)
 Remove a binding.
virtual void UnbindAll ()
 Remove all bindings.
virtual void LoadConfig (iConfigFile *, const char *subsection)
 Load bindings from a configuration file.
virtual void SaveConfig (iConfigFile *, const char *subsection)
 Save bindings to a configuration file.

Detailed Description

Use this class to bind input events (keypress, button press, mouse move, etc.) to commands (shoot, jump, walk, etc.).

Definition at line 35 of file binder.h.


Constructor & Destructor Documentation

csInputBinder::csInputBinder iBase parent = 0,
int  btnSize = 127,
int  axisSize = 13
 

Create a new binder with an initial bindings hash size.

For optimum hash storage, size should be a prime number.


Member Function Documentation

virtual int csInputBinder::Axis unsigned  cmd  )  [virtual]
 

Returns the position of the given axis command.

Implements iInputBinder.

virtual bool csInputBinder::Button unsigned  cmd  )  [virtual]
 

Returns the status of the given button command.

Implements iInputBinder.

virtual void csInputBinder::LoadConfig iConfigFile ,
const char *  subsection
[virtual]
 

Load bindings from a configuration file.

Implements iInputBinder.

virtual iEventHandler* csInputBinder::QueryHandler  )  [inline, virtual]
 

Get a pointer to the embedded iEventHander.

Remarks:
This class can be registered with the event queue: EventQueue->RegisterListener(InputBinder->QueryHandler (), CSMASK_Input);

Implements iInputBinder.

Definition at line 80 of file binder.h.

virtual void csInputBinder::SaveConfig iConfigFile ,
const char *  subsection
[virtual]
 

Save bindings to a configuration file.

Implements iInputBinder.

virtual void csInputBinder::UnbindAll  )  [virtual]
 

Remove all bindings.

Implements iInputBinder.

virtual bool csInputBinder::UnbindAxis unsigned  cmd  )  [virtual]
 

Remove a binding.

Implements iInputBinder.

virtual bool csInputBinder::UnbindButton unsigned  cmd  )  [virtual]
 

Remove a binding.

Implements iInputBinder.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.3.9.1