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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 VisualCursorDirection direction); | 360 VisualCursorDirection direction); |
361 | 361 |
362 // Get the selection model visually left/right of |selection| by one grapheme. | 362 // Get the selection model visually left/right of |selection| by one grapheme. |
363 // The returned value represents a cursor/caret position without a selection. | 363 // The returned value represents a cursor/caret position without a selection. |
364 virtual SelectionModel AdjacentCharSelectionModel( | 364 virtual SelectionModel AdjacentCharSelectionModel( |
365 const SelectionModel& selection, | 365 const SelectionModel& selection, |
366 VisualCursorDirection direction) = 0; | 366 VisualCursorDirection direction) = 0; |
367 | 367 |
368 // Get the selection model visually left/right of |selection| by one word. | 368 // Get the selection model visually left/right of |selection| by one word. |
369 // The returned value represents a cursor/caret position without a selection. | 369 // The returned value represents a cursor/caret position without a selection. |
370 virtual SelectionModel AdjacentWordSelectionModel( | 370 SelectionModel AdjacentWordSelectionModel(const SelectionModel& selection, |
371 const SelectionModel& selection, | 371 VisualCursorDirection direction); |
372 VisualCursorDirection direction) = 0; | |
373 | 372 |
374 // Get the SelectionModels corresponding to visual text ends. | 373 // Get the SelectionModels corresponding to visual text ends. |
375 // The returned value represents a cursor/caret position without a selection. | 374 // The returned value represents a cursor/caret position without a selection. |
376 SelectionModel EdgeSelectionModel(VisualCursorDirection direction); | 375 SelectionModel EdgeSelectionModel(VisualCursorDirection direction); |
377 | 376 |
378 // Sets the selection model, the argument is assumed to be valid. | 377 // Sets the selection model, the argument is assumed to be valid. |
379 virtual void SetSelectionModel(const SelectionModel& model); | 378 virtual void SetSelectionModel(const SelectionModel& model); |
380 | 379 |
381 // Get the horizontal bounds (relative to the left of the text, not the view) | 380 // Get the horizontal bounds (relative to the left of the text, not the view) |
382 // of the glyph starting at |index|. If the glyph is RTL then the returned | 381 // of the glyph starting at |index|. If the glyph is RTL then the returned |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 | 571 |
573 // Text shadows to be drawn. | 572 // Text shadows to be drawn. |
574 ShadowValues text_shadows_; | 573 ShadowValues text_shadows_; |
575 | 574 |
576 DISALLOW_COPY_AND_ASSIGN(RenderText); | 575 DISALLOW_COPY_AND_ASSIGN(RenderText); |
577 }; | 576 }; |
578 | 577 |
579 } // namespace gfx | 578 } // namespace gfx |
580 | 579 |
581 #endif // UI_GFX_RENDER_TEXT_H_ | 580 #endif // UI_GFX_RENDER_TEXT_H_ |
OLD | NEW |