OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_GFX_RENDER_TEXT_WIN_H_ |
| 6 #define UI_GFX_RENDER_TEXT_WIN_H_ |
| 7 #pragma once |
| 8 |
| 9 #include <string> |
| 10 |
| 11 #include "ui/gfx/render_text.h" |
| 12 |
| 13 namespace gfx { |
| 14 |
| 15 // RenderTextWin is the Windows implementation of RenderText using Uniscribe. |
| 16 class RenderTextWin : public RenderText { |
| 17 public: |
| 18 RenderTextWin(); |
| 19 RenderTextWin(const string16& text, |
| 20 const gfx::Font& font, |
| 21 const SkColor& color, |
| 22 const gfx::Rect display_rect, |
| 23 int flags); |
| 24 virtual ~RenderTextWin(); |
| 25 |
| 26 // TODO(msw): Solve error C3646: 'OVERRIDE' : unknown override specifier |
| 27 // Overridden from RenderText |
| 28 virtual void Draw(HDC drawing_context) const; |
| 29 virtual size_t FindCursorPosition(const gfx::Point& point) const; |
| 30 virtual std::vector<gfx::Rect> GetSubstringBounds( |
| 31 const ui::Range& range) const; |
| 32 virtual size_t GetLeftCursorPosition(size_t position, |
| 33 bool move_by_word) const; |
| 34 virtual size_t GetRightCursorPosition(size_t position, |
| 35 bool move_by_word) const; |
| 36 virtual gfx::Rect GetCursorBounds(size_t position, |
| 37 bool insert_mode) const; |
| 38 |
| 39 private: |
| 40 DISALLOW_COPY_AND_ASSIGN(RenderTextWin); |
| 41 }; |
| 42 |
| 43 } // namespace gfx; |
| 44 |
| 45 #endif // UI_GFX_RENDER_TEXT_WIN_H_ |
OLD | NEW |