diff options
Diffstat (limited to 'indra/newview/llbottomtray.h')
-rw-r--r-- | indra/newview/llbottomtray.h | 57 |
1 files changed, 40 insertions, 17 deletions
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 0d477122d1..1d4e271f80 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -37,20 +37,40 @@ #include "llimview.h" #include "llchat.h" #include "llgesturemgr.h" +#include "llcombobox.h" class LLChicletPanel; class LLNotificationChiclet; class LLTalkButton; -class LLComboBox; -class LLBottomTray - : public LLPanel - , public LLIMSessionObserver +class LLGestureComboBox + : public LLComboBox , public LLGestureManagerObserver { +protected: + LLGestureComboBox(const LLComboBox::Params&); + friend class LLUICtrlFactory; public: - LLBottomTray(); + ~LLGestureComboBox(); + + void refreshGestures(); + void onCommitGesture(LLUICtrl* ctrl); + virtual void draw(); + + // LLGestureManagerObserver trigger + virtual void changed() { refreshGestures(); } + +protected: + LLFrameTimer mGestureLabelTimer; +}; +class LLBottomTray + : public LLUISingleton<LLBottomTray> + , public LLPanel + , public LLIMSessionObserver +{ + friend class LLUISingleton<LLBottomTray>; +public: ~LLBottomTray(); LLLineEditor* getChatBox() {return mChatBox;} @@ -59,12 +79,14 @@ public: LLNotificationChiclet* getSysWell() {return mSysWell;} void onChatBoxCommit(); - void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate); - void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate); + static void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate); + static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate); static void onChatBoxKeystroke(LLLineEditor* caller, void* userdata); static void onChatBoxFocusLost(LLFocusableElement* caller, void* userdata); - void refresh(); + BOOL inputEditorHasFocus(); + std::string getCurrentChat(); + /*virtual*/void draw(); void refreshStandUp(); void updateRightPosition(const S32 new_right_position); @@ -77,33 +99,34 @@ public: virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id); virtual void sessionRemoved(const LLUUID& session_id); - // LLGestureManagerObserver trigger - virtual void changed() { refreshGestures(); } - virtual void onFocusLost(); virtual BOOL handleKeyHere(KEY key, MASK mask); virtual void setVisible(BOOL visible); + static void startChat(const char* line); + static void stopChat(); + protected: + LLBottomTray(const LLSD& key = LLSD()); + void sendChat( EChatType type ); - LLWString stripChannelNumber(const LLWString &mesg, S32* channel); + static LLWString stripChannelNumber(const LLWString &mesg, S32* channel); void onChicletClick(LLUICtrl* ctrl); + void setChicletPanelVisible(bool visible); + // Which non-zero channel did we last chat on? - S32 mLastSpecialChatChannel; + static S32 mLastSpecialChatChannel; LLLineEditor* mChatBox; LLChicletPanel* mChicletPanel; LLNotificationChiclet* mIMWell; LLNotificationChiclet* mSysWell; LLTalkButton* mTalkBtn; - LLComboBox* mGestureCombo; - LLFrameTimer mGestureLabelTimer; + LLGestureComboBox* mGestureCombo; LLButton* mStandUpBtn; }; -extern LLBottomTray* gBottomTray; - #endif // LL_LLBOTTOMPANEL_H |