Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: ui/gfx/render_text_linux.h

Issue 7265011: RenderText API Outline. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add some placeholder functionality on Windows. Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698