aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llchatbar.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:46 -0500
committerJacek Antonelli2008-08-15 23:44:46 -0500
commit38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch)
treeadca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/newview/llchatbar.h
parentREADME.txt (diff)
downloadmeta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz
Second Life viewer sources 1.13.2.12
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llchatbar.h117
1 files changed, 117 insertions, 0 deletions
diff --git a/linden/indra/newview/llchatbar.h b/linden/indra/newview/llchatbar.h
new file mode 100644
index 0000000..0af5469
--- /dev/null
+++ b/linden/indra/newview/llchatbar.h
@@ -0,0 +1,117 @@
1/**
2 * @file llchatbar.h
3 * @brief LLChatBar class definition
4 *
5 * Copyright (c) 2002-2007, Linden Research, Inc.
6 *
7 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement
10 * ("Other License"), formally executed by you and Linden Lab. Terms of
11 * the GPL can be found in doc/GPL-license.txt in this distribution, or
12 * online at http://secondlife.com/developers/opensource/gplv2
13 *
14 * There are special exceptions to the terms and conditions of the GPL as
15 * it is applied to this Source Code. View the full text of the exception
16 * in the file doc/FLOSS-exception.txt in this software distribution, or
17 * online at http://secondlife.com/developers/opensource/flossexception
18 *
19 * By copying, modifying or distributing this software, you acknowledge
20 * that you have read and understood your obligations described above,
21 * and agree to abide by those obligations.
22 *
23 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
24 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
25 * COMPLETENESS OR PERFORMANCE.
26 */
27
28#ifndef LL_LLCHATBAR_H
29#define LL_LLCHATBAR_H
30
31#include "llpanel.h"
32#include "llframetimer.h"
33#include "llchat.h"
34
35class LLButton;
36class LLComboBox;
37class LLLineEditor;
38class LLMessageSystem;
39class LLTextBox;
40class LLTextEditor;
41class LLUICtrl;
42class LLUUID;
43class LLFrameTimer;
44class LLStatGraph;
45class LLChatBarGestureObserver;
46
47class LLChatBar
48: public LLPanel
49{
50public:
51 LLChatBar(const std::string& name, const LLRect& rect );
52 ~LLChatBar();
53 virtual BOOL postBuild();
54
55 virtual void reshape(S32 width, S32 height, BOOL called_from_parent);
56 virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent);
57
58 // Adjust buttons and input field for width
59 void layout();
60
61 void refresh();
62 void refreshGestures();
63
64 // Move cursor into chat input field.
65 void setKeyboardFocus(BOOL b);
66
67 // Ignore arrow keys for chat bar
68 void setIgnoreArrowKeys(BOOL b);
69
70 BOOL inputEditorHasFocus();
71 LLString getCurrentChat();
72
73 // Send a chat (after stripping /20foo channel chats).
74 // "Animate" means the nodding animation for regular text.
75 void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate);
76 void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate);
77
78 // If input of the form "/20foo" or "/20 foo", returns "foo" and channel 20.
79 // Otherwise returns input and channel 0.
80 LLWString stripChannelNumber(const LLWString &mesg, S32* channel);
81
82 // callbacks
83 static void onClickHistory( void* userdata );
84 static void onClickSay( void* userdata );
85 static void onClickShout( void* userdata );
86
87 static void onTabClick( void* userdata );
88 static void onInputEditorKeystroke(LLLineEditor* caller, void* userdata);
89 static void onInputEditorFocusLost(LLLineEditor* caller,void* userdata);
90 static void onInputEditorGainFocus(LLUICtrl* caller,void* userdata);
91
92 static void onCommitGesture(LLUICtrl* ctrl, void* data);
93
94 static void startChat(void*);
95 static void stopChat();
96
97 /*virtual*/ void setVisible(BOOL visible);
98protected:
99 void sendChat(EChatType type);
100 void updateChat();
101
102protected:
103 LLLineEditor* mInputEditor;
104
105 LLFrameTimer mGestureLabelTimer;
106
107 // Which non-zero channel did we last chat on?
108 S32 mLastSpecialChatChannel;
109
110 BOOL mIsBuilt;
111
112 static LLChatBarGestureObserver* sObserver;
113};
114
115extern LLChatBar *gChatBar;
116
117#endif