PageRenderTime 384ms CodeModel.GetById 201ms app.highlight 4ms RepoModel.GetById 177ms app.codeStats 1ms

/indra/newview/llpanelavatartag.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 87 lines | 33 code | 12 blank | 42 comment | 0 complexity | 67217aaf46a8efba489220d412baa06d MD5 | raw file
 1/** 
 2 * @file llpanelavatartag.h
 3 * @brief Avatar row panel
 4 *
 5 * $LicenseInfo:firstyear=2009&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_LLPANELAVATARTAG_H
28#define LL_LLPANELAVATARTAG_H
29
30#include "llpanel.h"
31#include "llavatarpropertiesprocessor.h"
32
33class LLAvatarIconCtrl;
34class LLTextBox;
35
36/**
37 * Avatar Tag panel.
38 * 
39 * Test.
40 * 
41 * Contains avatar name 
42 * Provide methods for setting avatar id, state, muted status and speech power.
43 */ 
44class LLPanelAvatarTag : public LLPanel
45{
46public:
47	LLPanelAvatarTag(const LLUUID& key, const std::string im_time);
48	virtual ~LLPanelAvatarTag();
49	
50	/**
51	 * Set avatar ID.
52	 * 
53	 * After the ID is set, it is possible to track the avatar status and get its name.
54	 */
55	void 			setAvatarId(const LLUUID& avatar_id);
56	void            setTime    (const std::string& time);
57
58	const LLUUID&	getAvatarId() const	{ return mAvatarId; }
59
60	/*virtual*/ BOOL postBuild();
61	/*virtual*/ void draw();	
62	
63	virtual boost::signals2::connection setLeftButtonClickCallback(
64																   const commit_callback_t& cb);
65	virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask);
66
67	void onClick();
68private:
69	void setName(const std::string& name);
70
71	/**
72	 * Called by LLCacheName when the avatar name gets updated.
73	 */
74	void nameUpdatedCallback(
75		const LLUUID& id,
76		const std::string& first,
77		const std::string& last,
78		BOOL is_group);
79	
80	LLAvatarIconCtrl*		mIcon;			/// status tracking avatar icon
81	LLTextBox*				mName;			/// displays avatar name
82	LLTextBox*				mTime;			/// displays time
83	LLUUID					mAvatarId;
84//	LLFrameTimer			mFadeTimer;
85};
86
87#endif