| Index: ui/gfx/render_text.h
|
| diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h
|
| index 32ad44bf5ed3433f56f8a02282c9b1eec57155db..f27293b646177ef070dbe0b247bcf60dd56ac2e4 100644
|
| --- a/ui/gfx/render_text.h
|
| +++ b/ui/gfx/render_text.h
|
| @@ -211,6 +211,10 @@ class GFX_EXPORT RenderText {
|
| // Creates another instance of the same concrete class.
|
| virtual std::unique_ptr<RenderText> CreateInstanceOfSameType() const = 0;
|
|
|
| + // Like above but copies all style settings too.
|
| + std::unique_ptr<RenderText> CreateInstanceOfSameStyle(
|
| + const base::string16& text) const;
|
| +
|
| const base::string16& text() const { return text_; }
|
| void SetText(const base::string16& text);
|
| void AppendText(const base::string16& text);
|
| @@ -266,6 +270,12 @@ class GFX_EXPORT RenderText {
|
| bool multiline() const { return multiline_; }
|
| void SetMultiline(bool multiline);
|
|
|
| + // If multiline, a non-zero value will cap the number of lines rendered,
|
| + // and elide the rest (currently only ELIDE_TAIL supported.)
|
| + void SetMaxLines(size_t max_lines);
|
| + size_t max_lines() const { return max_lines_; }
|
| + size_t GetNumLines();
|
| +
|
| // TODO(mukai): ELIDE_LONG_WORDS is not supported.
|
| WordWrapBehavior word_wrap_behavior() const { return word_wrap_behavior_; }
|
| void SetWordWrapBehavior(WordWrapBehavior behavior);
|
| @@ -778,6 +788,9 @@ class GFX_EXPORT RenderText {
|
| // |display_rect_| as the width cap.
|
| bool multiline_;
|
|
|
| + // If multiple lines, the maximum number of lines to render, or 0.
|
| + size_t max_lines_;
|
| +
|
| // The wrap behavior when the text is broken into lines. Do nothing unless
|
| // |multiline_| is set. The default value is IGNORE_LONG_WORDS.
|
| WordWrapBehavior word_wrap_behavior_;
|
|
|