PageRenderTime 149ms CodeModel.GetById 137ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llfloaterchat.h

https://bitbucket.org/lindenlab/viewer-beta/
C Header | 78 lines | 31 code | 14 blank | 33 comment | 0 complexity | 8854f1835997475d61c352e0721c8706 MD5 | raw file
 1/** 
 2 * @file llfloaterchat.h
 3 * @brief LLFloaterChat class definition
 4 *
 5 * $LicenseInfo:firstyear=2002&license=viewerlgpl$
 6 * Second Life Viewer Source Code
 7 * Copyright (C) 2010, Linden Research, Inc.
 8 * 
 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation;
12 * version 2.1 of the License only.
13 * 
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 * Lesser General Public License for more details.
18 * 
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
22 * 
23 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
24 * $/LicenseInfo$
25 */
26
27/*
28 * Actually the "Chat History" floater.
29 * Should be llfloaterchathistory, not llfloaterchat.
30 */
31
32#ifndef LL_LLFLOATERCHAT_H
33#define LL_LLFLOATERCHAT_H
34
35#include "llfloater.h"
36#include "lllogchat.h"
37
38class LLChat;
39class LLPanelActiveSpeakers;
40class LLLogChat;
41
42class LLFloaterChat : public LLFloater
43{
44public:
45	LLFloaterChat(const LLSD& seed);
46	~LLFloaterChat();
47
48	virtual void draw();
49	virtual BOOL postBuild();
50
51	void updateConsoleVisibility();
52
53	static void setHistoryCursorAndScrollToEnd();
54
55	//  *TODO:Skinning - move these to LLChat (or LLViewerChat?)
56	// Add chat to console and history list.
57	// Color based on source, type, distance.
58	static void addChat(const LLChat& chat, BOOL local_agent = FALSE);
59	// Add chat to history alone.
60	static void addChatHistory(const LLChat& chat, bool log_to_file = true);
61	
62	static void triggerAlerts(const std::string& text);
63
64	static void onClickMute(void *data);
65	static void onClickToggleShowMute(LLUICtrl* caller, void *data);
66	static void onClickToggleActiveSpeakers(void* userdata);
67	static void chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& line, void* userdata);
68	static void loadHistory();
69	static void* createSpeakersPanel(void* data);
70	static void* createChatPanel(void* data);
71	
72	static LLFloaterChat* getInstance(); // *TODO:Skinning Deprecate
73	
74	LLPanelActiveSpeakers* mPanel;
75	BOOL mScrolledToEnd;
76};
77
78#endif