summaryrefslogtreecommitdiff
path: root/indra/llui/llfloater.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-02-07 19:29:10 -0800
committerRichard Linden <none@none>2012-02-07 19:29:10 -0800
commit4e08461f8ad23fb75ca8587c781c2cf65351b1ab (patch)
treec6f48cdffa3c3436d517b808b3d432f095eee159 /indra/llui/llfloater.h
parentd56be1f1751f66bff09f0d223ed4712974e69e09 (diff)
EXP-1181 WIP as a designer I would like to specify default floater positions using realtive coordinates
changed over to new convert() method added LLCoordFloater
Diffstat (limited to 'indra/llui/llfloater.h')
-rw-r--r--indra/llui/llfloater.h35
1 files changed, 32 insertions, 3 deletions
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 1eb8c964f9..a7cc9ae961 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -82,9 +82,37 @@ namespace LLInitParam
};
}
-struct LL_COORD_FLOATER;
+struct LL_COORD_FLOATER
+{
+ typedef F32 value_t;
+
+ LLCoordCommon convertToCommon() const;
+ void convertFromCommon(const LLCoordCommon& from);
+protected:
+ LLHandle<LLFloater> mFloater;
+};
+
+struct LLCoordFloater : LLCoord<LL_COORD_FLOATER>
+{
+ typedef LLCoord<LL_COORD_FLOATER> coord_t;
-typedef LLCoord<LL_COORD_FLOATER, F32> LLCoordFloater;
+ LLCoordFloater() {}
+ LLCoordFloater(F32 x, F32 y, LLFloater& floater);
+ LLCoordFloater(const LLCoordCommon& other, LLFloater& floater);
+
+ LLCoordFloater& operator=(const LLCoordCommon& other)
+ {
+ convertFromCommon(other);
+ return *this;
+ }
+
+ LLCoordFloater& operator=(const LLCoordFloater& other);
+
+ bool operator==(const LLCoordFloater& other) const;
+ bool operator!=(const LLCoordFloater& other) const { return !(*this == other); }
+
+ void setFloater(LLFloater& floater);
+};
class LLFloater : public LLPanel, public LLInstanceTracker<LLFloater>
{
@@ -187,7 +215,7 @@ public:
bool initFloaterXML(LLXMLNodePtr node, LLView *parent, const std::string& filename, LLXMLNodePtr output_node = NULL);
/*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false);
- /*virtual*/ BOOL canSnapTo(const LLView* other_view);
+ /*virtual*/ BOOL canSnapTo(const LLView* other_view);
/*virtual*/ void setSnappedTo(const LLView* snap_view);
/*virtual*/ void setFocus( BOOL b );
/*virtual*/ void setIsChrome(BOOL is_chrome);
@@ -428,6 +456,7 @@ private:
LLFloaterEnums::EOpenPositioning mOpenPositioning;
S32 mSpecifiedLeft;
S32 mSpecifiedBottom;
+ LLCoordFloater mPosition;
S32 mMinWidth;
S32 mMinHeight;