diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-12-14 14:12:01 -0600 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2023-12-14 14:12:01 -0600 |
commit | 3c858d7e2d6633df14df473a918d2fb848403972 (patch) | |
tree | 62b36692a0c1df2f34a85bc7fd4111afb2737d81 /indra/llui/llurlentry.h | |
parent | 8b86e2ad1b1326cb3e98acd857dc93f4f1455b8c (diff) | |
parent | 32de0cb67d824498d0fc9d489ce19731ebfddfdf (diff) |
Merge branch 'DRTVWR-601' of github.com:secondlife/viewer into DRTVWR-601
Diffstat (limited to 'indra/llui/llurlentry.h')
-rw-r--r-- | indra/llui/llurlentry.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index 63a1506731..5d0f5479f6 100644 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -550,4 +550,37 @@ public: std::string mHostPath; }; +class LLKeyBindingToStringHandler; + +/// +/// LLUrlEntryKeybinding A way to access keybindings and show currently used one in text. +/// secondlife:///app/keybinding/control_name +class LLUrlEntryKeybinding: public LLUrlEntryBase +{ +public: + LLUrlEntryKeybinding(); + /*virtual*/ std::string getLabel(const std::string& url, const LLUrlLabelCallback& cb); + /*virtual*/ std::string getTooltip(const std::string& url) const; + void setHandler(LLKeyBindingToStringHandler* handler) {pHandler = handler;} +private: + std::string getControlName(const std::string& url) const; + std::string getMode(const std::string& url) const; + void initLocalization(); + void initLocalizationFromFile(const std::string& filename); + + struct LLLocalizationData + { + LLLocalizationData() {} + LLLocalizationData(const std::string& localization, const std::string& tooltip) + : mLocalization(localization) + , mTooltip(tooltip) + {} + std::string mLocalization; + std::string mTooltip; + }; + + std::map<std::string, LLLocalizationData> mLocalizations; + LLKeyBindingToStringHandler* pHandler; +}; + #endif |