summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.h
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-07-27 10:44:17 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-07-27 10:44:17 +0100
commite543691aec8ad19762d6216dd53466d1d42ced1a (patch)
treed0033f26a9f75073ba28a9f87e2bd9be641d7444 /indra/llui/lltextbase.h
parent5904c4770ca06fbda6c4176ebd5f1b3a0c4e6518 (diff)
parent0c8cddecc16d5bd25a2eb5159333ada1dec59259 (diff)
merge from PE's viewer-trunk
Diffstat (limited to 'indra/llui/lltextbase.h')
-rw-r--r--indra/llui/lltextbase.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index 86f0e55a1d..4b83d5effb 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -145,6 +145,21 @@ protected:
boost::signals2::connection mImageLoadedConnection;
};
+// Text segment that changes it's style depending of mouse pointer position ( is it inside or outside segment)
+class LLOnHoverChangeableTextSegment : public LLNormalTextSegment
+{
+public:
+ LLOnHoverChangeableTextSegment( LLStyleConstSP style, LLStyleConstSP normal_style, S32 start, S32 end, LLTextBase& editor );
+ /*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect);
+ /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
+protected:
+ // Style used for text when mouse pointer is over segment
+ LLStyleConstSP mHoveredStyle;
+ // Style used for text when mouse pointer is outside segment
+ LLStyleConstSP mNormalStyle;
+
+};
+
class LLIndexSegment : public LLTextSegment
{
public:
@@ -443,7 +458,7 @@ protected:
S32 insertStringNoUndo(S32 pos, const LLWString &wstr, segment_vec_t* segments = NULL); // returns num of chars actually inserted
S32 removeStringNoUndo(S32 pos, S32 length);
S32 overwriteCharNoUndo(S32 pos, llwchar wc);
- void appendAndHighlightText(const std::string &new_text, S32 highlight_part, const LLStyle::Params& stylep);
+ void appendAndHighlightText(const std::string &new_text, S32 highlight_part, const LLStyle::Params& stylep, bool underline_on_hover_only = false);
// manage segments
@@ -486,7 +501,7 @@ protected:
void replaceUrlLabel(const std::string &url, const std::string &label);
void appendTextImpl(const std::string &new_text, const LLStyle::Params& input_params = LLStyle::Params());
- void appendAndHighlightTextImpl(const std::string &new_text, S32 highlight_part, const LLStyle::Params& style_params);
+ void appendAndHighlightTextImpl(const std::string &new_text, S32 highlight_part, const LLStyle::Params& style_params, bool underline_on_hover_only = false);
protected: