summaryrefslogtreecommitdiff
path: root/indra/llui/llstyle.h
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-10-17 16:56:21 +0300
committerGitHub <noreply@github.com>2024-10-17 16:56:21 +0300
commit0ef7a9b39cf72da1211039ab22bdf8f9f6a2c984 (patch)
tree6f51ef179497265b5bff2a355471ae5dc9643ad2 /indra/llui/llstyle.h
parent9e24b300d02e5627ea0d304d412cb683ec2de3a4 (diff)
parentd3d349ae0f17a72481f30b9354b9367b1cd3b639 (diff)
Merge pull request #2856 from secondlife/marchcat/c-develop
Develop → Maint C sync
Diffstat (limited to 'indra/llui/llstyle.h')
-rw-r--r--indra/llui/llstyle.h37
1 files changed, 24 insertions, 13 deletions
diff --git a/indra/llui/llstyle.h b/indra/llui/llstyle.h
index 2a60bd265e..d3a50f99a5 100644
--- a/indra/llui/llstyle.h
+++ b/indra/llui/llstyle.h
@@ -33,6 +33,10 @@
#include "lluiimage.h"
class LLFontGL;
+class LLStyle;
+
+typedef LLPointer<LLStyle> LLStyleSP;
+typedef LLPointer<const LLStyle> LLStyleConstSP;
class LLStyle : public LLRefCount
{
@@ -44,6 +48,7 @@ public:
Optional<LLUIColor> color,
readonly_color,
selected_color;
+ Optional<F32> alpha;
Optional<const LLFontGL*> font;
Optional<LLUIImage*> image;
Optional<std::string> link_href;
@@ -51,6 +56,9 @@ public:
Params();
};
LLStyle(const Params& p = Params());
+ LLStyleSP clone() const { return makeCopy(); }
+ LLStyleConstSP cloneConst() const { return makeCopy(); }
+
public:
const LLUIColor& getColor() const { return mColor; }
void setColor(const LLUIColor &color) { mColor = color; }
@@ -61,8 +69,11 @@ public:
const LLUIColor& getSelectedColor() const { return mSelectedColor; }
void setSelectedColor(const LLUIColor& color) { mSelectedColor = color; }
- BOOL isVisible() const;
- void setVisible(BOOL is_visible);
+ F32 getAlpha() const { return mAlpha; }
+ void setAlpha(F32 alpha) { mAlpha = alpha; }
+
+ bool isVisible() const;
+ void setVisible(bool is_visible);
LLFontGL::ShadowType getShadowType() const { return mDropShadow; }
@@ -71,13 +82,13 @@ public:
const std::string& getLinkHREF() const { return mLink; }
void setLinkHREF(const std::string& href);
- BOOL isLink() const;
+ bool isLink() const;
LLPointer<LLUIImage> getImage() const;
void setImage(const LLUUID& src);
void setImage(const std::string& name);
- BOOL isImage() const { return mImagep.notNull(); }
+ bool isImage() const { return mImagep.notNull(); }
bool operator==(const LLStyle &rhs) const
{
@@ -89,7 +100,8 @@ public:
&& mFont == rhs.mFont
&& mLink == rhs.mLink
&& mImagep == rhs.mImagep
- && mDropShadow == rhs.mDropShadow;
+ && mDropShadow == rhs.mDropShadow
+ && mAlpha == rhs.mAlpha;
}
bool operator!=(const LLStyle& rhs) const { return !(*this == rhs); }
@@ -98,21 +110,20 @@ public:
LLFontGL::ShadowType mDropShadow;
protected:
- ~LLStyle() { }
+ ~LLStyle() = default;
+ LLStyle* makeCopy() const;
private:
- BOOL mVisible;
+ std::string mFontName;
+ std::string mLink;
LLUIColor mColor;
LLUIColor mReadOnlyColor;
LLUIColor mSelectedColor;
- std::string mFontName;
const LLFontGL* mFont;
- std::string mLink;
- bool mIsLink;
LLPointer<LLUIImage> mImagep;
+ F32 mAlpha;
+ bool mVisible;
+ bool mIsLink;
};
-typedef LLPointer<LLStyle> LLStyleSP;
-typedef LLPointer<const LLStyle> LLStyleConstSP;
-
#endif // LL_LLSTYLE_H