vhdOSG::Keyboard Class Reference

#include <Keyboard.h>

List of all members.

Public Types

typedef bool(*) KeyCallbackFunc (void *self, int key, int value)

Public Member Functions

std::string Keyboard::getCommandLineOptions ()

Static Public Member Functions

static KeyboardgetInstance ()
static KeyboardgetInstance (osg::ArgumentParser *ap)
static bool keyChange (int key, int value)
static bool addKey (int key, KeyCallbackFunc cb, const std::string &explanation, void *self=NULL)
static bool removeKey (int key)
static bool useKey (int key)
static std::string getDescription ()
static std::string getCommandLineUsage ()
static std::string getEnvironmentalVariables ()
static std::string getKeyboardMouseBindings ()

Protected Types

typedef std::map< int, KeyCallbackFuncKeyMap
typedef std::map< int, void * > DataMap

Protected Member Functions

 Keyboard ()
 ~Keyboard ()

Static Protected Attributes

static Keyboard_single
static KeyMap _keyMap
static DataMap _dataMap
static osg::ArgumentParser * _info


Member Typedef Documentation

typedef bool(*) vhdOSG::Keyboard::KeyCallbackFunc(void *self, int key, int value)

Callback prototype for KeyHandler function.

typedef std::map<int, KeyCallbackFunc> vhdOSG::Keyboard::KeyMap [protected]

typedef std::map<int, void *> vhdOSG::Keyboard::DataMap [protected]


Constructor & Destructor Documentation

vhdOSG::Keyboard::Keyboard (  )  [inline, protected]

vhdOSG::Keyboard::~Keyboard (  )  [inline, protected]


Member Function Documentation

Keyboard * Keyboard::getInstance (  )  [static]

Constructor (static class)

Keyboard * Keyboard::getInstance ( osg::ArgumentParser *  ap  )  [static]

bool Keyboard::keyChange ( int  key,
int  value 
) [static]

Callback plugged to osg to get the keyboard events and refetch them to clients. Provided here for simulated keyboard events (care must be taken for operation requiring to be performed in the drawing thread...).

bool Keyboard::addKey ( int  key,
KeyCallbackFunc  cb,
const std::string &  explanation,
void *  self = NULL 
) [static]

Add a callback function for a given key, with client's own data.

Parameters:
key,: the keyboard entry
cb,: the client's callback function
self,: client's own data provided back upon call to cb

bool Keyboard::removeKey ( int  key  )  [static]

Removes an existing callback function for a given key.

Parameters:
key,: the keyboard entry

bool Keyboard::useKey ( int  key  )  [static]

Return true if there is already a callback associated with this key.

std::string Keyboard::getDescription (  )  [static]

Return the Application description.

std::string Keyboard::getCommandLineUsage (  )  [static]

Return the Command Line Usage.

std::string vhdOSG::Keyboard::Keyboard::getCommandLineOptions (  ) 

Return the Command Line Options.

std::string Keyboard::getEnvironmentalVariables (  )  [static]

Return the Environment Variables.

std::string Keyboard::getKeyboardMouseBindings (  )  [static]

Return the Keyboard and Mouse Bindings description.


Member Data Documentation

Keyboard * Keyboard::_single [static, protected]

Keyboard::KeyMap Keyboard::_keyMap [static, protected]

Keyboard::DataMap Keyboard::_dataMap [static, protected]

osg::ArgumentParser * Keyboard::_info [static, protected]


Generated on Thu Jan 18 10:06:29 2007 for vhdPLUS by  doxygen 1.5.1-p1