summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.h
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@lindenlab.com>2009-11-03 13:39:02 -0800
committerBryan O'Sullivan <bos@lindenlab.com>2009-11-03 13:39:02 -0800
commit28ed8f84d86403cf90b7963b147d2ac5c6cf37c7 (patch)
treecebb2895642b96aa64e8cf8c2eb402e8423165d6 /indra/llui/lltextbase.h
parent9c3595465972ba4be916e871f6b0a62cc0c13d4a (diff)
parent63b9bd43ff41da01d549f630bd838caff0dffd97 (diff)
Merge with SVN render-pipeline-8 branch
Diffstat (limited to 'indra/llui/lltextbase.h')
-rw-r--r--indra/llui/lltextbase.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index f0b8878491..4cca522a23 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -154,6 +154,9 @@ public:
LLRect getContentsRect();
LLRect getVisibleDocumentRect() const;
+ S32 getVPad() { return mVPad; }
+ S32 getHPad() { return mHPad; }
+
S32 getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round ) const;
LLRect getLocalRectFromDocIndex(S32 pos) const;
@@ -294,7 +297,7 @@ protected:
void endSelection();
// misc
- void updateTextRect();
+ void updateRects();
void needsReflow() { mReflowNeeded = TRUE; }
void needsScroll() { mScrollNeeded = TRUE; }
void replaceUrlLabel(const std::string &url, const std::string &label);
@@ -459,7 +462,17 @@ public:
class LLInlineViewSegment : public LLTextSegment
{
public:
- LLInlineViewSegment(LLView* widget, S32 start, S32 end, bool force_new_line, S32 hpad = 0, S32 vpad = 0);
+ struct Params : public LLInitParam::Block<Params>
+ {
+ Mandatory<LLView*> view;
+ Optional<bool> force_newline;
+ Optional<S32> left_pad,
+ right_pad,
+ bottom_pad,
+ top_pad;
+ };
+
+ LLInlineViewSegment(const Params& p, S32 start, S32 end);
~LLInlineViewSegment();
/*virtual*/ void getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
/*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars) const;
@@ -470,8 +483,10 @@ public:
/*virtual*/ void linkToDocument(class LLTextBase* editor);
private:
- S32 mHPad;
- S32 mVPad;
+ S32 mLeftPad;
+ S32 mRightPad;
+ S32 mTopPad;
+ S32 mBottomPad;
LLView* mView;
bool mForceNewLine;
};