LLViewerKeyboard Class Reference

#include <llviewerkeyboard.h>

Collaboration diagram for LLViewerKeyboard:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLViewerKeyboard ()
BOOL handleKey (KEY key, MASK mask, BOOL repeated)
void bindNamedFunction (const char *name, LLKeyFunc func)
S32 loadBindings (const char *filename)
EKeyboardMode getMode ()
BOOL modeFromString (const char *string, S32 *mode)
void scanKey (KEY key, BOOL key_down, BOOL key_up, BOOL key_level)

Protected Types

typedef std::map< U32, U32key_remap_t

Protected Member Functions

BOOL bindKey (const S32 mode, const KEY key, const MASK mask, const char *function_name)

Protected Attributes

S32 mNamedFunctionCount
LLNamedFunction mNamedFunctions [MAX_NAMED_FUNCTIONS]
S32 mBindingCount [MODE_COUNT]
LLKeyBinding mBindings [MODE_COUNT][MAX_KEY_BINDINGS]
key_remap_t mRemapKeys [MODE_COUNT]
std::set< KEYmKeysSkippedByUI
BOOL mKeyHandledByUI [KEY_COUNT]

Detailed Description

Definition at line 62 of file llviewerkeyboard.h.


Member Typedef Documentation

typedef std::map<U32, U32> LLViewerKeyboard::key_remap_t [protected]

Definition at line 86 of file llviewerkeyboard.h.


Constructor & Destructor Documentation

LLViewerKeyboard::LLViewerKeyboard (  ) 

Definition at line 526 of file llviewerkeyboard.cpp.

References FALSE, i, KEY_COUNT, KEY_PAD_DIVIDE, KEY_PAD_UP, mBindingCount, mKeyHandledByUI, mKeysSkippedByUI, MODE_COUNT, and S32.


Member Function Documentation

BOOL LLViewerKeyboard::bindKey ( const S32  mode,
const KEY  key,
const MASK  mask,
const char *  function_name 
) [protected]

Definition at line 624 of file llviewerkeyboard.cpp.

References FALSE, i, KEY_F1, llendl, llerror, llerrs, MAX_KEY_BINDINGS, mBindingCount, mBindings, LLKeyBinding::mFunction, LLNamedFunction::mFunction, LLKeyBinding::mKey, LLKeyBinding::mMask, LLNamedFunction::mName, mNamedFunctionCount, mNamedFunctions, MODE_COUNT, mRemapKeys, NULL, S32, TRUE, and void.

Referenced by loadBindings().

void LLViewerKeyboard::bindNamedFunction ( const char *  name,
LLKeyFunc  func 
)

Definition at line 545 of file llviewerkeyboard.cpp.

References i, LLNamedFunction::mFunction, LLNamedFunction::mName, mNamedFunctionCount, mNamedFunctions, and S32.

Referenced by bind_keyboard_functions().

EKeyboardMode LLViewerKeyboard::getMode (  ) 

Definition at line 794 of file llviewerkeyboard.cpp.

References LLAgent::cameraMouselook(), gAgent, LLAgent::getAvatarObject(), LLView::getVisible(), gMorphView, LLVOAvatar::mIsSitting, MODE_EDIT_AVATAR, MODE_FIRST_PERSON, MODE_SITTING, and MODE_THIRD_PERSON.

Referenced by handleKey(), and scanKey().

BOOL LLViewerKeyboard::handleKey ( KEY  key,
MASK  mask,
BOOL  repeated 
)

Definition at line 588 of file llviewerkeyboard.cpp.

References end, FALSE, getMode(), gViewerKeyboard, gViewerWindow, LLViewerWindow::handleKey(), KEY_F12, lldebugst, llendl, mKeyHandledByUI, mKeysSkippedByUI, mode, and mRemapKeys.

Referenced by LLViewerWindow::handleTranslatedKeyDown(), and LLViewerWindow::handleUnicodeChar().

S32 LLViewerKeyboard::loadBindings ( const char *  filename  ) 

Definition at line 698 of file llviewerkeyboard.cpp.

References bindKey(), BUFFER_SIZE, LLFile::fopen(), LLKeyboard::keyFromString(), llendl, llerrs, llinfos, mask, LLKeyboard::maskFromString(), MAX_STRING, mode, MODE_THIRD_PERSON, modeFromString(), and S32.

Referenced by main().

BOOL LLViewerKeyboard::modeFromString ( const char *  string,
S32 mode 
)

Definition at line 554 of file llviewerkeyboard.cpp.

References FALSE, MODE_EDIT, MODE_EDIT_AVATAR, MODE_FIRST_PERSON, MODE_SITTING, MODE_THIRD_PERSON, and TRUE.

Referenced by loadBindings().

void LLViewerKeyboard::scanKey ( KEY  key,
BOOL  key_down,
BOOL  key_up,
BOOL  key_level 
)

Definition at line 816 of file llviewerkeyboard.cpp.

References LLKeyboard::currentMask(), FALSE, LLKeyboard::getKeyRepeated(), getMode(), gKeyboard, i, KEYSTATE_DOWN, KEYSTATE_LEVEL, KEYSTATE_UP, mask, mBindingCount, mBindings, mKeyHandledByUI, mode, and S32.

Referenced by LLViewerWindow::handleScanKey().


Member Data Documentation

S32 LLViewerKeyboard::mBindingCount[MODE_COUNT] [protected]

Definition at line 83 of file llviewerkeyboard.h.

Referenced by bindKey(), LLViewerKeyboard(), and scanKey().

LLKeyBinding LLViewerKeyboard::mBindings[MODE_COUNT][MAX_KEY_BINDINGS] [protected]

Definition at line 84 of file llviewerkeyboard.h.

Referenced by bindKey(), and scanKey().

BOOL LLViewerKeyboard::mKeyHandledByUI[KEY_COUNT] [protected]

Definition at line 89 of file llviewerkeyboard.h.

Referenced by handleKey(), LLViewerKeyboard(), and scanKey().

std::set<KEY> LLViewerKeyboard::mKeysSkippedByUI [protected]

Definition at line 88 of file llviewerkeyboard.h.

Referenced by handleKey(), and LLViewerKeyboard().

S32 LLViewerKeyboard::mNamedFunctionCount [protected]

Definition at line 79 of file llviewerkeyboard.h.

Referenced by bindKey(), and bindNamedFunction().

LLNamedFunction LLViewerKeyboard::mNamedFunctions[MAX_NAMED_FUNCTIONS] [protected]

Definition at line 80 of file llviewerkeyboard.h.

Referenced by bindKey(), and bindNamedFunction().

key_remap_t LLViewerKeyboard::mRemapKeys[MODE_COUNT] [protected]

Definition at line 87 of file llviewerkeyboard.h.

Referenced by bindKey(), and handleKey().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:58 2010 for Second Life Viewer by  doxygen 1.4.7