diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-02-19 21:42:32 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-02-19 21:42:32 +0000 |
commit | 2e32d44e7165775936beae5d9ef636ff9d3f2bd2 (patch) | |
tree | 8153bc399994aabf6e1c41c2d8332e4e8c4ddb78 /indra/llui/llstyle.h | |
parent | db0f5847ea8b96b3c1ac08e7aeb43d83daacb8e4 (diff) |
merge svn+ssh://svn.lindenlab.com/svn/linden/qa/combo-merge-ui-2008-02-13 -r 79986 : 80178 -> release.
QAR-290 = QAR-271 + QAR-191
Diffstat (limited to 'indra/llui/llstyle.h')
-rw-r--r-- | indra/llui/llstyle.h | 51 |
1 files changed, 33 insertions, 18 deletions
diff --git a/indra/llui/llstyle.h b/indra/llui/llstyle.h index 809253fd9b..b425640a36 100644 --- a/indra/llui/llstyle.h +++ b/indra/llui/llstyle.h @@ -46,36 +46,52 @@ public: LLStyle &operator=(const LLStyle &rhs); - virtual ~LLStyle(); + virtual ~LLStyle() { } virtual void init (BOOL is_visible, const LLColor4 &color, const LLString& font_name); - virtual void free (); - bool operator==(const LLStyle &rhs) const; - bool operator!=(const LLStyle &rhs) const; + virtual const LLColor4& getColor() const { return mColor; } + virtual void setColor(const LLColor4 &color) { mColor = color; } - virtual const LLColor4& getColor() const; - virtual void setColor(const LLColor4 &color); + virtual BOOL isVisible() const { return mVisible; } + virtual void setVisible(BOOL is_visible) { mVisible = is_visible; } - virtual BOOL isVisible() const; - virtual void setVisible(BOOL is_visible); - - virtual const LLString& getFontString() const; + virtual const LLString& getFontString() const { return mFontName; } virtual void setFontName(const LLString& fontname); - virtual LLFONT_ID getFontID() const; + virtual LLFONT_ID getFontID() const { return mFontID; } - virtual const LLString& getLinkHREF() const; - virtual void setLinkHREF(const LLString& fontname); - virtual BOOL isLink() const; + virtual const LLString& getLinkHREF() const { return mLink; } + virtual void setLinkHREF(const LLString& href) { mLink = href; } + virtual BOOL isLink() const { return mLink.size(); } - virtual LLImageGL *getImage() const; + virtual LLImageGL *getImage() const { return mImagep; } virtual void setImage(const LLString& src); - virtual BOOL isImage() const; + virtual BOOL isImage() const { return ((mImageWidth != 0) && (mImageHeight != 0)); } virtual void setImageSize(S32 width, S32 height); BOOL getIsEmbeddedItem() const { return mIsEmbeddedItem; } void setIsEmbeddedItem( BOOL b ) { mIsEmbeddedItem = b; } + // inlined here to make it easier to compare to member data below. -MG + bool operator==(const LLStyle &rhs) const + { + return + mVisible == rhs.isVisible() + && mColor == rhs.getColor() + && mFontName == rhs.getFontString() + && mLink == rhs.getLinkHREF() + && mImagep == rhs.mImagep + && mImageHeight == rhs.mImageHeight + && mImageWidth == rhs.mImageWidth + && mItalic == rhs.mItalic + && mBold == rhs.mBold + && mUnderline == rhs.mUnderline + && mDropShadow == rhs.mDropShadow + && mIsEmbeddedItem == rhs.mIsEmbeddedItem; + } + + bool operator!=(const LLStyle& rhs) const { return !(*this == rhs); } + public: BOOL mItalic; BOOL mBold; @@ -84,14 +100,13 @@ public: S32 mImageWidth; S32 mImageHeight; -protected: +private: BOOL mVisible; LLColor4 mColor; LLString mFontName; LLFONT_ID mFontID; LLString mLink; LLPointer<LLImageGL> mImagep; - BOOL mIsEmbeddedItem; }; |