summaryrefslogtreecommitdiff
path: root/indra/newview/llfloateremojipicker.h
diff options
context:
space:
mode:
authorAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2023-04-19 01:39:42 +0200
committerAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2023-04-20 03:55:02 +0200
commit97b0ba2a6d2596da867043077e32065653d44f6e (patch)
tree896599c3ab441be09998b0e58b40bde6700cfdbd /indra/newview/llfloateremojipicker.h
parent8dad411e9055c32a753e575ccd6142073eb27aae (diff)
SL-19575 LLFloaterEmojiPicker - Add filter by category
Diffstat (limited to 'indra/newview/llfloateremojipicker.h')
-rw-r--r--indra/newview/llfloateremojipicker.h36
1 files changed, 29 insertions, 7 deletions
diff --git a/indra/newview/llfloateremojipicker.h b/indra/newview/llfloateremojipicker.h
index 9b442064d0..01335bbb5b 100644
--- a/indra/newview/llfloateremojipicker.h
+++ b/indra/newview/llfloateremojipicker.h
@@ -29,31 +29,53 @@
#include "llfloater.h"
+struct LLEmojiDescriptor;
+
class LLFloaterEmojiPicker : public LLFloater
{
public:
// The callback function will be called with an emoji char.
- typedef boost::function<void (llwchar)> select_callback_t;
+ typedef boost::function<void (llwchar)> pick_callback_t;
+ typedef boost::function<void ()> close_callback_t;
// Call this to select an emoji.
static LLFloaterEmojiPicker* getInstance();
- static LLFloaterEmojiPicker* showInstance(select_callback_t callback);
+ static LLFloaterEmojiPicker* showInstance(pick_callback_t pick_callback = nullptr, close_callback_t close_callback = nullptr);
LLFloaterEmojiPicker(const LLSD& key);
virtual ~LLFloaterEmojiPicker();
virtual BOOL postBuild();
- void show(select_callback_t callback);
+ void show(pick_callback_t pick_callback = nullptr, close_callback_t close_callback = nullptr);
+
+ virtual void closeFloater(bool app_quitting = false);
private:
- void onSelect();
+ void fillEmojis();
+ bool matchesCategory(const LLEmojiDescriptor* descr);
+ bool matchesPattern(const LLEmojiDescriptor* descr);
+
+ void onCategoryCommit();
+ void onSearchKeystroke(class LLLineEditor* caller, void* user_data);
+ void onPreviewEmojiClick();
+ void onEmojiSelect();
+ void onEmojiEmpty();
+ void onEmojiPick();
virtual BOOL handleKeyHere(KEY key, MASK mask);
- class LLScrollListCtrl* mEmojis;
- select_callback_t mSelectCallback;
- std::string mEmojiName;
+ class LLComboBox* mCategory { nullptr };
+ class LLLineEditor* mSearch { nullptr };
+ class LLScrollListCtrl* mEmojis { nullptr };
+ class LLButton* mPreviewEmoji { nullptr };
+
+ pick_callback_t mEmojiPickCallback;
+ close_callback_t mFloaterCloseCallback;
+
+ static std::string mSelectedCategory;
+ static std::string mSearchPattern;
+ static int mSelectedEmojiIndex;
};
#endif