Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
OIS::MacKeyboard Class Reference

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/external/ois/mac/MacKeyboard.h>

Inheritance diagram for OIS::MacKeyboard:
OIS::Keyboard OIS::Object

Public Member Functions

 MacKeyboard (InputManager *creator, bool buffered, bool repeat)
 
virtual ~MacKeyboard ()
 
virtual void _initialize ()
 
void _keyDownCallback (EventRef theEvent)
 
void _keyUpCallback (EventRef theEvent)
 
void _modChangeCallback (EventRef theEvent)
 
virtual void capture ()
 
virtual void copyKeyStates (char keys[256]) const
 
virtual std::string & getAsString (KeyCode key)
 
virtual bool isKeyDown (KeyCode key) const
 
virtual InterfacequeryInterface (Interface::IType type)
 
virtual void setBuffered (bool buffered)
 
- Public Member Functions inherited from OIS::Keyboard
virtual ~Keyboard ()
 
KeyListenergetEventCallback () const
 
TextTranslationMode getTextTranslation () const
 
bool isModifierDown (Modifier mod) const
 
virtual void setEventCallback (KeyListener *keyListener)
 
virtual void setTextTranslation (TextTranslationMode mode)
 
- Public Member Functions inherited from OIS::Object
virtual ~Object ()
 
virtual bool buffered () const
 
InputManagergetCreator () const
 
virtual int getID () const
 
Type type () const
 
const std::string & vendor () const
 

Protected Types

typedef std::list< MacKeyStackEventeventStack
 
typedef std::map< UInt32, KeyCodeVirtualtoOIS_KeyMap
 

Protected Member Functions

void injectEvent (KeyCode kc, unsigned int time, MacEventType type, unsigned int txt=0)
 
void populateKeyConversion ()
 
- Protected Member Functions inherited from OIS::Keyboard
 Keyboard (const std::string &vendor, bool buffered, int devID, InputManager *creator)
 
- Protected Member Functions inherited from OIS::Object
 Object (const std::string &vendor, Type iType, bool buffered, int devID, InputManager *creator)
 

Protected Attributes

std::string getString
 
char KeyBuffer [256]
 
VirtualtoOIS_KeyMap keyConversion
 
EventHandlerRef keyDownEventRef
 
EventHandlerUPP keyDownUPP
 
EventHandlerRef keyModEventRef
 
EventHandlerUPP keyModUPP
 
EventHandlerRef keyUpEventRef
 
EventHandlerUPP keyUpUPP
 
eventStack pendingEvents
 
UInt32 prevModMask
 
bool useRepeat
 
- Protected Attributes inherited from OIS::Keyboard
KeyListenermListener
 Used for buffered/actionmapping callback. More...
 
unsigned int mModifiers
 Bit field that holds status of Alt, Ctrl, Shift. More...
 
TextTranslationMode mTextMode
 The current translation mode. More...
 
- Protected Attributes inherited from OIS::Object
bool mBuffered
 Buffered flag. More...
 
InputManagermCreator
 The creator who created this object. More...
 
int mDevID
 Not fully implemented yet. More...
 
Type mType
 Type of controller object. More...
 
std::string mVendor
 Vendor name if applicable/known. More...
 

Additional Inherited Members

- Public Types inherited from OIS::Keyboard
enum  Modifier { Shift = 0x0000001, Ctrl = 0x0000010, Alt = 0x0000100 }
 Enum of bit position of modifer. More...
 
enum  TextTranslationMode { Off, Unicode, Ascii }
 TextTranslation Mode. More...
 

Member Typedef Documentation

typedef std::list<MacKeyStackEvent> OIS::MacKeyboard::eventStack
protected
typedef std::map<UInt32, KeyCode> OIS::MacKeyboard::VirtualtoOIS_KeyMap
protected

Constructor & Destructor Documentation

MacKeyboard::MacKeyboard ( InputManager creator,
bool  buffered,
bool  repeat 
)
MacKeyboard::~MacKeyboard ( )
virtual

Member Function Documentation

void MacKeyboard::_initialize ( )
virtual
Remarks
Internal... Do not call this directly.

Implements OIS::Object.

void MacKeyboard::_keyDownCallback ( EventRef  theEvent)
void MacKeyboard::_keyUpCallback ( EventRef  theEvent)
void MacKeyboard::_modChangeCallback ( EventRef  theEvent)
void MacKeyboard::capture ( )
virtual
Remarks
Used for updating call once per frame before checking state or to update events

Implements OIS::Object.

void MacKeyboard::copyKeyStates ( char  keys[256]) const
virtual
Remarks
Copies the state of the keys into the sent buffer (in the form of 1 is down and 0 is up)

Implements OIS::Keyboard.

std::string & MacKeyboard::getAsString ( KeyCode  kc)
virtual
Remarks
Translates KeyCode to string representation. For example, KC_ENTER will be "Enter" - Locale specific of course.
Parameters
kcKeyCode to convert
Returns
The string as determined from the current locale

Implements OIS::Keyboard.

void MacKeyboard::injectEvent ( KeyCode  kc,
unsigned int  time,
MacEventType  type,
unsigned int  txt = 0 
)
protected
bool MacKeyboard::isKeyDown ( KeyCode  key) const
virtual
Remarks
Returns true if key is donwn
Parameters
keyA KeyCode to check

Implements OIS::Keyboard.

void MacKeyboard::populateKeyConversion ( )
protected
virtual Interface* OIS::MacKeyboard::queryInterface ( Interface::IType  type)
inlinevirtual
Remarks
If available, get an interface to write to some devices. Examples include, turning on and off LEDs, ForceFeedback, etc
Parameters
typeThe type of interface you are looking for

Implements OIS::Object.

void MacKeyboard::setBuffered ( bool  buffered)
virtual
Remarks
Sets buffered mode

Implements OIS::Object.

Member Data Documentation

std::string OIS::MacKeyboard::getString
protected
char OIS::MacKeyboard::KeyBuffer[256]
protected
VirtualtoOIS_KeyMap OIS::MacKeyboard::keyConversion
protected
EventHandlerRef OIS::MacKeyboard::keyDownEventRef
protected
EventHandlerUPP OIS::MacKeyboard::keyDownUPP
protected
EventHandlerRef OIS::MacKeyboard::keyModEventRef
protected
EventHandlerUPP OIS::MacKeyboard::keyModUPP
protected
EventHandlerRef OIS::MacKeyboard::keyUpEventRef
protected
EventHandlerUPP OIS::MacKeyboard::keyUpUPP
protected
eventStack OIS::MacKeyboard::pendingEvents
protected
UInt32 OIS::MacKeyboard::prevModMask
protected
bool OIS::MacKeyboard::useRepeat
protected

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