diff options
author | Callum Linden <113564339+callumlinden@users.noreply.github.com> | 2023-03-07 11:46:27 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-07 11:46:27 -0800 |
commit | 6b0b751a207737c06544ac4de13174661b1dcb35 (patch) | |
tree | 95f472eabe4407cca653af3a867808f32402551c /indra/llui/lltextbase.h | |
parent | 98f0656f5c21a9469984cc8c916a1310d2fc2849 (diff) | |
parent | 4072fd84fb201e37827a6a98264fadea18fd30e4 (diff) |
Merge pull request #83 from KittyBarnett/DRTVWR-489-emoji
Drtvwr 489 emoji
Diffstat (limited to 'indra/llui/lltextbase.h')
-rw-r--r-- | indra/llui/lltextbase.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index e3cf56a5ee..9b3691e404 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -178,6 +178,18 @@ protected: /*virtual*/ const S32 getLength() const; }; +// Text segment that represents a single emoji character that has a different style (=font size) than the rest of +// the document it belongs to +class LLEmojiTextSegment : public LLNormalTextSegment +{ +public: + LLEmojiTextSegment(LLStyleConstSP style, S32 start, S32 end, LLTextBase& editor); + LLEmojiTextSegment(const LLColor4& color, S32 start, S32 end, LLTextBase& editor, BOOL is_visible = TRUE); + + bool canEdit() const override { return false; } + BOOL handleToolTip(S32 x, S32 y, MASK mask) override; +}; + // Text segment that changes it's style depending of mouse pointer position ( is it inside or outside segment) class LLOnHoverChangeableTextSegment : public LLNormalTextSegment { @@ -316,6 +328,7 @@ public: plain_text, wrap, use_ellipses, + use_color, parse_urls, force_urls_external, parse_highlights, @@ -335,6 +348,8 @@ public: Optional<LLFontGL::ShadowType> font_shadow; + Optional<LLFontGL::VAlign> text_valign; + Params(); }; @@ -394,6 +409,7 @@ public: // used by LLTextSegment layout code bool getWordWrap() { return mWordWrap; } bool getUseEllipses() { return mUseEllipses; } + bool getUseColor() { return mUseColor; } bool truncate(); // returns true of truncation occurred bool isContentTrusted() {return mTrustedContent;} @@ -687,8 +703,9 @@ protected: // configuration S32 mHPad; // padding on left of text S32 mVPad; // padding above text - LLFontGL::HAlign mHAlign; - LLFontGL::VAlign mVAlign; + LLFontGL::HAlign mHAlign; // horizontal alignment of the document in its entirety + LLFontGL::VAlign mVAlign; // vertical alignment of the document in its entirety + LLFontGL::VAlign mTextVAlign; // vertical alignment of a text segment within a single line of text F32 mLineSpacingMult; // multiple of line height used as space for a single line of text (e.g. 1.5 to get 50% padding) S32 mLineSpacingPixels; // padding between lines bool mBorderVisible; @@ -697,6 +714,7 @@ protected: bool mParseHighlights; // highlight user-defined keywords bool mWordWrap; bool mUseEllipses; + bool mUseColor; bool mTrackEnd; // if true, keeps scroll position at end of document during resize bool mReadOnly; bool mBGVisible; // render background? |