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

Unified 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, 6 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 side-by-side diff with in-line comments
Download patch
Index: ui/gfx/render_text_linux.h
diff --git a/ui/gfx/render_text_linux.h b/ui/gfx/render_text_linux.h
new file mode 100755
index 0000000000000000000000000000000000000000..25ddc9e4bc22db9aa4af97bbc1bc1691fed36b51
--- /dev/null
+++ b/ui/gfx/render_text_linux.h
@@ -0,0 +1,44 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_GFX_RENDER_TEXT_LINUX_H_
+#define UI_GFX_RENDER_TEXT_LINUX_H_
+#pragma once
+
+#include <string>
+
+#include "ui/gfx/render_text.h"
+
+namespace gfx {
+
+// RenderTextLinux is the Linux implementation of RenderText using Pango.
+class RenderTextLinux : RenderText {
+ public:
+ RenderTextLinux();
+ RenderTextLinux(const string16& text,
+ const gfx::Font& font,
+ const SkColor& color,
+ const gfx::Rect display_rect,
+ int flags);
+ virtual ~RenderTextLinux();
+
+ // Overridden from RenderText
+ virtual void Draw(HDC drawing_context) const OVERRIDE;
+ virtual size_t FindCursorPosition(const gfx::Point& point) const OVERRIDE;
+ virtual std::vector<gfx::Rect> GetSubstringBounds(
+ const ui::Range& range) const OVERRIDE;
+ virtual size_t GetLeftCursorPosition(size_t position,
+ bool move_by_word) const OVERRIDE;
+ virtual size_t GetRightCursorPosition(size_t position,
+ bool move_by_word) const OVERRIDE;
+ virtual gfx::Rect GetCursorBounds(size_t position,
+ bool insert_mode) const OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(RenderTextLinux);
+};
+
+} // namespace gfx;
+
+#endif // UI_GFX_RENDER_TEXT_LINUX_H_

Powered by Google App Engine
This is Rietveld 408576698