summaryrefslogtreecommitdiff
path: root/libs/gtkmm2/pango/src/renderer.hg
diff options
context:
space:
mode:
Diffstat (limited to 'libs/gtkmm2/pango/src/renderer.hg')
-rw-r--r--libs/gtkmm2/pango/src/renderer.hg75
1 files changed, 75 insertions, 0 deletions
diff --git a/libs/gtkmm2/pango/src/renderer.hg b/libs/gtkmm2/pango/src/renderer.hg
new file mode 100644
index 0000000000..8b112506c5
--- /dev/null
+++ b/libs/gtkmm2/pango/src/renderer.hg
@@ -0,0 +1,75 @@
+/* $Id: renderer.hg,v 1.4 2006/06/10 15:26:24 murrayc Exp $ */
+
+/* renderer.h
+ *
+ * Copyright(C) 2004 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <glibmm/object.h>
+#include <pangomm/context.h>
+#include <pangomm/glyphstring.h>
+#include <pangomm/layout.h>
+#include <pangomm/layoutline.h>
+
+_DEFS(pangomm,pango)
+_PINCLUDE(glibmm/private/object_p.h)
+
+namespace Pango
+{
+
+_CC_INCLUDE(pango/pango-enum-types.h)
+
+_WRAP_ENUM(RenderPart, PangoRenderPart)
+
+/** Pango::Renderer is a base class that contains the necessary logic for rendering a Pango::Layout or Pango::LayoutLine.
+ * By subclassing Pango::Renderer and overriding operations such as draw_glyphs and draw_rectangle,
+ * renderers for particular font backends and destinations can be created.
+ */
+class Renderer : public Glib::Object
+{
+ _CLASS_GOBJECT(Renderer, PangoRenderer, PANGO_RENDERER, Glib::Object, GObject)
+
+protected:
+
+public:
+
+ _WRAP_METHOD(void draw_layout(const Glib::RefPtr<Layout>& layout, int x, int y), pango_renderer_draw_layout)
+ _WRAP_METHOD(void draw_layout_line(const Glib::RefPtr<LayoutLine>& line, int x, int y), pango_renderer_draw_layout_line)
+ _WRAP_METHOD(void draw_glyphs(const Glib::RefPtr<Font>& font, const GlyphString& glyphs, int x, int y), pango_renderer_draw_glyphs)
+ _WRAP_METHOD(void draw_rectangle(RenderPart part, int x, int y, int width, int height), pango_renderer_draw_rectangle)
+ _WRAP_METHOD(void draw_error_underline(int x, int y, int width, int height), pango_renderer_draw_error_underline)
+ _WRAP_METHOD(void draw_trapezoid(RenderPart part, double y1, double x11, double x21, double y2, double x12, double x22), pango_renderer_draw_trapezoid)
+ _WRAP_METHOD(void draw_glyph(const Glib::RefPtr<Font>& font, Glyph glyph, double x, double y), pango_renderer_draw_glyph)
+
+ _WRAP_METHOD(void activate(), pango_renderer_activate)
+ _WRAP_METHOD(void deactivate(), pango_renderer_deactivate)
+
+ _WRAP_METHOD(void part_changed(RenderPart part), pango_renderer_part_changed)
+
+ _WRAP_METHOD(void set_color(RenderPart part, const Color& color), pango_renderer_set_color)
+
+#m4 _CONVERSION(`PangoColor*',`Color',`Color($3)')
+ _WRAP_METHOD(Color get_color(RenderPart part) const, pango_renderer_get_color)
+
+ _WRAP_METHOD(void set_matrix(const Matrix& matrix), pango_renderer_set_matrix)
+ Matrix get_matrix() const;
+ _IGNORE(pango_renderer_get_matrix)
+};
+
+} /* namespace Pango */
+