aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterland.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:46 -0500
committerJacek Antonelli2008-08-15 23:44:46 -0500
commit38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch)
treeadca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/newview/llfloaterland.h
parentREADME.txt (diff)
downloadmeta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz
Second Life viewer sources 1.13.2.12
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloaterland.h494
1 files changed, 494 insertions, 0 deletions
diff --git a/linden/indra/newview/llfloaterland.h b/linden/indra/newview/llfloaterland.h
new file mode 100644
index 0000000..ba92c96
--- /dev/null
+++ b/linden/indra/newview/llfloaterland.h
@@ -0,0 +1,494 @@
1/**
2 * @file llfloaterland.h
3 * @author James Cook
4 * @brief "About Land" floater, allowing display and editing of land parcel properties.
5 *
6 * Copyright (c) 2002-2007, Linden Research, Inc.
7 *
8 * The source code in this file ("Source Code") is provided by Linden Lab
9 * to you under the terms of the GNU General Public License, version 2.0
10 * ("GPL"), unless you have obtained a separate licensing agreement
11 * ("Other License"), formally executed by you and Linden Lab. Terms of
12 * the GPL can be found in doc/GPL-license.txt in this distribution, or
13 * online at http://secondlife.com/developers/opensource/gplv2
14 *
15 * There are special exceptions to the terms and conditions of the GPL as
16 * it is applied to this Source Code. View the full text of the exception
17 * in the file doc/FLOSS-exception.txt in this software distribution, or
18 * online at http://secondlife.com/developers/opensource/flossexception
19 *
20 * By copying, modifying or distributing this software, you acknowledge
21 * that you have read and understood your obligations described above,
22 * and agree to abide by those obligations.
23 *
24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
26 * COMPLETENESS OR PERFORMANCE.
27 */
28
29#ifndef LL_LLFLOATERLAND_H
30#define LL_LLFLOATERLAND_H
31
32#include <set>
33#include <vector>
34
35#include "llfloater.h"
36#include "llviewerimagelist.h"
37
38typedef std::set<LLUUID, lluuid_less> uuid_list_t;
39const F32 CACHE_REFRESH_TIME = 2.5f;
40
41class LLTextBox;
42class LLCheckBoxCtrl;
43class LLComboBox;
44class LLButton;
45class LLNameListCtrl;
46class LLSpinCtrl;
47class LLLineEditor;
48class LLRadioGroup;
49class LLParcelSelectionObserver;
50class LLTabContainer;
51class LLTextureCtrl;
52class LLViewerTextEditor;
53
54class LLPanelLandGeneral;
55class LLPanelLandObjects;
56class LLPanelLandOptions;
57class LLPanelLandMedia;
58class LLPanelLandAccess;
59class LLPanelLandBan;
60class LLPanelLandRenters;
61class LLPanelLandCovenant;
62
63class LLFloaterLand
64: public LLFloater
65{
66public:
67 // Call show() to open a land floater.
68 // Will query the viewer parcel manager to see what is selected.
69 static void show();
70 static BOOL floaterVisible() { return sInstance && sInstance->getVisible(); }
71 static void refreshAll();
72
73 static LLPanelLandObjects* getCurrentPanelLandObjects();
74 static LLPanelLandCovenant* getCurrentPanelLandCovenant();
75
76 // Returns TRUE, but does some early prep work for closing the window.
77 virtual BOOL canClose();
78
79 // Destroys itself on close.
80 virtual void onClose(bool app_quitting);
81
82protected:
83 // Does its own instance management, so clients not allowed
84 // to allocate or destroy.
85 LLFloaterLand();
86 virtual ~LLFloaterLand();
87
88 void refresh();
89
90
91 static void* createPanelLandGeneral(void* data);
92 static void* createPanelLandCovenant(void* data);
93 static void* createPanelLandObjects(void* data);
94 static void* createPanelLandOptions(void* data);
95 static void* createPanelLandMedia(void* data);
96 static void* createPanelLandAccess(void* data);
97 static void* createPanelLandBan(void* data);
98
99
100protected:
101 static LLFloaterLand* sInstance;
102 static LLParcelSelectionObserver* sObserver;
103 static S32 sLastTab;
104
105 LLTabContainer* mTabLand;
106 LLPanelLandGeneral* mPanelGeneral;
107 LLPanelLandObjects* mPanelObjects;
108 LLPanelLandOptions* mPanelOptions;
109 LLPanelLandMedia* mPanelMedia;
110 LLPanelLandAccess* mPanelAccess;
111 LLPanelLandBan* mPanelBan;
112 LLPanelLandCovenant* mPanelCovenant;
113 LLPanelLandRenters* mPanelRenters;
114
115public:
116 // When closing the dialog, we want to deselect the land. But when
117 // we send an update to the simulator, it usually replies with the
118 // parcel information, causing the land to be reselected. This allows
119 // us to suppress that behavior.
120 static BOOL sRequestReplyOnUpdate;
121};
122
123
124class LLPanelLandGeneral
125: public LLPanel
126{
127public:
128 LLPanelLandGeneral();
129 virtual ~LLPanelLandGeneral();
130 void refresh();
131 void refreshNames();
132 virtual void draw();
133
134 void setGroup(const LLUUID& group_id);
135 static void onClickProfile(void*);
136 static void onClickSetGroup(void*);
137 static void cbGroupID(LLUUID group_id, void* userdata);
138 static BOOL enableDeedToGroup(void*);
139 static void onClickDeed(void*);
140 static void onClickBuyLand(void* data);
141 static void onClickRelease(void*);
142 static void onClickReclaim(void*);
143 static void onClickBuyPass(void* deselect_when_done);
144 static BOOL enableBuyPass(void*);
145 static void onCommitAny(LLUICtrl* ctrl, void *userdata);
146 static void finalizeCommit(void * userdata);
147 static void onForSaleChange(LLUICtrl *ctrl, void * userdata);
148 static void finalizeSetSellChange(void * userdata);
149 static void onSalePriceChange(LLUICtrl *ctrl, void * userdata);
150
151 static void cbBuyPass(S32 option, void*);
152 static BOOL buyPassDialogVisible();
153
154 static void onClickSellLand(void* data);
155 static void onClickStopSellLand(void* data);
156 static void onClickSet(void* data);
157 static void onClickClear(void* data);
158 static void onClickShow(void* data);
159 static void callbackAvatarPick(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data);
160 static void finalizeAvatarPick(void* data);
161 static void callbackHighlightTransferable(S32 option, void* userdata);
162 static void onClickStartAuction(void*);
163 // sale change confirmed when "is for sale", "sale price", "sell to whom" fields are changed
164 static void confirmSaleChange(S32 landSize, S32 salePrice, std::string authorizedName, void(*callback)(void*), void* userdata);
165 static void callbackConfirmSaleChange(S32 option, void* userdata);
166
167 virtual BOOL postBuild();
168
169protected:
170 BOOL mUncheckedSell; // True only when verifying land information when land is for sale on sale info change
171
172 LLTextBox* mLabelName;
173 LLLineEditor* mEditName;
174 LLTextBox* mLabelDesc;
175 LLLineEditor* mEditDesc;
176
177 LLTextBox* mTextSalePending;
178
179 LLButton* mBtnDeedToGroup;
180 LLButton* mBtnSetGroup;
181
182 LLTextBox* mTextOwnerLabel;
183 LLTextBox* mTextOwner;
184 LLButton* mBtnProfile;
185
186 LLTextBox* mTextGroup;
187 LLTextBox* mTextGroupLabel;
188 LLTextBox* mTextClaimDateLabel;
189 LLTextBox* mTextClaimDate;
190
191 LLTextBox* mTextPriceLabel;
192 LLTextBox* mTextPrice;
193
194 LLCheckBoxCtrl* mCheckDeedToGroup;
195 LLCheckBoxCtrl* mCheckContributeWithDeed;
196
197 LLTextBox* mSaleInfoForSale1;
198 LLTextBox* mSaleInfoForSale2;
199 LLTextBox* mSaleInfoForSaleObjects;
200 LLTextBox* mSaleInfoForSaleNoObjects;
201 LLTextBox* mSaleInfoNotForSale;
202 LLButton* mBtnSellLand;
203 LLButton* mBtnStopSellLand;
204
205 LLTextBox* mTextDwell;
206
207 LLButton* mBtnBuyLand;
208 LLButton* mBtnBuyGroupLand;
209
210 // these buttons share the same location, but
211 // reclaim is in exactly the same visual place,
212 // ond is only shown for estate owners on their
213 // estate since they cannot release land.
214 LLButton* mBtnReleaseLand;
215 LLButton* mBtnReclaimLand;
216
217 LLButton* mBtnBuyPass;
218 LLButton* mBtnStartAuction;
219
220 static LLViewHandle sBuyPassDialogHandle;
221};
222
223class LLPanelLandObjects
224: public LLPanel
225{
226public:
227 LLPanelLandObjects();
228 virtual ~LLPanelLandObjects();
229 void refresh();
230 virtual void draw();
231
232 static void callbackReturnOwnerObjects(S32, void*);
233 static void callbackReturnGroupObjects(S32, void*);
234 static void callbackReturnOtherObjects(S32, void*);
235 static void callbackReturnOwnerList(S32, void*);
236
237 static void clickShowCore(S32 return_type, uuid_list_t* list = 0);
238 static void onClickShowOwnerObjects(void*);
239 static void onClickShowGroupObjects(void*);
240 static void onClickShowOtherObjects(void*);
241
242 static void onClickReturnOwnerObjects(void*);
243 static void onClickReturnGroupObjects(void*);
244 static void onClickReturnOtherObjects(void*);
245 static void onClickReturnOwnerList(void*);
246 static void onClickRefresh(void*);
247 static void onClickType(void*);
248 static void onClickName(void*);
249 static void onClickDesc(void*);
250
251 static void onDoubleClickOwner(void*);
252
253 static void onCommitList(LLUICtrl* ctrl, void* data);
254 static void onLostFocus(LLLineEditor* caller, void* user_data);
255
256 static void processParcelObjectOwnersReply(LLMessageSystem *msg, void **);
257
258 virtual BOOL postBuild();
259
260protected:
261 void sortBtnCore(S32 column);
262
263 LLTextBox *mSWTotalObjectsLabel;
264 LLTextBox *mSWTotalObjects;
265
266 LLTextBox *mParcelObjectBonus;
267
268 LLTextBox *mObjectContributionLabel;
269 LLTextBox *mObjectContribution;
270 LLTextBox *mTotalObjectsLabel;
271 LLTextBox *mTotalObjects;
272
273 LLTextBox *mOwnerObjectsLabel;
274 LLTextBox *mOwnerObjects;
275 LLButton *mBtnShowOwnerObjects;
276 LLButton *mBtnReturnOwnerObjects;
277
278 LLTextBox *mGroupObjectsLabel;
279 LLTextBox *mGroupObjects;
280 LLButton *mBtnShowGroupObjects;
281 LLButton *mBtnReturnGroupObjects;
282
283 LLTextBox *mOtherObjectsLabel;
284 LLTextBox *mOtherObjects;
285 LLButton *mBtnShowOtherObjects;
286 LLButton *mBtnReturnOtherObjects;
287
288 LLTextBox *mSelectedObjectsLabel;
289 LLTextBox *mSelectedObjects;
290
291 LLTextBox *mCleanOtherObjectsLabel;
292 LLLineEditor *mCleanOtherObjectsTime;
293 S32 mOtherTime;
294
295 LLTextBox *mOwnerListText;
296 LLButton *mBtnRefresh;
297 LLButton *mBtnReturnOwnerList;
298 LLButton *mBtnType; // column 0
299 LLButton *mBtnName; // column 2
300 LLButton *mBtnDescription; // column 3
301 LLNameListCtrl *mOwnerList;
302
303 LLPointer<LLViewerImage> mIconAvatarOnline;
304 LLPointer<LLViewerImage> mIconAvatarOffline;
305 LLPointer<LLViewerImage> mIconGroup;
306
307 U32 mCurrentSortColumn;
308 BOOL mCurrentSortAscending;
309 S32 mColWidth[12];
310
311 BOOL mFirstReply;
312
313 uuid_list_t mSelectedOwners;
314 LLString mSelectedName;
315 S32 mSelectedCount;
316 BOOL mSelectedIsGroup;
317};
318
319
320class LLPanelLandOptions
321: public LLPanel
322{
323public:
324 LLPanelLandOptions();
325 virtual ~LLPanelLandOptions();
326 void refresh();
327
328
329 static void onCommitAny(LLUICtrl* ctrl, void *userdata);
330 static void onClickSet(void* userdata);
331 static void onClickClear(void* userdata);
332 static void onClickPublishHelp(void*);
333
334 virtual BOOL postBuild();
335
336protected:
337 LLCheckBoxCtrl* mCheckEditObjects;
338 LLCheckBoxCtrl* mCheckEditGroupObjects;
339 LLCheckBoxCtrl* mCheckAllObjectEntry;
340 LLCheckBoxCtrl* mCheckGroupObjectEntry;
341 LLCheckBoxCtrl* mCheckEditLand;
342 LLCheckBoxCtrl* mCheckSafe;
343 LLCheckBoxCtrl* mCheckFly;
344 LLCheckBoxCtrl* mCheckGroupScripts;
345 LLCheckBoxCtrl* mCheckOtherScripts;
346 LLCheckBoxCtrl* mCheckLandmark;
347
348 LLCheckBoxCtrl* mCheckShowDirectory;
349 LLComboBox* mCategoryCombo;
350 LLComboBox* mLandingTypeCombo;
351
352 LLTextureCtrl* mSnapshotCtrl;
353
354 LLTextBox* mLocationText;
355 LLButton* mSetBtn;
356 LLButton* mClearBtn;
357
358 LLCheckBoxCtrl *mAllowPublishCtrl;
359 LLCheckBoxCtrl *mMatureCtrl;
360 LLCheckBoxCtrl *mPushRestrictionCtrl;
361 LLButton *mPublishHelpButton;
362};
363
364
365class LLPanelLandMedia
366: public LLPanel
367{
368public:
369 LLPanelLandMedia();
370 virtual ~LLPanelLandMedia();
371 void refresh();
372
373 static void onCommitAny(LLUICtrl* ctrl, void *userdata);
374 static void onClickStopMedia ( void* data );
375 static void onClickStartMedia ( void* data );
376
377 virtual BOOL postBuild();
378
379protected:
380 LLCheckBoxCtrl* mCheckSoundLocal;
381 LLLineEditor* mMusicURLEdit;
382 LLLineEditor* mMediaURLEdit;
383 LLTextureCtrl* mMediaTextureCtrl;
384 LLCheckBoxCtrl* mMediaAutoScaleCheck;
385 //LLButton* mMediaStopButton;
386 //LLButton* mMediaStartButton;
387};
388
389
390
391class LLPanelLandAccess
392: public LLPanel
393{
394public:
395 LLPanelLandAccess();
396 virtual ~LLPanelLandAccess();
397 void refresh();
398 void refreshNames();
399 virtual void draw();
400
401 void addAvatar(LLUUID id);
402
403 static void onCommitAny(LLUICtrl* ctrl, void *userdata);
404 static void onClickAdd(void*);
405 static void onClickRemove(void*);
406 static void callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* userdata);
407 static void onAccessLevelChange(LLUICtrl* ctrl, void* userdata);
408
409 virtual BOOL postBuild();
410
411protected:
412 LLTextBox* mLabelTitle;
413
414 LLCheckBoxCtrl* mCheckGroup;
415
416 LLCheckBoxCtrl* mCheckAccess;
417 LLNameListCtrl* mListAccess;
418 LLButton* mBtnAddAccess;
419 LLButton* mBtnRemoveAccess;
420
421 LLCheckBoxCtrl* mCheckPass;
422 LLSpinCtrl* mSpinPrice;
423 LLSpinCtrl* mSpinHours;
424
425 LLCheckBoxCtrl* mCheckIdentified;
426 LLCheckBoxCtrl* mCheckTransacted;
427 LLRadioGroup* mCheckStatusLevel;
428
429};
430
431
432class LLPanelLandBan
433: public LLPanel
434{
435public:
436 LLPanelLandBan();
437 virtual ~LLPanelLandBan();
438 void refresh();
439
440 void addAvatar(LLUUID id);
441
442 static void onCommitAny(LLUICtrl* ctrl, void *userdata);
443 static void onClickAdd(void*);
444 static void onClickRemove(void*);
445 static void callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* userdata);
446
447 virtual BOOL postBuild();
448
449protected:
450 LLTextBox* mLabelTitle;
451
452 LLCheckBoxCtrl* mCheck;
453 LLNameListCtrl* mList;
454 LLButton* mBtnAdd;
455 LLButton* mBtnRemove;
456 LLCheckBoxCtrl* mCheckDenyAnonymous;
457 LLCheckBoxCtrl* mCheckDenyIdentified;
458 LLCheckBoxCtrl* mCheckDenyTransacted;
459};
460
461
462class LLPanelLandRenters
463: public LLPanel
464{
465public:
466 LLPanelLandRenters();
467 virtual ~LLPanelLandRenters();
468 void refresh();
469
470 static void onClickAdd(void*);
471 static void onClickRemove(void*);
472
473protected:
474 LLCheckBoxCtrl* mCheckRenters;
475 LLNameListCtrl* mListRenters;
476 LLButton* mBtnAddRenter;
477 LLButton* mBtnRemoveRenter;
478};
479
480class LLPanelLandCovenant
481: public LLPanel
482{
483public:
484 LLPanelLandCovenant();
485 virtual ~LLPanelLandCovenant();
486 virtual BOOL postBuild();
487 void refresh();
488 static void updateCovenantText(const std::string& string);
489 static void updateEstateName(const std::string& name);
490 static void updateLastModified(const std::string& text);
491 static void updateEstateOwnerName(const std::string& name);
492};
493
494#endif