PageRenderTime 626ms CodeModel.GetById 244ms app.highlight 8ms RepoModel.GetById 231ms app.codeStats 0ms

/indra/newview/llpanelplaceinfo.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 128 lines | 66 code | 22 blank | 40 comment | 0 complexity | 08abb1ec6f29ce73aa1cb78e254c4442 MD5 | raw file
  1/** 
  2 * @file llpanelplaceinfo.h
  3 * @brief Base class for place information in Side Tray.
  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_LLPANELPLACEINFO_H
 28#define LL_LLPANELPLACEINFO_H
 29
 30#include "llpanel.h"
 31
 32#include "v3dmath.h"
 33#include "lluuid.h"
 34
 35#include "llremoteparcelrequest.h"
 36
 37class LLAvatarName;
 38class LLExpandableTextBox;
 39class LLIconCtrl;
 40class LLInventoryItem;
 41class LLPanelPickEdit;
 42class LLParcel;
 43class LLScrollContainer;
 44class LLTextBox;
 45class LLTextureCtrl;
 46class LLViewerRegion;
 47class LLViewerInventoryCategory;
 48
 49class LLPanelPlaceInfo : public LLPanel, LLRemoteParcelInfoObserver
 50{
 51public:
 52	enum EInfoType
 53	{
 54		UNKNOWN,
 55
 56		AGENT,
 57		CREATE_LANDMARK,
 58		LANDMARK,
 59		PLACE,
 60		TELEPORT_HISTORY
 61	};
 62
 63	LLPanelPlaceInfo();
 64	/*virtual*/ ~LLPanelPlaceInfo();
 65
 66	/*virtual*/ BOOL postBuild();
 67
 68	// Ignore all old location information, useful if you are 
 69	// recycling an existing dialog and need to clear it.
 70	virtual void resetLocation();
 71
 72	// Sends a request for data about the given parcel, which will
 73	// only update the location if there is none already available.
 74	/*virtual*/ void setParcelID(const LLUUID& parcel_id);
 75
 76	// Depending on how the panel was triggered
 77	// (from landmark or current location, or other)
 78	// sets a corresponding title and contents.
 79	virtual void setInfoType(EInfoType type);
 80
 81	// Requests remote parcel info by parcel ID.
 82	void sendParcelInfoRequest();
 83
 84	// Displays information about a remote parcel.
 85	// Sends a request to the server.
 86	void displayParcelInfo(const LLUUID& region_id,
 87						   const LLVector3d& pos_global);
 88
 89	/*virtual*/ void setErrorStatus(U32 status, const std::string& reason);
 90
 91	/*virtual*/ void processParcelInfo(const LLParcelData& parcel_data);
 92
 93	/*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
 94
 95	// Create a pick for the location specified
 96	// by global_pos.
 97	void createPick(const LLVector3d& pos_global, LLPanelPickEdit* pick_panel);
 98
 99protected:
100	static void onNameCache(LLTextBox* text, const std::string& full_name);
101	static void onAvatarNameCache(const LLUUID& agent_id,
102								  const LLAvatarName& av_name,
103								  LLTextBox* text);
104
105	/**
106	 * mParcelID is valid only for remote places, in other cases it's null. See resetLocation() 
107	 */
108	LLUUID					mParcelID;
109	LLUUID					mRequestedID;
110	LLVector3				mPosRegion;
111	std::string				mParcelTitle; // used for pick title without coordinates
112	std::string				mCurrentTitle;
113	S32						mScrollingPanelMinHeight;
114	S32						mScrollingPanelWidth;
115	EInfoType 				mInfoType;
116
117	LLScrollContainer*		mScrollContainer;
118	LLPanel*				mScrollingPanel;
119	LLTextBox*				mTitle;
120	LLTextureCtrl*			mSnapshotCtrl;
121	LLTextBox*				mRegionName;
122	LLTextBox*				mParcelName;
123	LLExpandableTextBox*	mDescEditor;
124	LLIconCtrl*				mMaturityRatingIcon;
125	LLTextBox*				mMaturityRatingText;
126};
127
128#endif // LL_LLPANELPLACEINFO_H