llfloaterland.h

Go to the documentation of this file.
00001 
00033 #ifndef LL_LLFLOATERLAND_H
00034 #define LL_LLFLOATERLAND_H
00035 
00036 #include <set>
00037 #include <vector>
00038 
00039 #include "llfloater.h"
00040 #include "llviewerimagelist.h"
00041 
00042 typedef std::set<LLUUID, lluuid_less> uuid_list_t;
00043 const F32 CACHE_REFRESH_TIME    = 2.5f;
00044 
00045 class LLButton;
00046 class LLCheckBoxCtrl;
00047 class LLRadioGroup;
00048 class LLComboBox;
00049 class LLNameListCtrl;
00050 class LLSpinCtrl;
00051 class LLLineEditor;
00052 class LLRadioGroup;
00053 class LLParcelSelectionObserver;
00054 class LLTabContainer;
00055 class LLTextBox;
00056 class LLTextEditor;
00057 class LLTextureCtrl;
00058 class LLViewerTextEditor;
00059 class LLParcelSelection;
00060 
00061 class LLPanelLandGeneral;
00062 class LLPanelLandObjects;
00063 class LLPanelLandOptions;
00064 class LLPanelLandMedia;
00065 class LLPanelLandAccess;
00066 class LLPanelLandBan;
00067 class LLPanelLandRenters;
00068 class LLPanelLandCovenant;
00069 
00070 class LLFloaterLand
00071 :       public LLFloater
00072 {
00073 public:
00074         // Call show() to open a land floater.
00075         // Will query the viewer parcel manager to see what is selected.
00076         static void show();
00077         static BOOL floaterVisible() { return sInstance && sInstance->getVisible(); }
00078         static void refreshAll();
00079 
00080         static LLPanelLandObjects* getCurrentPanelLandObjects();
00081         static LLPanelLandCovenant* getCurrentPanelLandCovenant();
00082 
00083         // Destroys itself on close.
00084         virtual void onClose(bool app_quitting);
00085 
00086 protected:
00087         // Does its own instance management, so clients not allowed
00088         // to allocate or destroy.
00089         LLFloaterLand();
00090         virtual ~LLFloaterLand();
00091 
00092         void refresh();
00093 
00094 
00095         static void* createPanelLandGeneral(void* data);
00096         static void* createPanelLandCovenant(void* data);
00097         static void* createPanelLandObjects(void* data);
00098         static void* createPanelLandOptions(void* data);
00099         static void* createPanelLandMedia(void* data);
00100         static void* createPanelLandAccess(void* data);
00101         static void* createPanelLandBan(void* data);
00102 
00103 
00104 protected:
00105         static LLFloaterLand* sInstance;
00106         static LLParcelSelectionObserver* sObserver;
00107         static S32 sLastTab;
00108 
00109         LLTabContainer*                 mTabLand;
00110         LLPanelLandGeneral*             mPanelGeneral;
00111         LLPanelLandObjects*             mPanelObjects;
00112         LLPanelLandOptions*             mPanelOptions;
00113         LLPanelLandMedia*               mPanelMedia;
00114         LLPanelLandAccess*              mPanelAccess;
00115         LLPanelLandBan*                 mPanelBan;
00116         LLPanelLandCovenant*    mPanelCovenant;
00117 
00118         LLHandle<LLParcelSelection>     mParcel;
00119 
00120 public:
00121         // When closing the dialog, we want to deselect the land.  But when
00122         // we send an update to the simulator, it usually replies with the
00123         // parcel information, causing the land to be reselected.  This allows
00124         // us to suppress that behavior.
00125         static BOOL sRequestReplyOnUpdate;
00126 };
00127 
00128 
00129 class LLPanelLandGeneral
00130 :       public LLPanel
00131 {
00132 public:
00133         LLPanelLandGeneral(LLHandle<LLParcelSelection>& parcelp);
00134         virtual ~LLPanelLandGeneral();
00135         void refresh();
00136         void refreshNames();
00137         virtual void draw();
00138 
00139         void setGroup(const LLUUID& group_id);
00140         static void onClickProfile(void*);
00141         static void onClickSetGroup(void*);
00142         static void cbGroupID(LLUUID group_id, void* userdata);
00143         static BOOL enableDeedToGroup(void*);
00144         static void onClickDeed(void*);
00145         static void onClickBuyLand(void* data);
00146         static void onClickRelease(void*);
00147         static void onClickReclaim(void*);
00148         static void onClickBuyPass(void* deselect_when_done);
00149         static BOOL enableBuyPass(void*);
00150         static void onCommitAny(LLUICtrl* ctrl, void *userdata);
00151         static void finalizeCommit(void * userdata);
00152         static void onForSaleChange(LLUICtrl *ctrl, void * userdata);
00153         static void finalizeSetSellChange(void * userdata);
00154         static void onSalePriceChange(LLUICtrl *ctrl, void * userdata);
00155 
00156         static void cbBuyPass(S32 option, void*);
00157         static BOOL buyPassDialogVisible();
00158 
00159         static void onClickSellLand(void* data);
00160         static void onClickStopSellLand(void* data);
00161         static void onClickSet(void* data);
00162         static void onClickClear(void* data);
00163         static void onClickShow(void* data);
00164         static void callbackAvatarPick(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data);
00165         static void finalizeAvatarPick(void* data);
00166         static void callbackHighlightTransferable(S32 option, void* userdata);
00167         static void onClickStartAuction(void*);
00168         // sale change confirmed when "is for sale", "sale price", "sell to whom" fields are changed
00169         static void confirmSaleChange(S32 landSize, S32 salePrice, std::string authorizedName, void(*callback)(void*), void* userdata);
00170         static void callbackConfirmSaleChange(S32 option, void* userdata);
00171 
00172         virtual BOOL postBuild();
00173 
00174 protected:
00175         BOOL                    mUncheckedSell; // True only when verifying land information when land is for sale on sale info change
00176         
00177         LLTextBox*              mLabelName;
00178         LLLineEditor*   mEditName;
00179         LLTextBox*              mLabelDesc;
00180         LLTextEditor*   mEditDesc;
00181 
00182         LLTextBox*              mTextSalePending;
00183 
00184         LLButton*               mBtnDeedToGroup;
00185         LLButton*               mBtnSetGroup;
00186 
00187         LLTextBox*              mTextOwnerLabel;
00188         LLTextBox*              mTextOwner;
00189         LLButton*               mBtnProfile;
00190 
00191         LLTextBox*              mTextGroup;
00192         LLTextBox*              mTextGroupLabel;
00193         LLTextBox*              mTextClaimDateLabel;
00194         LLTextBox*              mTextClaimDate;
00195 
00196         LLTextBox*              mTextPriceLabel;
00197         LLTextBox*              mTextPrice;
00198 
00199         LLCheckBoxCtrl* mCheckDeedToGroup;
00200         LLCheckBoxCtrl* mCheckContributeWithDeed;
00201 
00202         LLTextBox*              mSaleInfoForSale1;
00203         LLTextBox*              mSaleInfoForSale2;
00204         LLTextBox*              mSaleInfoForSaleObjects;
00205         LLTextBox*              mSaleInfoForSaleNoObjects;
00206         LLTextBox*              mSaleInfoNotForSale;
00207         LLButton*               mBtnSellLand;
00208         LLButton*               mBtnStopSellLand;
00209 
00210         LLTextBox*              mTextDwell;
00211 
00212         LLButton*               mBtnBuyLand;
00213         LLButton*               mBtnBuyGroupLand;
00214 
00215         // these buttons share the same location, but
00216         // reclaim is in exactly the same visual place,
00217         // ond is only shown for estate owners on their
00218         // estate since they cannot release land.
00219         LLButton*               mBtnReleaseLand;
00220         LLButton*               mBtnReclaimLand;
00221 
00222         LLButton*               mBtnBuyPass;
00223         LLButton* mBtnStartAuction;
00224 
00225         LLHandle<LLParcelSelection>&    mParcel;
00226 
00227         static LLViewHandle sBuyPassDialogHandle;
00228 };
00229 
00230 class LLPanelLandObjects
00231 :       public LLPanel
00232 {
00233 public:
00234         LLPanelLandObjects(LLHandle<LLParcelSelection>& parcelp);
00235         virtual ~LLPanelLandObjects();
00236         void refresh();
00237         virtual void draw();
00238 
00239         static void callbackReturnOwnerObjects(S32, void*);
00240         static void callbackReturnGroupObjects(S32, void*);
00241         static void callbackReturnOtherObjects(S32, void*);
00242         static void callbackReturnOwnerList(S32, void*);
00243 
00244         static void clickShowCore(LLPanelLandObjects* panelp, S32 return_type, uuid_list_t* list = 0);
00245         static void onClickShowOwnerObjects(void*);
00246         static void onClickShowGroupObjects(void*);
00247         static void onClickShowOtherObjects(void*);
00248 
00249         static void onClickReturnOwnerObjects(void*);
00250         static void onClickReturnGroupObjects(void*);
00251         static void onClickReturnOtherObjects(void*);
00252         static void onClickReturnOwnerList(void*);
00253         static void onClickRefresh(void*);
00254         static void onClickType(void*);
00255         static void onClickName(void*);
00256         static void onClickDesc(void*);
00257 
00258         static void onDoubleClickOwner(void*);  
00259 
00260         static void onCommitList(LLUICtrl* ctrl, void* data);
00261         static void onLostFocus(LLUICtrl* caller, void* user_data);
00262         
00263         static void processParcelObjectOwnersReply(LLMessageSystem *msg, void **);
00264         
00265         virtual BOOL postBuild();
00266 
00267 protected:
00268         void sortBtnCore(S32 column);
00269 
00270         LLTextBox               *mParcelObjectBonus;
00271         LLTextBox               *mSWTotalObjects;
00272         LLTextBox               *mObjectContribution;
00273         LLTextBox               *mTotalObjects;
00274         LLTextBox               *mOwnerObjects;
00275         LLButton                *mBtnShowOwnerObjects;
00276         LLButton                *mBtnReturnOwnerObjects;
00277         LLTextBox               *mGroupObjects;
00278         LLButton                *mBtnShowGroupObjects;
00279         LLButton                *mBtnReturnGroupObjects;
00280         LLTextBox               *mOtherObjects;
00281         LLButton                *mBtnShowOtherObjects;
00282         LLButton                *mBtnReturnOtherObjects;
00283         LLTextBox               *mSelectedObjects;
00284         LLLineEditor    *mCleanOtherObjectsTime;
00285         S32                             mOtherTime;
00286         LLButton                *mBtnRefresh;
00287         LLButton                *mBtnReturnOwnerList;
00288         LLButton        *mBtnType;                      // column 0
00289         LLButton        *mBtnName;                      // column 2
00290         LLButton        *mBtnDescription;       // column 3
00291         LLNameListCtrl  *mOwnerList;
00292 
00293         LLPointer<LLViewerImage>        mIconAvatarOnline;
00294         LLPointer<LLViewerImage>        mIconAvatarOffline;
00295         LLPointer<LLViewerImage>        mIconGroup;
00296 
00297         U32             mCurrentSortColumn;
00298         BOOL            mCurrentSortAscending;
00299         S32             mColWidth[12];
00300 
00301         BOOL                    mFirstReply;
00302 
00303         uuid_list_t             mSelectedOwners;
00304         LLString                mSelectedName;
00305         S32                             mSelectedCount;
00306         BOOL                    mSelectedIsGroup;
00307 
00308         LLHandle<LLParcelSelection>&    mParcel;
00309 };
00310 
00311 
00312 class LLPanelLandOptions
00313 :       public LLPanel
00314 {
00315 public:
00316         LLPanelLandOptions(LLHandle<LLParcelSelection>& parcelp);
00317         virtual ~LLPanelLandOptions();
00318         void refresh();
00319 
00320 
00321         static void onCommitAny(LLUICtrl* ctrl, void *userdata);
00322         static void onClickSet(void* userdata);
00323         static void onClickClear(void* userdata);
00324         static void onClickPublishHelp(void*);
00325 
00326         virtual BOOL postBuild();
00327         virtual void draw();
00328 
00329 protected:
00330         LLCheckBoxCtrl* mCheckEditObjects;
00331         LLCheckBoxCtrl* mCheckEditGroupObjects;
00332         LLCheckBoxCtrl* mCheckAllObjectEntry;
00333         LLCheckBoxCtrl* mCheckGroupObjectEntry;
00334         LLCheckBoxCtrl* mCheckEditLand;
00335         LLCheckBoxCtrl* mCheckSafe;
00336         LLCheckBoxCtrl* mCheckFly;
00337         LLCheckBoxCtrl* mCheckGroupScripts;
00338         LLCheckBoxCtrl* mCheckOtherScripts;
00339         LLCheckBoxCtrl* mCheckLandmark;
00340 
00341         LLCheckBoxCtrl* mCheckShowDirectory;
00342         LLComboBox*             mCategoryCombo;
00343         LLComboBox*             mLandingTypeCombo;
00344 
00345         LLTextureCtrl*  mSnapshotCtrl;
00346 
00347         LLTextBox*              mLocationText;
00348         LLButton*               mSetBtn;
00349         LLButton*               mClearBtn;
00350 
00351         LLCheckBoxCtrl          *mMatureCtrl;
00352         LLCheckBoxCtrl          *mPushRestrictionCtrl;
00353         LLButton                        *mPublishHelpButton;
00354 
00355         LLHandle<LLParcelSelection>&    mParcel;
00356 };
00357 
00358 
00359 class LLPanelLandMedia
00360 :       public LLPanel
00361 {
00362 public:
00363         LLPanelLandMedia(LLHandle<LLParcelSelection>& parcelp);
00364         virtual ~LLPanelLandMedia();
00365         void refresh();
00366 
00367         static void onCommitAny(LLUICtrl* ctrl, void *userdata);
00368         static void onClickStopMedia ( void* data );
00369         static void onClickStartMedia ( void* data );
00370 
00371         virtual BOOL postBuild();
00372 
00373 protected:
00374         LLCheckBoxCtrl* mCheckSoundLocal;
00375         LLRadioGroup*   mRadioVoiceChat;
00376         LLLineEditor*   mMusicURLEdit;
00377         LLLineEditor*   mMediaURLEdit;
00378         LLTextureCtrl*  mMediaTextureCtrl;
00379         LLCheckBoxCtrl* mMediaAutoScaleCheck;
00380         //LLButton*             mMediaStopButton;
00381         //LLButton*             mMediaStartButton;
00382 
00383         LLHandle<LLParcelSelection>&    mParcel;
00384 };
00385 
00386 
00387 
00388 class LLPanelLandAccess
00389 :       public LLPanel
00390 {
00391 public:
00392         LLPanelLandAccess(LLHandle<LLParcelSelection>& parcelp);
00393         virtual ~LLPanelLandAccess();
00394         void refresh();
00395         void refreshNames();
00396         virtual void draw();
00397 
00398         void addAvatar(LLUUID id);
00399 
00400         static void onCommitAny(LLUICtrl* ctrl, void *userdata);
00401         static void onClickAdd(void*);
00402         static void onClickRemove(void*);
00403         static void callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* userdata);
00404         static void onAccessLevelChange(LLUICtrl* ctrl, void* userdata);
00405 
00406         virtual BOOL postBuild();
00407 
00408 protected:
00409         LLTextBox*                      mLabelTitle;
00410 
00411         LLCheckBoxCtrl*         mCheckGroup;
00412 
00413         LLCheckBoxCtrl*         mCheckAccess;
00414         LLNameListCtrl*         mListAccess;
00415         LLButton*                       mBtnAddAccess;
00416         LLButton*                       mBtnRemoveAccess;
00417 
00418         LLCheckBoxCtrl*         mCheckPass;
00419         LLSpinCtrl*                     mSpinPrice;
00420         LLSpinCtrl*                     mSpinHours;
00421 
00422         LLCheckBoxCtrl*         mCheckIdentified;
00423         LLCheckBoxCtrl*         mCheckTransacted;
00424         LLRadioGroup*           mCheckStatusLevel;
00425 
00426         LLHandle<LLParcelSelection>&    mParcel;
00427 };
00428 
00429 
00430 class LLPanelLandBan
00431 :       public LLPanel
00432 {
00433 public:
00434         LLPanelLandBan(LLHandle<LLParcelSelection>& parcelp);
00435         virtual ~LLPanelLandBan();
00436         void refresh();
00437 
00438         void addAvatar(LLUUID id);
00439 
00440         static void onCommitAny(LLUICtrl* ctrl, void *userdata);
00441         static void onClickAdd(void*);
00442         static void onClickRemove(void*);
00443         static void callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* userdata);
00444 
00445         virtual BOOL postBuild();
00446 
00447 protected:
00448         LLTextBox*                      mLabelTitle;
00449 
00450         LLCheckBoxCtrl*         mCheck;
00451         LLNameListCtrl*         mList;
00452         LLButton*                       mBtnAdd;
00453         LLButton*                       mBtnRemove;
00454         LLCheckBoxCtrl*         mCheckDenyAnonymous;
00455         LLCheckBoxCtrl*         mCheckDenyIdentified;
00456         LLCheckBoxCtrl*         mCheckDenyTransacted;
00457 
00458         LLHandle<LLParcelSelection>&    mParcel;
00459 };
00460 
00461 
00462 class LLPanelLandRenters
00463 :       public LLPanel
00464 {
00465 public:
00466         LLPanelLandRenters(LLHandle<LLParcelSelection>& parcelp);
00467         virtual ~LLPanelLandRenters();
00468         void refresh();
00469 
00470         static void onClickAdd(void*);
00471         static void onClickRemove(void*);
00472 
00473 protected:
00474         LLCheckBoxCtrl*         mCheckRenters;
00475         LLNameListCtrl*         mListRenters;
00476         LLButton*                       mBtnAddRenter;
00477         LLButton*                       mBtnRemoveRenter;
00478 
00479         LLHandle<LLParcelSelection>&    mParcel;
00480 };
00481 
00482 class LLPanelLandCovenant
00483 :       public LLPanel
00484 {
00485 public:
00486         LLPanelLandCovenant(LLHandle<LLParcelSelection>& parcelp);
00487         virtual ~LLPanelLandCovenant();
00488         virtual BOOL postBuild();
00489         void refresh();
00490         static void updateCovenantText(const std::string& string);
00491         static void updateEstateName(const std::string& name);
00492         static void updateLastModified(const std::string& text);
00493         static void updateEstateOwnerName(const std::string& name);
00494 
00495 protected:
00496         LLHandle<LLParcelSelection>&    mParcel;
00497 };
00498 
00499 #endif

Generated on Thu Jul 1 06:08:34 2010 for Second Life Viewer by  doxygen 1.4.7