PageRenderTime 293ms CodeModel.GetById 181ms app.highlight 5ms RepoModel.GetById 105ms app.codeStats 0ms

/indra/newview/llfloaterproperties.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 98 lines | 47 code | 18 blank | 33 comment | 0 complexity | e06b6087fc0ef7d3c6262eee3f140383 MD5 | raw file
 1/** 
 2 * @file llfloaterproperties.h
 3 * @brief A floater which shows an inventory item's properties.
 4 *
 5 * $LicenseInfo:firstyear=2002&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_LLFLOATERPROPERTIES_H
28#define LL_LLFLOATERPROPERTIES_H
29
30#include <map>
31#include "llmultifloater.h"
32#include "lliconctrl.h"
33
34//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35// Class LLFloaterProperties
36//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37
38class LLButton;
39class LLCheckBoxCtrl;
40class LLInventoryItem;
41class LLLineEditor;
42class LLRadioGroup;
43class LLTextBox;
44
45class LLPropertiesObserver;
46
47class LLFloaterProperties : public LLFloater
48{
49public:
50	LLFloaterProperties(const LLUUID& item_id);
51	/*virtual*/ ~LLFloaterProperties();
52	
53	/*virtual*/ BOOL postBuild();
54	/*virtual*/ void onOpen(const LLSD& key);
55	void setObjectID(const LLUUID& object_id) { mObjectID = object_id; }
56
57	void dirty() { mDirty = TRUE; }
58	void refresh();
59	
60	static void dirtyAll();
61	
62protected:
63	// ui callbacks
64	void onClickCreator();
65	void onClickOwner();
66	void onCommitName();
67	void onCommitDescription();
68	void onCommitPermissions();
69	void onCommitSaleInfo();
70	void onCommitSaleType();
71	void updateSaleInfo();
72
73	LLInventoryItem* findItem() const;
74
75	void refreshFromItem(LLInventoryItem* item);
76	virtual void draw();
77
78protected:
79	// The item id of the inventory item in question.
80	LLUUID mItemID;
81
82	// mObjectID will have a value if it is associated with a task in
83	// the world, and will be == LLUUID::null if it's in the agent
84	// inventory.
85	LLUUID mObjectID;
86
87	BOOL mDirty;
88
89	LLPropertiesObserver* mPropertiesObserver;
90};
91
92class LLMultiProperties : public LLMultiFloater
93{
94public:
95	LLMultiProperties();
96};
97
98#endif // LL_LLFLOATERPROPERTIES_H