#include <C4KeyboardInput.h>
Public Types | |
enum | Priority { PRIO_None = 0u , PRIO_Base = 1u , PRIO_Dlg = 2u , PRIO_Ctrl = 3u , PRIO_CtrlOverride = 4u , PRIO_FocusCtrl = 5u , PRIO_Context = 6u , PRIO_PlrControl = 7u , PRIO_MoreThanMax = 100u } |
typedef std::vector< C4KeyCodeEx > | CodeList |
Public Member Functions | |
C4CustomKey (const C4CustomKey &rCpy, bool fCopyCallbacks) | |
virtual | ~C4CustomKey () |
void | Ref () |
void | Deref () |
const CodeList & | GetCodes () const |
const StdStrBuf & | GetName () const |
C4KeyScope | GetScope () const |
unsigned int | GetPriority () const |
bool | IsCodeMatched (const C4KeyCodeEx &key) const |
void | Update (const C4CustomKey *pByKey) |
bool | Execute (C4KeyEventType eEv, C4KeyCodeEx key) |
bool | IsDown () const |
void | KillCallbacks (const C4CustomKey *pOfKey) |
void | CompileFunc (StdCompiler *pComp) |
Public Attributes | |
CBVec | vecCallbacks |
Protected Member Functions | |
C4CustomKey (const C4KeyCodeEx &DefCode, const char *szName, C4KeyScope Scope, C4KeyboardCallbackInterface *pCallback, unsigned int uiPriority=PRIO_Base) | |
C4CustomKey (CodeList rDefCodes, const char *szName, C4KeyScope Scope, C4KeyboardCallbackInterface *pCallback, unsigned int uiPriority=PRIO_Base) | |
Protected Attributes | |
int | iRef |
Friends | |
class | C4Game |
Definition at line 418 of file C4KeyboardInput.h.
typedef std::vector<C4KeyCodeEx> C4CustomKey::CodeList |
Definition at line 421 of file C4KeyboardInput.h.
Enumerator | |
---|---|
PRIO_None | |
PRIO_Base | |
PRIO_Dlg | |
PRIO_Ctrl | |
PRIO_CtrlOverride | |
PRIO_FocusCtrl | |
PRIO_Context | |
PRIO_PlrControl | |
PRIO_MoreThanMax |
Definition at line 433 of file C4KeyboardInput.h.
|
protected |
Definition at line 619 of file C4KeyboardInput.cpp.
References StdStrBuf::Copy(), C4KeyCodeEx::Key, KEY_Default, C4KeyboardCallbackInterface::pOriginalKey, C4KeyboardCallbackInterface::Ref(), and vecCallbacks.
|
protected |
Definition at line 634 of file C4KeyboardInput.cpp.
References StdStrBuf::Copy(), C4KeyboardCallbackInterface::pOriginalKey, C4KeyboardCallbackInterface::Ref(), and vecCallbacks.
C4CustomKey::C4CustomKey | ( | const C4CustomKey & | rCpy, |
bool | fCopyCallbacks | ||
) |
Definition at line 647 of file C4KeyboardInput.cpp.
References StdStrBuf::Copy(), GetName(), and vecCallbacks.
|
virtual |
void C4CustomKey::CompileFunc | ( | StdCompiler * | pComp | ) |
Definition at line 705 of file C4KeyboardInput.cpp.
References StdStrBuf::getData(), mkNamingAdapt(), mkSTLContainerAdapt(), and StdCompiler::Value().
|
inline |
Definition at line 457 of file C4KeyboardInput.h.
References iRef.
Referenced by C4KeyboardInput::RegisterKey(), and C4KeyboardInput::UnregisterKey().
bool C4CustomKey::Execute | ( | C4KeyEventType | eEv, |
C4KeyCodeEx | key | ||
) |
Definition at line 710 of file C4KeyboardInput.cpp.
References KEYEV_Down, and vecCallbacks.
Referenced by C4KeyboardInput::DoInput().
|
inline |
Definition at line 459 of file C4KeyboardInput.h.
Referenced by C4KeyboardInput::GetKeyCodeNameByKeyName(), IsCodeMatched(), C4KeyboardInput::RegisterKey(), and C4KeyboardInput::UnregisterKey().
|
inline |
Definition at line 460 of file C4KeyboardInput.h.
Referenced by C4CustomKey(), C4KeyboardInput::RegisterKey(), and C4KeyboardInput::UnregisterKeyBinding().
|
inline |
Definition at line 462 of file C4KeyboardInput.h.
Referenced by C4KeyboardInput::DoInput().
|
inline |
Definition at line 461 of file C4KeyboardInput.h.
Referenced by C4KeyboardInput::DoInput().
bool C4CustomKey::IsCodeMatched | ( | const C4KeyCodeEx & | key | ) | const |
Definition at line 668 of file C4KeyboardInput.cpp.
References GetCodes().
Referenced by C4KeyboardInput::DoInput().
|
inline |
Definition at line 468 of file C4KeyboardInput.h.
Referenced by C4KeyboardInput::DoInput().
void C4CustomKey::KillCallbacks | ( | const C4CustomKey * | pOfKey | ) |
Definition at line 693 of file C4KeyboardInput.cpp.
References C4KeyboardCallbackInterface::Deref(), and vecCallbacks.
Referenced by C4KeyboardInput::UnregisterKeyBinding().
|
inline |
Definition at line 456 of file C4KeyboardInput.h.
References iRef.
Referenced by C4KeyBinding::C4KeyBinding(), and C4KeyboardInput::RegisterKey().
void C4CustomKey::Update | ( | const C4CustomKey * | pByKey | ) |
Definition at line 677 of file C4KeyboardInput.cpp.
References KEYSCOPE_None, PRIO_None, and vecCallbacks.
Referenced by C4KeyboardInput::RegisterKey().
|
friend |
Definition at line 450 of file C4KeyboardInput.h.
|
protected |
Definition at line 447 of file C4KeyboardInput.h.
Referenced by Deref(), Ref(), and C4KeyBinding::~C4KeyBinding().
CBVec C4CustomKey::vecCallbacks |
Definition at line 431 of file C4KeyboardInput.h.
Referenced by C4CustomKey(), Execute(), KillCallbacks(), Update(), and ~C4CustomKey().