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, public LLFloaterSingleton<LLFloaterLand>
00072 {
00073         friend class LLUISingleton<LLFloaterLand, VisibilityPolicy<LLFloater> >;
00074 public:
00075         static void refreshAll();
00076 
00077         static LLPanelLandObjects* getCurrentPanelLandObjects();
00078         static LLPanelLandCovenant* getCurrentPanelLandCovenant();
00079 
00080         // Destroys itself on close.
00081         virtual void onClose(bool app_quitting);
00082         virtual void onOpen();
00083         virtual BOOL postBuild();
00084 
00085 protected:
00086 
00087         // Does its own instance management, so clients not allowed
00088         // to allocate or destroy.
00089         LLFloaterLand(const LLSD& seed);
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 LLParcelSelectionObserver* sObserver;
00106         static S32 sLastTab;
00107 
00108         LLTabContainer*                 mTabLand;
00109         LLPanelLandGeneral*             mPanelGeneral;
00110         LLPanelLandObjects*             mPanelObjects;
00111         LLPanelLandOptions*             mPanelOptions;
00112         LLPanelLandMedia*               mPanelMedia;
00113         LLPanelLandAccess*              mPanelAccess;
00114         LLPanelLandCovenant*    mPanelCovenant;
00115 
00116         LLSafeHandle<LLParcelSelection> mParcel;
00117 
00118 public:
00119         // When closing the dialog, we want to deselect the land.  But when
00120         // we send an update to the simulator, it usually replies with the
00121         // parcel information, causing the land to be reselected.  This allows
00122         // us to suppress that behavior.
00123         static BOOL sRequestReplyOnUpdate;
00124 };
00125 
00126 
00127 class LLPanelLandGeneral
00128 :       public LLPanel
00129 {
00130 public:
00131         LLPanelLandGeneral(LLSafeHandle<LLParcelSelection>& parcelp);
00132         virtual ~LLPanelLandGeneral();
00133         void refresh();
00134         void refreshNames();
00135         virtual void draw();
00136 
00137         void setGroup(const LLUUID& group_id);
00138         static void onClickProfile(void*);
00139         static void onClickSetGroup(void*);
00140         static void cbGroupID(LLUUID group_id, void* userdata);
00141         static BOOL enableDeedToGroup(void*);
00142         static void onClickDeed(void*);
00143         static void onClickBuyLand(void* data);
00144         static void onClickRelease(void*);
00145         static void onClickReclaim(void*);
00146         static void onClickBuyPass(void* deselect_when_done);
00147         static BOOL enableBuyPass(void*);
00148         static void onCommitAny(LLUICtrl* ctrl, void *userdata);
00149         static void finalizeCommit(void * userdata);
00150         static void onForSaleChange(LLUICtrl *ctrl, void * userdata);
00151         static void finalizeSetSellChange(void * userdata);
00152         static void onSalePriceChange(LLUICtrl *ctrl, void * userdata);
00153 
00154         static void cbBuyPass(S32 option, void*);
00155         static BOOL buyPassDialogVisible();
00156 
00157         static void onClickSellLand(void* data);
00158         static void onClickStopSellLand(void* data);
00159         static void onClickSet(void* data);
00160         static void onClickClear(void* data);
00161         static void onClickShow(void* data);
00162         static void callbackAvatarPick(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data);
00163         static void finalizeAvatarPick(void* data);
00164         static void callbackHighlightTransferable(S32 option, void* userdata);
00165         static void onClickStartAuction(void*);
00166         // sale change confirmed when "is for sale", "sale price", "sell to whom" fields are changed
00167         static void confirmSaleChange(S32 landSize, S32 salePrice, std::string authorizedName, void(*callback)(void*), void* userdata);
00168         static void callbackConfirmSaleChange(S32 option, void* userdata);
00169 
00170         virtual BOOL postBuild();
00171 
00172 protected:
00173         BOOL                    mUncheckedSell; // True only when verifying land information when land is for sale on sale info change
00174         
00175         LLTextBox*              mLabelName;
00176         LLLineEditor*   mEditName;
00177         LLTextBox*              mLabelDesc;
00178         LLTextEditor*   mEditDesc;
00179 
00180         LLTextBox*              mTextSalePending;
00181 
00182         LLButton*               mBtnDeedToGroup;
00183         LLButton*               mBtnSetGroup;
00184 
00185         LLTextBox*              mTextOwnerLabel;
00186         LLTextBox*              mTextOwner;
00187         LLButton*               mBtnProfile;
00188 
00189         LLTextBox*              mTextGroup;
00190         LLTextBox*              mTextGroupLabel;
00191         LLTextBox*              mTextClaimDateLabel;
00192         LLTextBox*              mTextClaimDate;
00193 
00194         LLTextBox*              mTextPriceLabel;
00195         LLTextBox*              mTextPrice;
00196 
00197         LLCheckBoxCtrl* mCheckDeedToGroup;
00198         LLCheckBoxCtrl* mCheckContributeWithDeed;
00199 
00200         LLTextBox*              mSaleInfoForSale1;
00201         LLTextBox*              mSaleInfoForSale2;
00202         LLTextBox*              mSaleInfoForSaleObjects;
00203         LLTextBox*              mSaleInfoForSaleNoObjects;
00204         LLTextBox*              mSaleInfoNotForSale;
00205         LLButton*               mBtnSellLand;
00206         LLButton*               mBtnStopSellLand;
00207 
00208         LLTextBox*              mTextDwell;
00209 
00210         LLButton*               mBtnBuyLand;
00211         LLButton*               mBtnBuyGroupLand;
00212 
00213         // these buttons share the same location, but
00214         // reclaim is in exactly the same visual place,
00215         // ond is only shown for estate owners on their
00216         // estate since they cannot release land.
00217         LLButton*               mBtnReleaseLand;
00218         LLButton*               mBtnReclaimLand;
00219 
00220         LLButton*               mBtnBuyPass;
00221         LLButton* mBtnStartAuction;
00222 
00223         LLSafeHandle<LLParcelSelection>&        mParcel;
00224 
00225         static LLHandle<LLFloater> sBuyPassDialogHandle;
00226 };
00227 
00228 class LLPanelLandObjects
00229 :       public LLPanel
00230 {
00231 public:
00232         LLPanelLandObjects(LLSafeHandle<LLParcelSelection>& parcelp);
00233         virtual ~LLPanelLandObjects();
00234         void refresh();
00235         virtual void draw();
00236 
00237         static void callbackReturnOwnerObjects(S32, void*);
00238         static void callbackReturnGroupObjects(S32, void*);
00239         static void callbackReturnOtherObjects(S32, void*);
00240         static void callbackReturnOwnerList(S32, void*);
00241 
00242         static void clickShowCore(LLPanelLandObjects* panelp, S32 return_type, uuid_list_t* list = 0);
00243         static void onClickShowOwnerObjects(void*);
00244         static void onClickShowGroupObjects(void*);
00245         static void onClickShowOtherObjects(void*);
00246 
00247         static void onClickReturnOwnerObjects(void*);
00248         static void onClickReturnGroupObjects(void*);
00249         static void onClickReturnOtherObjects(void*);
00250         static void onClickReturnOwnerList(void*);
00251         static void onClickRefresh(void*);
00252 
00253         static void onDoubleClickOwner(void*);  
00254 
00255         static void onCommitList(LLUICtrl* ctrl, void* data);
00256         static void onLostFocus(LLFocusableElement* caller, void* user_data);
00257         static void onCommitClean(LLUICtrl* caller, void* user_data);
00258         static void processParcelObjectOwnersReply(LLMessageSystem *msg, void **);
00259         
00260         virtual BOOL postBuild();
00261 
00262 protected:
00263 
00264         LLTextBox               *mParcelObjectBonus;
00265         LLTextBox               *mSWTotalObjects;
00266         LLTextBox               *mObjectContribution;
00267         LLTextBox               *mTotalObjects;
00268         LLTextBox               *mOwnerObjects;
00269         LLButton                *mBtnShowOwnerObjects;
00270         LLButton                *mBtnReturnOwnerObjects;
00271         LLTextBox               *mGroupObjects;
00272         LLButton                *mBtnShowGroupObjects;
00273         LLButton                *mBtnReturnGroupObjects;
00274         LLTextBox               *mOtherObjects;
00275         LLButton                *mBtnShowOtherObjects;
00276         LLButton                *mBtnReturnOtherObjects;
00277         LLTextBox               *mSelectedObjects;
00278         LLLineEditor    *mCleanOtherObjectsTime;
00279         S32                             mOtherTime;
00280         LLButton                *mBtnRefresh;
00281         LLButton                *mBtnReturnOwnerList;
00282         LLNameListCtrl  *mOwnerList;
00283 
00284         LLUIImagePtr    mIconAvatarOnline;
00285         LLUIImagePtr    mIconAvatarOffline;
00286         LLUIImagePtr    mIconGroup;
00287 
00288         BOOL                    mFirstReply;
00289 
00290         uuid_list_t             mSelectedOwners;
00291         LLString                mSelectedName;
00292         S32                             mSelectedCount;
00293         BOOL                    mSelectedIsGroup;
00294 
00295         LLSafeHandle<LLParcelSelection>&        mParcel;
00296 };
00297 
00298 
00299 class LLPanelLandOptions
00300 :       public LLPanel
00301 {
00302 public:
00303         LLPanelLandOptions(LLSafeHandle<LLParcelSelection>& parcelp);
00304         virtual ~LLPanelLandOptions();
00305         void refresh();
00306 
00307 
00308         static void onCommitAny(LLUICtrl* ctrl, void *userdata);
00309         static void onClickSet(void* userdata);
00310         static void onClickClear(void* userdata);
00311         static void onClickPublishHelp(void*);
00312 
00313         virtual BOOL postBuild();
00314         virtual void draw();
00315 
00316 protected:
00317         LLCheckBoxCtrl* mCheckEditObjects;
00318         LLCheckBoxCtrl* mCheckEditGroupObjects;
00319         LLCheckBoxCtrl* mCheckAllObjectEntry;
00320         LLCheckBoxCtrl* mCheckGroupObjectEntry;
00321         LLCheckBoxCtrl* mCheckEditLand;
00322         LLCheckBoxCtrl* mCheckSafe;
00323         LLCheckBoxCtrl* mCheckFly;
00324         LLCheckBoxCtrl* mCheckGroupScripts;
00325         LLCheckBoxCtrl* mCheckOtherScripts;
00326         LLCheckBoxCtrl* mCheckLandmark;
00327 
00328         LLCheckBoxCtrl* mCheckShowDirectory;
00329         LLComboBox*             mCategoryCombo;
00330         LLComboBox*             mLandingTypeCombo;
00331 
00332         LLTextureCtrl*  mSnapshotCtrl;
00333 
00334         LLTextBox*              mLocationText;
00335         LLButton*               mSetBtn;
00336         LLButton*               mClearBtn;
00337 
00338         LLCheckBoxCtrl          *mMatureCtrl;
00339         LLCheckBoxCtrl          *mPushRestrictionCtrl;
00340         LLButton                        *mPublishHelpButton;
00341 
00342         LLSafeHandle<LLParcelSelection>&        mParcel;
00343 };
00344 
00345 
00346 class LLPanelLandAccess
00347 :       public LLPanel
00348 {
00349 public:
00350         LLPanelLandAccess(LLSafeHandle<LLParcelSelection>& parcelp);
00351         virtual ~LLPanelLandAccess();
00352         void refresh();
00353         void refresh_ui();
00354         void refreshNames();
00355         virtual void draw();
00356 
00357         static void onCommitPublicAccess(LLUICtrl* ctrl, void *userdata);
00358         static void onCommitAny(LLUICtrl* ctrl, void *userdata);
00359         static void onClickAddAccess(void*);
00360         static void callbackAvatarCBAccess(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* userdata);
00361         static void onClickRemoveAccess(void*);
00362         static void onClickAddBanned(void*);
00363         static void callbackAvatarCBBanned(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* userdata);
00364         static void onClickRemoveBanned(void*);
00365 
00366         virtual BOOL postBuild();
00367 
00368 protected:
00369         LLNameListCtrl*         mListAccess;
00370         LLNameListCtrl*         mListBanned;
00371 
00372         LLSafeHandle<LLParcelSelection>&        mParcel;
00373 };
00374 
00375 
00376 class LLPanelLandCovenant
00377 :       public LLPanel
00378 {
00379 public:
00380         LLPanelLandCovenant(LLSafeHandle<LLParcelSelection>& parcelp);
00381         virtual ~LLPanelLandCovenant();
00382         virtual BOOL postBuild();
00383         void refresh();
00384         static void updateCovenantText(const std::string& string);
00385         static void updateEstateName(const std::string& name);
00386         static void updateLastModified(const std::string& text);
00387         static void updateEstateOwnerName(const std::string& name);
00388 
00389 protected:
00390         LLSafeHandle<LLParcelSelection>&        mParcel;
00391 };
00392 
00393 #endif

Generated on Fri May 16 08:33:28 2008 for SecondLife by  doxygen 1.5.5