PageRenderTime 375ms CodeModel.GetById 192ms app.highlight 12ms RepoModel.GetById 169ms app.codeStats 0ms

/indra/newview/llsidepaneltaskinfo.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 162 lines | 104 code | 26 blank | 32 comment | 0 complexity | 0c6fce388c1f0973f4c7f3e9312936c9 MD5 | raw file
  1/** 
  2 * @file llsidepaneltaskinfo.h
  3 * @brief LLSidepanelTaskInfo class header file
  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_LLSIDEPANELTASKINFO_H
 28#define LL_LLSIDEPANELTASKINFO_H
 29
 30#include "llsidepanelinventorysubpanel.h"
 31#include "lluuid.h"
 32#include "llselectmgr.h"
 33
 34//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 35// Class LLSidepanelTaskInfo
 36//
 37// Panel for permissions of an object.
 38//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 39
 40class LLCheckBoxCtrl;
 41class LLComboBox;
 42class LLNameBox;
 43class LLViewerObject;
 44
 45class LLSidepanelTaskInfo : public LLSidepanelInventorySubpanel
 46{
 47public:
 48	LLSidepanelTaskInfo();
 49	virtual ~LLSidepanelTaskInfo();
 50
 51	/*virtual*/	BOOL postBuild();
 52	/*virtual*/ void handleVisibilityChange ( BOOL new_visibility );
 53
 54	void setObjectSelection(LLObjectSelectionHandle selection);
 55
 56	const LLUUID& getSelectedUUID();
 57	LLViewerObject* getFirstSelectedObject();
 58
 59	static LLSidepanelTaskInfo *getActivePanel();
 60protected:
 61	/*virtual*/ void refresh();	// refresh all labels as needed
 62	/*virtual*/ void save();
 63	/*virtual*/ void updateVerbs();
 64
 65	void refreshAll(); // ignore current keyboard focus and update all fields
 66
 67	// statics
 68	static void onClickClaim(void*);
 69	static void onClickRelease(void*);
 70		   void onClickGroup();
 71		   void cbGroupID(LLUUID group_id);
 72	static void onClickDeedToGroup(void*);
 73
 74	static void onCommitPerm(LLUICtrl *ctrl, void *data, U8 field, U32 perm);
 75
 76	static void onCommitGroupShare(LLUICtrl *ctrl, void *data);
 77
 78	static void onCommitEveryoneMove(LLUICtrl *ctrl, void *data);
 79	static void onCommitEveryoneCopy(LLUICtrl *ctrl, void *data);
 80
 81	static void onCommitNextOwnerModify(LLUICtrl* ctrl, void* data);
 82	static void onCommitNextOwnerCopy(LLUICtrl* ctrl, void* data);
 83	static void onCommitNextOwnerTransfer(LLUICtrl* ctrl, void* data);
 84	
 85	static void onCommitName(LLUICtrl* ctrl, void* data);
 86	static void onCommitDesc(LLUICtrl* ctrl, void* data);
 87
 88	static void onCommitSaleInfo(LLUICtrl* ctrl, void* data);
 89	static void onCommitSaleType(LLUICtrl* ctrl, void* data);	
 90	void setAllSaleInfo();
 91
 92	static void	onCommitClickAction(LLUICtrl* ctrl, void* data);
 93	static void onCommitIncludeInSearch(LLUICtrl* ctrl, void*);
 94
 95	static void	doClickAction(U8 click_action);
 96	void disableAll();
 97
 98private:
 99	LLNameBox*		mLabelGroupName;		// group name
100
101	LLUUID			mCreatorID;
102	LLUUID			mOwnerID;
103	LLUUID			mLastOwnerID;
104
105protected:
106	void 						onOpenButtonClicked();
107	void 						onPayButtonClicked();
108	void 						onBuyButtonClicked();
109	void 						onDetailsButtonClicked();
110private:
111	LLButton*					mOpenBtn;
112	LLButton*					mPayBtn;
113	LLButton*					mBuyBtn;
114	LLButton*					mDetailsBtn;
115
116protected:
117	LLViewerObject*				getObject();
118private:
119	LLPointer<LLViewerObject>	mObject;
120	LLObjectSelectionHandle		mObjectSelection;
121	static LLSidepanelTaskInfo* sActivePanel;
122	
123private:
124	// Pointers cached here to speed up the "disableAll" function which gets called on idle
125	LLUICtrl*	mDAPermModify;
126	LLView*		mDACreator;
127	LLUICtrl*	mDACreatorName;
128	LLView*		mDAOwner;
129	LLUICtrl*	mDAOwnerName;
130	LLView*		mDAGroup;
131	LLUICtrl*	mDAGroupName;
132	LLView*		mDAButtonSetGroup;
133	LLUICtrl*	mDAObjectName;
134	LLView*		mDAName;
135	LLView*		mDADescription;
136	LLUICtrl*	mDAObjectDescription;
137	LLView*		mDAPermissions;
138	LLUICtrl*	mDACheckboxShareWithGroup;
139	LLView*		mDAButtonDeed;
140	LLUICtrl*	mDACheckboxAllowEveryoneMove;
141	LLUICtrl*	mDACheckboxAllowEveryoneCopy;
142	LLView*		mDANextOwnerCan;
143	LLUICtrl*	mDACheckboxNextOwnerCanModify;
144	LLUICtrl*	mDACheckboxNextOwnerCanCopy;
145	LLUICtrl*	mDACheckboxNextOwnerCanTransfer;
146	LLUICtrl*	mDACheckboxForSale;
147	LLUICtrl*	mDASearchCheck;
148	LLComboBox*	mDAComboSaleType;
149	LLUICtrl*	mDACost;
150	LLUICtrl*	mDAEditCost;
151	LLView*		mDALabelClickAction;
152	LLComboBox*	mDAComboClickAction;
153	LLView*		mDAB;
154	LLView*		mDAO;
155	LLView*		mDAG;
156	LLView*		mDAE;
157	LLView*		mDAN;
158	LLView*		mDAF;
159};
160
161
162#endif // LL_LLSIDEPANELTASKINFO_H