PageRenderTime 15ms CodeModel.GetById 11ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llnearbychat.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 83 lines | 34 code | 22 blank | 27 comment | 0 complexity | 44c0224805f40caeea70a1a856717ad1 MD5 | raw file
 1 /** 
 2 * @file llnearbychat.h
 3 * @brief nearby chat history scrolling panel implementation
 4 *
 5 * $LicenseInfo:firstyear=2004&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#ifndef LL_LLNEARBYCHAT_H_
28#define LL_LLNEARBYCHAT_H_
29
30#include "llscrollbar.h"
31#include "llviewerchat.h"
32#include "llfloater.h"
33
34class LLResizeBar;
35class LLChatHistory;
36
37class LLNearbyChat: public LLPanel
38{
39public:
40	LLNearbyChat(const Params& p = LLPanel::getDefaultParams());
41
42	BOOL	postBuild			();
43
44	/** @param archive true - to save a message to the chat history log */
45	void	addMessage			(const LLChat& message,bool archive = true, const LLSD &args = LLSD());	
46	void	onNearbyChatContextMenuItemClicked(const LLSD& userdata);
47	bool	onNearbyChatCheckContextMenuItem(const LLSD& userdata);
48
49	virtual BOOL	handleMouseDown(S32 x, S32 y, MASK mask);
50	virtual void	draw();
51
52	// focus overrides
53	/*virtual*/ void	onFocusLost();
54	/*virtual*/ void	onFocusReceived();
55	
56	/*virtual*/ void	setVisible(BOOL visible);
57	
58	virtual void updateChatHistoryStyle();
59
60	static void processChatHistoryStyleUpdate(const LLSD& newvalue);
61
62	void loadHistory();
63
64	static LLNearbyChat* getInstance();
65	void removeScreenChat();
66
67private:
68
69	void	getAllowedRect		(LLRect& rect);
70
71	void	onNearbySpeakers	();
72
73
74private:
75	LLHandle<LLView>	mPopupMenuHandle;
76	LLChatHistory*		mChatHistory;
77
78	std::vector<LLChat> mMessageArchive;
79};
80
81#endif
82
83