Index: ui/gfx/render_text.h |
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h |
index 9fb6151697bf12b04fd6739792f595f283f0a2df..0ec4f3190eb74997d5bbbde01c260253294bce02 100644 |
--- a/ui/gfx/render_text.h |
+++ b/ui/gfx/render_text.h |
@@ -241,6 +241,8 @@ class GFX_EXPORT RenderText { |
// cleared when SetText or SetObscured is called. |
void SetObscuredRevealIndex(int index); |
+ void SetReplaceNewlineCharsWithSymbols(bool replace); |
Alexei Svitkine (slow)
2014/07/15 14:42:50
Add a comment.
msw
2014/07/15 16:53:05
Done.
|
+ |
// TODO(ckocagil): Multiline text rendering is currently only supported on |
// Windows. Support other platforms. |
bool multiline() const { return multiline_; } |
@@ -255,6 +257,7 @@ class GFX_EXPORT RenderText { |
// The layout text will be elided to fit |display_rect| using this behavior. |
// The layout text may be shortened further by the truncate length. |
void SetElideBehavior(ElideBehavior elide_behavior); |
+ ElideBehavior elide_behavior() const { return elide_behavior_; } |
const base::string16& layout_text() const { return layout_text_; } |
@@ -406,6 +409,7 @@ class GFX_EXPORT RenderText { |
// Sets shadows to drawn with text. |
void set_shadows(const ShadowValues& shadows) { shadows_ = shadows; } |
+ const ShadowValues& shadows() { return shadows_; } |
typedef std::pair<Font, Range> FontSpan; |
// For testing purposes, returns which fonts were chosen for which parts of |
@@ -530,6 +534,9 @@ class GFX_EXPORT RenderText { |
// Convert a text space x-coordinate range to rects in view space. |
std::vector<Rect> TextBoundsToViewBounds(const Range& x); |
+ // Get the alignment, resolving ALIGN_TO_HEAD with the current text direction. |
+ HorizontalAlignment GetCurrentHorizontalAlignment(); |
+ |
// Returns the line offset from the origin, accounts for text alignment only. |
Vector2d GetAlignmentOffset(size_t line_number); |
@@ -666,6 +673,9 @@ class GFX_EXPORT RenderText { |
// The obscured and/or truncated text that will be displayed. |
base::string16 layout_text_; |
+ // Whether newline characters should be replaced with newline symbols. |
+ bool replace_newline_chars_with_symbols_; |
+ |
// Whether the text should be broken into multiple lines. Uses the width of |
// |display_rect_| as the width cap. |
bool multiline_; |