| 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_WIN_H_ | 5 #ifndef UI_GFX_RENDER_TEXT_WIN_H_ |
| 6 #define UI_GFX_RENDER_TEXT_WIN_H_ | 6 #define UI_GFX_RENDER_TEXT_WIN_H_ |
| 7 | 7 |
| 8 #include <usp10.h> | 8 #include <usp10.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 void ItemizeLogicalText(); | 95 void ItemizeLogicalText(); |
| 96 void LayoutVisualText(); | 96 void LayoutVisualText(); |
| 97 void LayoutTextRun(internal::TextRun* run); | 97 void LayoutTextRun(internal::TextRun* run); |
| 98 | 98 |
| 99 // Helper function that calls |ScriptShape()| on the run, which has logic to | 99 // Helper function that calls |ScriptShape()| on the run, which has logic to |
| 100 // handle E_OUTOFMEMORY return codes. | 100 // handle E_OUTOFMEMORY return codes. |
| 101 HRESULT ShapeTextRunWithFont(internal::TextRun* run, const Font& font); | 101 HRESULT ShapeTextRunWithFont(internal::TextRun* run, const Font& font); |
| 102 | 102 |
| 103 // Returns the number of characters in |run| that have missing glyphs. | 103 // Returns the number of characters in |run| that have missing glyphs. |
| 104 int CountCharsWithMissingGlyphs(internal::TextRun* run, | 104 int CountCharsWithMissingGlyphs(internal::TextRun* run) const; |
| 105 HRESULT shaping_result) const; | |
| 106 | 105 |
| 107 // Return the run index that contains the argument; or the length of the | 106 // Return the run index that contains the argument; or the length of the |
| 108 // |runs_| vector if argument exceeds the text length or width. | 107 // |runs_| vector if argument exceeds the text length or width. |
| 109 size_t GetRunContainingCaret(const SelectionModel& caret) const; | 108 size_t GetRunContainingCaret(const SelectionModel& caret) const; |
| 110 size_t GetRunContainingXCoord(int x) const; | 109 size_t GetRunContainingXCoord(int x) const; |
| 111 | 110 |
| 112 // Given a |run|, returns the SelectionModel that contains the logical first | 111 // Given a |run|, returns the SelectionModel that contains the logical first |
| 113 // or last caret position inside (not at a boundary of) the run. | 112 // or last caret position inside (not at a boundary of) the run. |
| 114 // The returned value represents a cursor/caret position without a selection. | 113 // The returned value represents a cursor/caret position without a selection. |
| 115 SelectionModel FirstSelectionModelInsideRun(const internal::TextRun* run); | 114 SelectionModel FirstSelectionModelInsideRun(const internal::TextRun* run); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 137 scoped_ptr<int[]> logical_to_visual_; | 136 scoped_ptr<int[]> logical_to_visual_; |
| 138 | 137 |
| 139 bool needs_layout_; | 138 bool needs_layout_; |
| 140 | 139 |
| 141 DISALLOW_COPY_AND_ASSIGN(RenderTextWin); | 140 DISALLOW_COPY_AND_ASSIGN(RenderTextWin); |
| 142 }; | 141 }; |
| 143 | 142 |
| 144 } // namespace gfx | 143 } // namespace gfx |
| 145 | 144 |
| 146 #endif // UI_GFX_RENDER_TEXT_WIN_H_ | 145 #endif // UI_GFX_RENDER_TEXT_WIN_H_ |
| OLD | NEW |