diff options
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/lltextbase.cpp | 6 | ||||
-rw-r--r-- | indra/llui/lltextbase.h | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 3c6c7d3e82..826ac3b940 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -152,6 +152,7 @@ LLTextBase::Params::Params() bg_writeable_color("bg_writeable_color"), bg_focus_color("bg_focus_color"), allow_scroll("allow_scroll", true), + plain_text("plain_text",false), track_end("track_end", false), read_only("read_only", false), v_pad("v_pad", 0), @@ -200,6 +201,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p) mSelectionStart( 0 ), mSelectionEnd( 0 ), mIsSelecting( FALSE ), + mPlainText ( p.plain_text ), mWordWrap(p.wrap), mUseEllipses( p.use_ellipses ), mParseHTML(p.allow_html), @@ -1718,6 +1720,10 @@ void LLTextBase::appendLineBreakSegment(const LLStyle::Params& style_params) void LLTextBase::appendImageSegment(S32 highlight_part, const LLStyle::Params& style_params) { + if(getPlainText()) + { + return; + } segment_vec_t segments; LLStyleConstSP sp(new LLStyle(style_params)); segments.push_back(new LLImageTextSegment(sp, getLength(),*this)); diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 89ce5cdc8e..0a1b7f9ec1 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -86,6 +86,7 @@ public: track_end, read_only, allow_scroll, + plain_text, wrap, use_ellipses, allow_html, @@ -177,6 +178,9 @@ public: void setReadOnly(bool read_only) { mReadOnly = read_only; } bool getReadOnly() { return mReadOnly; } + void setPlainText(bool value) { mPlainText = value;} + bool getPlainText() const { return mPlainText; } + // cursor manipulation bool setCursor(S32 row, S32 column); bool setCursorPos(S32 cursor_pos, bool keep_cursor_offset = false); @@ -366,6 +370,7 @@ protected: bool mReadOnly; bool mBGVisible; // render background? bool mClipPartial; // false if we show lines that are partially inside bounding rect + bool mPlainText; // didn't use Image or Icon segments S32 mMaxTextByteLength; // Maximum length mText is allowed to be in bytes // support widgets |