PageRenderTime 269ms CodeModel.GetById 180ms app.highlight 6ms RepoModel.GetById 82ms app.codeStats 0ms

/indra/newview/llchatitemscontainerctrl.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 97 lines | 47 code | 22 blank | 28 comment | 0 complexity | 9e7febd987d193466778225aca83f811 MD5 | raw file
 1/** 
 2 * @file llchatitemscontainerctrl.h
 3 * @brief 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_LLCHATITEMSCONTAINERCTRL_H_
28#define LL_LLCHATITEMSCONTAINERCTRL_H_
29
30#include "llchat.h"
31#include "llpanel.h"
32#include "llscrollbar.h"
33#include "llviewerchat.h"
34#include "lltoastpanel.h"
35
36typedef enum e_show_item_header
37{
38	CHATITEMHEADER_SHOW_ONLY_NAME = 0,
39	CHATITEMHEADER_SHOW_ONLY_ICON = 1,
40	CHATITEMHEADER_SHOW_BOTH
41} EShowItemHeader;
42
43class LLNearbyChatToastPanel: public LLToastPanelBase
44{
45protected:
46        LLNearbyChatToastPanel()
47		: 
48	mIsDirty(false),
49	mSourceType(CHAT_SOURCE_OBJECT)
50	{};
51public:
52	~LLNearbyChatToastPanel(){}
53	
54	static LLNearbyChatToastPanel* createInstance();
55
56	const LLUUID& getFromID() const { return mFromID;}
57	const std::string& getFromName() const { return mFromName; }
58	
59	//void	addText		(const std::string& message ,  const LLStyle::Params& input_params = LLStyle::Params());
60	//void	setMessage	(const LLChat& msg);
61	void	snapToMessageHeight	();
62
63	bool	canAddText	();
64
65	void	onMouseLeave	(S32 x, S32 y, MASK mask);
66	void	onMouseEnter	(S32 x, S32 y, MASK mask);
67	BOOL	handleMouseDown	(S32 x, S32 y, MASK mask);
68	BOOL	handleMouseUp	(S32 x, S32 y, MASK mask);
69
70	virtual BOOL postBuild();
71
72	void	reshape		(S32 width, S32 height, BOOL called_from_parent = TRUE);
73
74	void	setHeaderVisibility(EShowItemHeader e);
75	BOOL	handleRightMouseDown(S32 x, S32 y, MASK mask);
76
77	virtual void init(LLSD& data);
78	virtual void addMessage(LLSD& data);
79
80	virtual void draw();
81
82	//*TODO REMOVE, why a dup of getFromID?
83	const LLUUID&	messageID() const { return mFromID;}
84private:
85	LLUUID			mFromID;	// agent id or object id
86	std::string		mFromName;
87	EChatSourceType	mSourceType;
88	
89
90
91	bool mIsDirty;
92};
93
94
95#endif
96
97