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

/indra/newview/llpanelprofile.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 102 lines | 48 code | 24 blank | 30 comment | 0 complexity | 67696084665804b886206a24679e013e MD5 | raw file
  1/** 
  2* @file llpanelprofile.h
  3* @brief Profile 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_LLPANELPROFILE_H
 28#define LL_LLPANELPROFILE_H
 29
 30#include "llpanel.h"
 31#include "llpanelavatar.h"
 32
 33class LLTabContainer;
 34
 35std::string getProfileURL(const std::string& agent_name);
 36
 37/**
 38* Base class for Profile View and My Profile.
 39*/
 40class LLPanelProfile : public LLPanel
 41{
 42	LOG_CLASS(LLPanelProfile);
 43
 44public:
 45	/*virtual*/ BOOL postBuild();
 46	/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
 47	/*virtual*/ void onOpen(const LLSD& key);
 48
 49	virtual void openPanel(LLPanel* panel, const LLSD& params);
 50
 51	virtual void closePanel(LLPanel* panel);
 52
 53	S32 notifyParent(const LLSD& info);
 54
 55protected:
 56
 57	LLPanelProfile();
 58
 59	virtual void onTabSelected(const LLSD& param);
 60
 61	const LLUUID& getAvatarId() { return mAvatarId; }
 62
 63	void setAvatarId(const LLUUID& avatar_id) { mAvatarId = avatar_id; }
 64
 65	typedef std::map<std::string, LLPanelProfileTab*> profile_tabs_t;
 66
 67	profile_tabs_t& getTabContainer() { return mTabContainer; }
 68
 69private:
 70
 71	//-- ChildStack begins ----------------------------------------------------
 72	class ChildStack
 73	{
 74		LOG_CLASS(LLPanelProfile::ChildStack);
 75	public:
 76		ChildStack();
 77		~ChildStack();
 78		void setParent(LLPanel* parent);
 79
 80		bool push();
 81		bool pop();
 82		void preParentReshape();
 83		void postParentReshape();
 84
 85	private:
 86		void dump();
 87
 88		typedef LLView::child_list_t view_list_t;
 89		typedef std::list<view_list_t> stack_t;
 90
 91		stack_t		mStack;
 92		stack_t		mSavedStack;
 93		LLPanel*	mParent;
 94	};
 95	//-- ChildStack ends ------------------------------------------------------
 96
 97	profile_tabs_t mTabContainer;
 98	ChildStack		mChildStack;
 99	LLUUID mAvatarId;
100};
101
102#endif //LL_LLPANELPROFILE_H