diff options
Diffstat (limited to 'indra/newview/llnearbychatbar.h')
-rw-r--r-- | indra/newview/llnearbychatbar.h | 63 |
1 files changed, 37 insertions, 26 deletions
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index b902ff86cc..dd467d7978 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -37,40 +37,61 @@ #include "llcombobox.h" #include "llgesturemgr.h" #include "llchat.h" -#include "llchiclet.h" #include "llvoiceclient.h" #include "lloutputmonitorctrl.h" -#include "llfloateractivespeakers.h" +#include "llspeakers.h" -class LLGestureComboBox - : public LLComboBox - , public LLGestureManagerObserver + +class LLGestureComboList + : public LLGestureManagerObserver + , public LLUICtrl { public: - struct Params : public LLInitParam::Block<Params, LLComboBox::Params> { }; + struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> + { + Optional<LLButton::Params> combo_button; + Optional<LLScrollListCtrl::Params> combo_list; + + Params(); + }; + protected: - LLGestureComboBox(const Params&); + friend class LLUICtrlFactory; + LLGestureComboList(const Params&); + std::vector<LLMultiGesture*> mGestures; + std::string mLabel; + LLSD::Integer mViewAllItemIndex; + public: - ~LLGestureComboBox(); + ~LLGestureComboList(); + + LLCtrlListInterface* getListInterface() { return (LLCtrlListInterface*)mList; }; + virtual void showList(); + virtual void hideList(); + virtual BOOL handleKeyHere(KEY key, MASK mask); + + S32 getCurrentIndex() const; + void onItemSelected(const LLSD& data); + void sortByName(bool ascending = true); void refreshGestures(); void onCommitGesture(); - virtual void draw(); + void onButtonCommit(); + virtual LLSD getValue() const; // LLGestureManagerObserver trigger virtual void changed() { refreshGestures(); } -protected: - LLFrameTimer mGestureLabelTimer; - std::vector<LLMultiGesture*> mGestures; - std::string mLabel; - LLSD::Integer mViewAllItemIndex; +private: + + LLButton* mButton; + LLScrollListCtrl* mList; + S32 mLastSelectedIndex; }; class LLNearbyChatBar : public LLPanel -, public LLVoiceClientStatusObserver { public: // constructor for inline chat-bars (e.g. hosted in chat history window) @@ -90,21 +111,12 @@ public: std::string getCurrentChat(); virtual BOOL handleKeyHere( KEY key, MASK mask ); - void setPTTState(bool state); static void startChat(const char* line); static void stopChat(); static void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate); static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate); - S32 getMinWidth() const; - S32 getMaxWidth() const; - - /** - * Implements LLVoiceClientStatusObserver::onChange() - */ - /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal); - protected: static BOOL matchChatTypeTrigger(const std::string& in_str, std::string* out_str); static void onChatBoxKeystroke(LLLineEditor* caller, void* userdata); @@ -122,9 +134,8 @@ protected: static S32 sLastSpecialChatChannel; LLLineEditor* mChatBox; - LLTalkButton* mTalkBtn; LLOutputMonitorCtrl* mOutputMonitor; - LLActiveSpeakerMgr mSpeakerMgr; + LLLocalSpeakerMgr* mSpeakerMgr; }; #endif |