diff options
Diffstat (limited to 'indra/newview/llnearbychatbar.h')
-rw-r--r-- | indra/newview/llnearbychatbar.h | 75 |
1 files changed, 12 insertions, 63 deletions
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index efddec942f..e9734899b3 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -27,85 +27,25 @@ #ifndef LL_LLNEARBYCHATBAR_H #define LL_LLNEARBYCHATBAR_H -#include "llpanel.h" +#include "llfloater.h" #include "llcombobox.h" #include "llgesturemgr.h" #include "llchat.h" #include "llvoiceclient.h" #include "lloutputmonitorctrl.h" #include "llspeakers.h" -#include "llbottomtray.h" - -class LLGestureComboList - : public LLGestureManagerObserver - , public LLUICtrl -{ -public: - struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> - { - Optional<LLBottomtrayButton::Params> combo_button; - Optional<LLScrollListCtrl::Params> combo_list; - Optional<bool> get_more, - view_all; - - Params(); - }; - -protected: - - friend class LLUICtrlFactory; - LLGestureComboList(const Params&); - std::vector<LLMultiGesture*> mGestures; - std::string mLabel; - bool mShowViewAll; - bool mShowGetMore; - LLSD::Integer mViewAllItemIndex; - LLSD::Integer mGetMoreItemIndex; - -public: - - ~LLGestureComboList(); - - LLCtrlListInterface* getListInterface(); - virtual void showList(); - virtual void hideList(); - virtual BOOL handleKeyHere(KEY key, MASK mask); - - virtual void draw(); - - S32 getCurrentIndex() const; - void onItemSelected(const LLSD& data); - void sortByName(bool ascending = true); - void refreshGestures(); - void onCommitGesture(); - void onButtonCommit(); - virtual LLSD getValue() const; - - // LLGestureManagerObserver trigger - virtual void changed() { refreshGestures(); } - -private: - - LLButton* mButton; - LLScrollListCtrl* mList; - S32 mLastSelectedIndex; -}; - -class LLNearbyChatBar -: public LLPanel +class LLNearbyChatBar : public LLFloater { public: // constructor for inline chat-bars (e.g. hosted in chat history window) - LLNearbyChatBar(); + LLNearbyChatBar(const LLSD& key); ~LLNearbyChatBar() {} virtual BOOL postBuild(); static LLNearbyChatBar* getInstance(); - static bool instanceExists(); - LLLineEditor* getChatBox() { return mChatBox; } virtual void draw(); @@ -119,6 +59,9 @@ public: static void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate); static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate); + void showHistory(); + /*virtual*/void setMinimized(BOOL b); + protected: static BOOL matchChatTypeTrigger(const std::string& in_str, std::string* out_str); static void onChatBoxKeystroke(LLLineEditor* caller, void* userdata); @@ -129,6 +72,10 @@ protected: void onChatBoxCommit(); void onChatFontChange(LLFontGL* fontp); + /* virtual */ bool applyRectControl(); + + void onToggleNearbyChatPanel(); + static LLWString stripChannelNumber(const LLWString &mesg, S32* channel); EChatType processChatTypeTriggers(EChatType type, std::string &str); @@ -140,6 +87,8 @@ protected: LLLineEditor* mChatBox; LLOutputMonitorCtrl* mOutputMonitor; LLLocalSpeakerMgr* mSpeakerMgr; + + S32 mExpandedHeight; }; #endif |