| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <usp10.h> | 9 #include <usp10.h> |
| 10 | 10 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 virtual void EnsureLayout() OVERRIDE; | 91 virtual void EnsureLayout() OVERRIDE; |
| 92 virtual void DrawVisualText(Canvas* canvas) OVERRIDE; | 92 virtual void DrawVisualText(Canvas* canvas) OVERRIDE; |
| 93 | 93 |
| 94 private: | 94 private: |
| 95 void ItemizeLogicalText(); | 95 void ItemizeLogicalText(); |
| 96 void LayoutVisualText(); | 96 void LayoutVisualText(); |
| 97 | 97 |
| 98 // Helper function to update the font on a text run after font substitution. | 98 // Helper function to update the font on a text run after font substitution. |
| 99 void ApplySubstituteFont(internal::TextRun* run, const Font& font); | 99 void ApplySubstituteFont(internal::TextRun* run, const Font& font); |
| 100 | 100 |
| 101 // Returns whether |run| contains missing glyphs. | 101 // Returns the number of characters in |run| that have missing glyphs. |
| 102 bool HasMissingGlyphs(internal::TextRun* run) const; | 102 int CountCharsWithMissingGlyphs(internal::TextRun* run) const; |
| 103 | 103 |
| 104 // Returns a vector of linked fonts corresponding to |font|. | 104 // Returns a vector of linked fonts corresponding to |font|. |
| 105 const std::vector<Font>* GetLinkedFonts(const Font& font) const; | 105 const std::vector<Font>* GetLinkedFonts(const Font& font) const; |
| 106 | 106 |
| 107 // Return the run index that contains the argument; or the length of the | 107 // Return the run index that contains the argument; or the length of the |
| 108 // |runs_| vector if argument exceeds the text length or width. | 108 // |runs_| vector if argument exceeds the text length or width. |
| 109 size_t GetRunContainingCaret(const SelectionModel& caret) const; | 109 size_t GetRunContainingCaret(const SelectionModel& caret) const; |
| 110 size_t GetRunContainingPoint(const Point& point) const; | 110 size_t GetRunContainingPoint(const Point& point) const; |
| 111 | 111 |
| 112 // Given a |run|, returns the SelectionModel that contains the logical first | 112 // Given a |run|, returns the SelectionModel that contains the logical first |
| (...skipping 28 matching lines...) Expand all Loading... |
| 141 scoped_array<int> logical_to_visual_; | 141 scoped_array<int> logical_to_visual_; |
| 142 | 142 |
| 143 bool needs_layout_; | 143 bool needs_layout_; |
| 144 | 144 |
| 145 DISALLOW_COPY_AND_ASSIGN(RenderTextWin); | 145 DISALLOW_COPY_AND_ASSIGN(RenderTextWin); |
| 146 }; | 146 }; |
| 147 | 147 |
| 148 } // namespace gfx | 148 } // namespace gfx |
| 149 | 149 |
| 150 #endif // UI_GFX_RENDER_TEXT_WIN_H_ | 150 #endif // UI_GFX_RENDER_TEXT_WIN_H_ |
| OLD | NEW |