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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 virtual std::vector<Rect> GetSubstringBounds( | 80 virtual std::vector<Rect> GetSubstringBounds( |
81 const gfx::Range& range) OVERRIDE; | 81 const gfx::Range& range) OVERRIDE; |
82 virtual size_t TextIndexToLayoutIndex(size_t index) const OVERRIDE; | 82 virtual size_t TextIndexToLayoutIndex(size_t index) const OVERRIDE; |
83 virtual size_t LayoutIndexToTextIndex(size_t index) const OVERRIDE; | 83 virtual size_t LayoutIndexToTextIndex(size_t index) const OVERRIDE; |
84 virtual bool IsCursorablePosition(size_t position) OVERRIDE; | 84 virtual bool IsCursorablePosition(size_t position) OVERRIDE; |
85 virtual void ResetLayout() OVERRIDE; | 85 virtual void ResetLayout() OVERRIDE; |
86 virtual void EnsureLayout() OVERRIDE; | 86 virtual void EnsureLayout() OVERRIDE; |
87 virtual void DrawVisualText(Canvas* canvas) OVERRIDE; | 87 virtual void DrawVisualText(Canvas* canvas) OVERRIDE; |
88 | 88 |
89 private: | 89 private: |
90 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Win_BreakRunsByUnicodeBlocks); | |
91 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Win_LogicalClusters); | 90 FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Win_LogicalClusters); |
92 | 91 |
93 void ItemizeLogicalText(); | 92 void ItemizeLogicalText(); |
94 void LayoutVisualText(); | 93 void LayoutVisualText(); |
95 void LayoutTextRun(internal::TextRun* run); | 94 void LayoutTextRun(internal::TextRun* run); |
96 | 95 |
97 // Helper function that calls |ScriptShape()| on the run, which has logic to | 96 // Helper function that calls |ScriptShape()| on the run, which has logic to |
98 // handle E_OUTOFMEMORY return codes. | 97 // handle E_OUTOFMEMORY return codes. |
99 HRESULT ShapeTextRunWithFont(internal::TextRun* run, const Font& font); | 98 HRESULT ShapeTextRunWithFont(internal::TextRun* run, const Font& font); |
100 | 99 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 scoped_ptr<int[]> logical_to_visual_; | 132 scoped_ptr<int[]> logical_to_visual_; |
134 | 133 |
135 bool needs_layout_; | 134 bool needs_layout_; |
136 | 135 |
137 DISALLOW_COPY_AND_ASSIGN(RenderTextWin); | 136 DISALLOW_COPY_AND_ASSIGN(RenderTextWin); |
138 }; | 137 }; |
139 | 138 |
140 } // namespace gfx | 139 } // namespace gfx |
141 | 140 |
142 #endif // UI_GFX_RENDER_TEXT_WIN_H_ | 141 #endif // UI_GFX_RENDER_TEXT_WIN_H_ |
OLD | NEW |