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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 // Select the entire text range. If |reversed| is true, the range will end at | 328 // Select the entire text range. If |reversed| is true, the range will end at |
329 // the logical beginning of the text; this generally shows the leading portion | 329 // the logical beginning of the text; this generally shows the leading portion |
330 // of text that overflows its display area. | 330 // of text that overflows its display area. |
331 void SelectAll(bool reversed); | 331 void SelectAll(bool reversed); |
332 | 332 |
333 // Selects the word at the current cursor position. If there is a non-empty | 333 // Selects the word at the current cursor position. If there is a non-empty |
334 // selection, the selection bounds are extended to their nearest word | 334 // selection, the selection bounds are extended to their nearest word |
335 // boundaries. | 335 // boundaries. |
336 void SelectWord(); | 336 void SelectWord(); |
337 | 337 |
338 const Range& GetCompositionRange() const; | |
339 void SetCompositionRange(const Range& composition_range); | 338 void SetCompositionRange(const Range& composition_range); |
340 | 339 |
341 // Set the text color over the entire text or a logical character range. | 340 // Set the text color over the entire text or a logical character range. |
342 // The |range| should be valid, non-reversed, and within [0, text().length()]. | 341 // The |range| should be valid, non-reversed, and within [0, text().length()]. |
343 void SetColor(SkColor value); | 342 void SetColor(SkColor value); |
344 void ApplyColor(SkColor value, const Range& range); | 343 void ApplyColor(SkColor value, const Range& range); |
345 | 344 |
346 // Set the baseline style over the entire text or a logical character range. | 345 // Set the baseline style over the entire text or a logical character range. |
347 // The |range| should be valid, non-reversed, and within [0, text().length()]. | 346 // The |range| should be valid, non-reversed, and within [0, text().length()]. |
348 void SetBaselineStyle(BaselineStyle value); | 347 void SetBaselineStyle(BaselineStyle value); |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
800 // Lines computed by EnsureLayout. These should be invalidated upon | 799 // Lines computed by EnsureLayout. These should be invalidated upon |
801 // OnLayoutTextAttributeChanged and OnDisplayTextAttributeChanged calls. | 800 // OnLayoutTextAttributeChanged and OnDisplayTextAttributeChanged calls. |
802 std::vector<internal::Line> lines_; | 801 std::vector<internal::Line> lines_; |
803 | 802 |
804 DISALLOW_COPY_AND_ASSIGN(RenderText); | 803 DISALLOW_COPY_AND_ASSIGN(RenderText); |
805 }; | 804 }; |
806 | 805 |
807 } // namespace gfx | 806 } // namespace gfx |
808 | 807 |
809 #endif // UI_GFX_RENDER_TEXT_H_ | 808 #endif // UI_GFX_RENDER_TEXT_H_ |
OLD | NEW |