diff options
author | Josh Bell <josh@lindenlab.com> | 2008-02-14 01:45:59 +0000 |
---|---|---|
committer | Josh Bell <josh@lindenlab.com> | 2008-02-14 01:45:59 +0000 |
commit | 98fd90ddd6595f2ee7e626c14117f51def621ec5 (patch) | |
tree | 9a9caf8bffa53b753fe850f445bd133195e9bb03 /indra/newview/llparcelselection.h | |
parent | 89d938efe371645756240da72f4c359c36985060 (diff) |
svn merge -r 79730:79944 svn+ssh://svn.lindenlab.com/svn/linden/branches/parcel_media/sl-parcelmedia-6 --> release
QAR-275 Parcel Media
Sam made me do it.
Diffstat (limited to 'indra/newview/llparcelselection.h')
-rw-r--r-- | indra/newview/llparcelselection.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/indra/newview/llparcelselection.h b/indra/newview/llparcelselection.h new file mode 100644 index 0000000000..579a0f2549 --- /dev/null +++ b/indra/newview/llparcelselection.h @@ -0,0 +1,63 @@ +/** + * @file llparcelselection.h + * @brief Information about the currently selected parcel + * + * Copyright (c) 2007-$CurrentYear$, Linden Research, Inc. + * $License$ + */ + +#ifndef LLPARCELSELECTION_H +#define LLPARCELSELECTION_H + +#include "llmemory.h" + +class LLParcel; + +class LLParcelSelection : public LLRefCount +{ + friend class LLViewerParcelMgr; + +protected: + ~LLParcelSelection(); + +public: + LLParcelSelection(LLParcel* parcel); + LLParcelSelection(); + + // this can return NULL at any time, as parcel selection + // might have been invalidated. + LLParcel* getParcel() { return mParcel; } + + // Return the number of grid units that are owned by you within + // the selection (computed by server). + S32 getSelfCount() const { return mSelectedSelfCount; } + + // Returns area that will actually be claimed in meters squared. + S32 getClaimableArea() const; + bool hasOthersSelected() const; + + // Does the selection have multiple land owners in it? + BOOL getMultipleOwners() const; + + // Is the entire parcel selected, or just a part? + BOOL getWholeParcelSelected() const; + + static LLParcelSelection* getNullParcelSelection(); + +private: + void setParcel(LLParcel* parcel) { mParcel = parcel; } + +private: + LLParcel* mParcel; + BOOL mSelectedMultipleOwners; + BOOL mWholeParcelSelected; + S32 mSelectedSelfCount; + S32 mSelectedOtherCount; + S32 mSelectedPublicCount; + + static LLPointer<LLParcelSelection> sNullSelection; +}; + +typedef LLHandle<LLParcelSelection> LLParcelSelectionHandle; + +#endif |