00001
00032 #ifndef LL_LLCHATBAR_H
00033 #define LL_LLCHATBAR_H
00034
00035 #include "llpanel.h"
00036 #include "llframetimer.h"
00037 #include "llchat.h"
00038
00039 class LLLineEditor;
00040 class LLMessageSystem;
00041 class LLUICtrl;
00042 class LLUUID;
00043 class LLFrameTimer;
00044 class LLChatBarGestureObserver;
00045 class LLComboBox;
00046
00047 class LLChatBar
00048 : public LLPanel
00049 {
00050 public:
00051
00052 LLChatBar();
00053 ~LLChatBar();
00054 virtual BOOL postBuild();
00055
00056 virtual BOOL handleKeyHere(KEY key, MASK mask);
00057
00058 void refresh();
00059 void refreshGestures();
00060
00061
00062 void setKeyboardFocus(BOOL b);
00063
00064
00065 void setIgnoreArrowKeys(BOOL b);
00066
00067 BOOL inputEditorHasFocus();
00068 LLString getCurrentChat();
00069
00070
00071
00072 void setGestureCombo(LLComboBox* combo);
00073
00074
00075
00076 void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate);
00077 void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate);
00078
00079
00080
00081 LLWString stripChannelNumber(const LLWString &mesg, S32* channel);
00082
00083
00084 static void onClickSay( LLUICtrl*, void* userdata );
00085
00086 static void onTabClick( void* userdata );
00087 static void onInputEditorKeystroke(LLLineEditor* caller, void* userdata);
00088 static void onInputEditorFocusLost(LLFocusableElement* caller,void* userdata);
00089 static void onInputEditorGainFocus(LLFocusableElement* caller,void* userdata);
00090
00091 static void onCommitGesture(LLUICtrl* ctrl, void* data);
00092
00093 static void startChat(const char* line);
00094 static void stopChat();
00095
00096 protected:
00097 void sendChat(EChatType type);
00098 void updateChat();
00099
00100 protected:
00101 LLLineEditor* mInputEditor;
00102
00103 LLFrameTimer mGestureLabelTimer;
00104
00105
00106 S32 mLastSpecialChatChannel;
00107
00108 BOOL mIsBuilt;
00109 LLComboBox* mGestureCombo;
00110
00111 LLChatBarGestureObserver* mObserver;
00112 };
00113
00114 extern LLChatBar *gChatBar;
00115
00116 #endif