| 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 <algorithm> | 8 #include <algorithm> |
| 9 #include <cstring> | 9 #include <cstring> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // Maximum baseline of all segments on this line. | 144 // Maximum baseline of all segments on this line. |
| 145 int baseline; | 145 int baseline; |
| 146 }; | 146 }; |
| 147 | 147 |
| 148 } // namespace internal | 148 } // namespace internal |
| 149 | 149 |
| 150 // RenderText represents an abstract model of styled text and its corresponding | 150 // RenderText represents an abstract model of styled text and its corresponding |
| 151 // visual layout. Support is built in for a cursor, a selection, simple styling, | 151 // visual layout. Support is built in for a cursor, a selection, simple styling, |
| 152 // complex scripts, and bi-directional text. Implementations provide mechanisms | 152 // complex scripts, and bi-directional text. Implementations provide mechanisms |
| 153 // for rendering and translation between logical and visual data. | 153 // for rendering and translation between logical and visual data. |
| 154 class UI_EXPORT RenderText { | 154 class GFX_EXPORT RenderText { |
| 155 public: | 155 public: |
| 156 virtual ~RenderText(); | 156 virtual ~RenderText(); |
| 157 | 157 |
| 158 // Creates a platform-specific RenderText instance. | 158 // Creates a platform-specific RenderText instance. |
| 159 static RenderText* CreateInstance(); | 159 static RenderText* CreateInstance(); |
| 160 | 160 |
| 161 const base::string16& text() const { return text_; } | 161 const base::string16& text() const { return text_; } |
| 162 void SetText(const base::string16& text); | 162 void SetText(const base::string16& text); |
| 163 | 163 |
| 164 HorizontalAlignment horizontal_alignment() const { | 164 HorizontalAlignment horizontal_alignment() const { |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 // Lines computed by EnsureLayout. These should be invalidated with | 636 // Lines computed by EnsureLayout. These should be invalidated with |
| 637 // ResetLayout and on |display_rect_| changes. | 637 // ResetLayout and on |display_rect_| changes. |
| 638 std::vector<internal::Line> lines_; | 638 std::vector<internal::Line> lines_; |
| 639 | 639 |
| 640 DISALLOW_COPY_AND_ASSIGN(RenderText); | 640 DISALLOW_COPY_AND_ASSIGN(RenderText); |
| 641 }; | 641 }; |
| 642 | 642 |
| 643 } // namespace gfx | 643 } // namespace gfx |
| 644 | 644 |
| 645 #endif // UI_GFX_RENDER_TEXT_H_ | 645 #endif // UI_GFX_RENDER_TEXT_H_ |
| OLD | NEW |