| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 } // namespace internal | 57 } // namespace internal |
| 58 | 58 |
| 59 // RenderTextWin is the Windows implementation of RenderText using Uniscribe. | 59 // RenderTextWin is the Windows implementation of RenderText using Uniscribe. |
| 60 class RenderTextWin : public RenderText { | 60 class RenderTextWin : public RenderText { |
| 61 public: | 61 public: |
| 62 RenderTextWin(); | 62 RenderTextWin(); |
| 63 virtual ~RenderTextWin(); | 63 virtual ~RenderTextWin(); |
| 64 | 64 |
| 65 // Overridden from RenderText: | 65 // Overridden from RenderText: |
| 66 virtual Size GetStringSize() OVERRIDE; | 66 virtual Size GetStringSize() OVERRIDE; |
| 67 virtual int GetBaseline() OVERRIDE; | |
| 68 virtual SelectionModel FindCursorPosition(const Point& point) OVERRIDE; | 67 virtual SelectionModel FindCursorPosition(const Point& point) OVERRIDE; |
| 69 virtual std::vector<FontSpan> GetFontSpansForTesting() OVERRIDE; | 68 virtual std::vector<FontSpan> GetFontSpansForTesting() OVERRIDE; |
| 70 | 69 |
| 71 protected: | 70 protected: |
| 72 // Overridden from RenderText: | 71 // Overridden from RenderText: |
| 72 virtual int GetBaselineOfTextLayout() OVERRIDE; |
| 73 virtual SelectionModel AdjacentCharSelectionModel( | 73 virtual SelectionModel AdjacentCharSelectionModel( |
| 74 const SelectionModel& selection, | 74 const SelectionModel& selection, |
| 75 VisualCursorDirection direction) OVERRIDE; | 75 VisualCursorDirection direction) OVERRIDE; |
| 76 virtual SelectionModel AdjacentWordSelectionModel( | 76 virtual SelectionModel AdjacentWordSelectionModel( |
| 77 const SelectionModel& selection, | 77 const SelectionModel& selection, |
| 78 VisualCursorDirection direction) OVERRIDE; | 78 VisualCursorDirection direction) OVERRIDE; |
| 79 virtual Range GetGlyphBounds(size_t index) OVERRIDE; | 79 virtual Range GetGlyphBounds(size_t index) OVERRIDE; |
| 80 virtual std::vector<Rect> GetSubstringBounds(const Range& range) OVERRIDE; | 80 virtual std::vector<Rect> GetSubstringBounds(const Range& range) OVERRIDE; |
| 81 virtual size_t TextIndexToLayoutIndex(size_t index) const OVERRIDE; | 81 virtual size_t TextIndexToLayoutIndex(size_t index) const OVERRIDE; |
| 82 virtual size_t LayoutIndexToTextIndex(size_t index) const OVERRIDE; | 82 virtual size_t LayoutIndexToTextIndex(size_t index) const OVERRIDE; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 scoped_ptr<int[]> logical_to_visual_; | 134 scoped_ptr<int[]> logical_to_visual_; |
| 135 | 135 |
| 136 bool needs_layout_; | 136 bool needs_layout_; |
| 137 | 137 |
| 138 DISALLOW_COPY_AND_ASSIGN(RenderTextWin); | 138 DISALLOW_COPY_AND_ASSIGN(RenderTextWin); |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 } // namespace gfx | 141 } // namespace gfx |
| 142 | 142 |
| 143 #endif // UI_GFX_RENDER_TEXT_WIN_H_ | 143 #endif // UI_GFX_RENDER_TEXT_WIN_H_ |
| OLD | NEW |