OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_GFX_RENDER_TEXT_H_ | 5 #ifndef UI_GFX_RENDER_TEXT_H_ |
6 #define UI_GFX_RENDER_TEXT_H_ | 6 #define UI_GFX_RENDER_TEXT_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 void SetDisplayOffset(int horizontal_offset); | 491 void SetDisplayOffset(int horizontal_offset); |
492 | 492 |
493 // Returns the line offset from the origin after applying the text alignment | 493 // Returns the line offset from the origin after applying the text alignment |
494 // and the display offset. | 494 // and the display offset. |
495 Vector2d GetLineOffset(size_t line_number); | 495 Vector2d GetLineOffset(size_t line_number); |
496 | 496 |
497 protected: | 497 protected: |
498 RenderText(); | 498 RenderText(); |
499 | 499 |
500 // NOTE: The value of these accessors may be stale. Please make sure | 500 // NOTE: The value of these accessors may be stale. Please make sure |
501 // that these fields are up-to-date before accessing them. | 501 // that these fields are up to date before accessing them. |
502 const base::string16& layout_text() const { return layout_text_; } | 502 const base::string16& layout_text() const { return layout_text_; } |
503 const base::string16& display_text() const { return display_text_; } | 503 const base::string16& display_text() const { return display_text_; } |
504 bool text_elided() const { return text_elided_; } | 504 bool text_elided() const { return text_elided_; } |
505 | 505 |
506 const BreakList<SkColor>& colors() const { return colors_; } | 506 const BreakList<SkColor>& colors() const { return colors_; } |
507 const BreakList<BaselineStyle>& baselines() const { return baselines_; } | 507 const BreakList<BaselineStyle>& baselines() const { return baselines_; } |
508 const BreakList<Font::Weight>& weights() const { return weights_; } | 508 const BreakList<Font::Weight>& weights() const { return weights_; } |
509 const std::vector<BreakList<bool> >& styles() const { return styles_; } | 509 const std::vector<BreakList<bool> >& styles() const { return styles_; } |
510 | 510 |
511 const std::vector<internal::Line>& lines() const { return lines_; } | 511 const std::vector<internal::Line>& lines() const { return lines_; } |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 // Lines computed by EnsureLayout. These should be invalidated upon | 845 // Lines computed by EnsureLayout. These should be invalidated upon |
846 // OnLayoutTextAttributeChanged and OnDisplayTextAttributeChanged calls. | 846 // OnLayoutTextAttributeChanged and OnDisplayTextAttributeChanged calls. |
847 std::vector<internal::Line> lines_; | 847 std::vector<internal::Line> lines_; |
848 | 848 |
849 DISALLOW_COPY_AND_ASSIGN(RenderText); | 849 DISALLOW_COPY_AND_ASSIGN(RenderText); |
850 }; | 850 }; |
851 | 851 |
852 } // namespace gfx | 852 } // namespace gfx |
853 | 853 |
854 #endif // UI_GFX_RENDER_TEXT_H_ | 854 #endif // UI_GFX_RENDER_TEXT_H_ |
OLD | NEW |