summaryrefslogtreecommitdiff
path: root/indra/llcommon/llkeybind.h
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-09-17 21:36:59 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-09-17 21:36:59 +0300
commitc21812bf095de2defa4e61978b2659764c838abf (patch)
tree6851ff2904bad56377e52f8d086e3b9ee0d32eb3 /indra/llcommon/llkeybind.h
parent50719510630768d65c9f00043676f287c58ca110 (diff)
SL-6109 Keyaboard support ready
Diffstat (limited to 'indra/llcommon/llkeybind.h')
-rw-r--r--indra/llcommon/llkeybind.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/indra/llcommon/llkeybind.h b/indra/llcommon/llkeybind.h
index 4fe622fb79..481949f275 100644
--- a/indra/llcommon/llkeybind.h
+++ b/indra/llcommon/llkeybind.h
@@ -34,12 +34,16 @@ class LL_COMMON_API LLKeyData
{
public:
LLKeyData();
+ LLKeyData(EMouseClickType mouse, KEY key, MASK mask);
LLKeyData(const LLSD &key_data);
LLSD asLLSD() const;
bool isEmpty() const;
+ bool empty() const { return isEmpty(); };
void reset();
LLKeyData& operator=(const LLKeyData& rhs);
+ bool operator==(const LLKeyData& rhs);
+ bool operator!=(const LLKeyData& rhs);
EMouseClickType mMouse;
KEY mKey;
@@ -54,7 +58,9 @@ public:
LLKeyBind(const LLSD &key_bind);
bool operator==(const LLKeyBind& rhs);
- bool empty();
+ bool operator!=(const LLKeyBind& rhs);
+ bool isEmpty() const;
+ bool empty() const { return isEmpty(); };
LLSD asLLSD() const;
@@ -62,8 +68,19 @@ public:
bool canHandleKey(KEY key, MASK mask) const;
bool canHandleMouse(EMouseClickType mouse, MASK mask) const;
- LLKeyData mDataPrimary;
- LLKeyData mDataSecondary;
+ // these methods enshure there will be no repeats
+ bool addKeyData(EMouseClickType mouse, KEY key, MASK mask);
+ bool addKeyData(const LLKeyData& data);
+ void replaceKeyData(EMouseClickType mouse, KEY key, MASK mask, U32 index);
+ void replaceKeyData(const LLKeyData& data, U32 index);
+ bool hasKeyData(U32 index) const;
+ void clear() { mData.clear(); };
+ LLKeyData getKeyData(U32 index) const;
+ U32 getDataCount();
+
+private:
+ typedef std::vector<LLKeyData> data_vector_t;
+ data_vector_t mData;
};