PageRenderTime 21ms CodeModel.GetById 13ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/llsidepanelinventorysubpanel.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 75 lines | 32 code | 11 blank | 32 comment | 0 complexity | 803f42807956f73d6ea7352f81a6b257 MD5 | raw file
 1/** 
 2 * @file llsidepanelinventorysubpanel.h
 3 * @brief A panel 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_LLSIDEPANELINVENTORYSUBPANEL_H
28#define LL_LLSIDEPANELINVENTORYSUBPANEL_H
29
30#include "llpanel.h"
31
32//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33// Class LLSidepanelInventorySubpanel
34// Base class for inventory sidepanel panels (e.g. item info, task info).
35//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36
37class LLButton;
38class LLInventoryItem;
39
40class LLSidepanelInventorySubpanel : public LLPanel
41{
42public:
43	LLSidepanelInventorySubpanel(const LLPanel::Params& p = getDefaultParams());
44	virtual ~LLSidepanelInventorySubpanel();
45
46	/*virtual*/ void setVisible(BOOL visible);
47	virtual BOOL postBuild();
48	virtual void draw();
49	virtual void reset();
50
51	void dirty();
52	void setIsEditing(BOOL edit);
53protected:
54	virtual void refresh() = 0;
55	virtual void save() = 0;
56	virtual void updateVerbs();
57	
58	BOOL getIsEditing() const;
59	
60	//
61	// UI Elements
62	// 
63protected:
64	void 						onEditButtonClicked();
65	void 						onSaveButtonClicked();
66	void 						onCancelButtonClicked();
67	LLButton*					mSaveBtn;
68	LLButton*					mCancelBtn;
69
70private:
71	BOOL mIsDirty; 		// item properties need to be updated
72	BOOL mIsEditing; 	// if we're in edit mode
73};
74
75#endif // LL_LLSIDEPANELINVENTORYSUBPANEL_H