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_LINUX_H_ |
| 6 #define UI_GFX_RENDER_TEXT_LINUX_H_ |
| 7 #pragma once |
| 8 |
| 9 #include <string> |
| 10 |
| 11 #include "ui/gfx/render_text.h" |
| 12 |
| 13 namespace gfx { |
| 14 |
| 15 // RenderTextLinux is the Linux implementation of RenderText using Pango. |
| 16 class RenderTextLinux : RenderText { |
| 17 public: |
| 18 RenderTextLinux(); |
| 19 RenderTextLinux(const string16& text, |
| 20 const gfx::Font& font, |
| 21 const SkColor& color, |
| 22 const gfx::Rect display_rect, |
| 23 int flags); |
| 24 virtual ~RenderTextLinux(); |
| 25 |
| 26 // Overridden from RenderText |
| 27 virtual void Draw(HDC drawing_context) const OVERRIDE; |
| 28 virtual size_t FindCursorPosition(const gfx::Point& point) const OVERRIDE; |
| 29 virtual std::vector<gfx::Rect> GetSubstringBounds( |
| 30 const ui::Range& range) const OVERRIDE; |
| 31 virtual size_t GetLeftCursorPosition(size_t position, |
| 32 bool move_by_word) const OVERRIDE; |
| 33 virtual size_t GetRightCursorPosition(size_t position, |
| 34 bool move_by_word) const OVERRIDE; |
| 35 virtual gfx::Rect GetCursorBounds(size_t position, |
| 36 bool insert_mode) const OVERRIDE; |
| 37 |
| 38 private: |
| 39 DISALLOW_COPY_AND_ASSIGN(RenderTextLinux); |
| 40 }; |
| 41 |
| 42 } // namespace gfx; |
| 43 |
| 44 #endif // UI_GFX_RENDER_TEXT_LINUX_H_ |
OLD | NEW |