Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::Gdk::PangoRenderer Class Reference

A GdkPangoRenderer C++ wrapper class. More...

#include <xfc/gdk/pangorenderer.hh>

Inheritance diagram for Xfc::Gdk::PangoRenderer:

Xfc::Pango::Renderer Xfc::G::Object Xfc::G::TypeInstance Xfc::Trackable List of all members.

Public Member Functions

Accessors
Methods

Static Public Member Functions

Accessors

Detailed Description

A GdkPangoRenderer C++ wrapper class.

Gdk::PangoRenderer is a subclass of Pango::Renderer which is used for rendering Pango objects into GDK drawables. The default renderer for a particular screen is obtained with get_default(); Pango functions like Pango::Renderer::draw_layout() and Pango::Renderer::draw_layout_line() are then used to draw objects with the renderer.

In most simple cases, applications can just use Gdk::Drawable::draw_layout(), and don't need to directly use Gdk::PangoRenderer at all. Using the Gdk::PangoRenderer directly is most useful when working with a transformation such as a rotation, because the Pango drawing functions take user space coordinates (coordinates before the transformation) instead of device coordinates.


Constructor & Destructor Documentation

Xfc::Gdk::PangoRenderer::PangoRenderer ( GdkPangoRenderer *  renderer,
bool  owns_reference = false 
) [explicit, protected]

Construct a new PangoRenderer from an existing GdkPangoRenderer.

Parameters:
renderer A pointer to a GdkPangoRenderer.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The renderer can be a newly created GdkPangoRenderer or an existing GdkPangoRenderer. (see G::Object::Object).

Xfc::Gdk::PangoRenderer::PangoRenderer ( const Screen screen  ) 

Constructs a new PangoRenderer for screen.

Parameters:
screen A Gdk::Screen.
Normally you can use the results of get_default() rather than creating a new renderer. The PangoRenderer is created with a reference count of one that the caller owns.

Xfc::Gdk::PangoRenderer::PangoRenderer ( GdkPangoRenderer *  renderer,
bool  owns_reference = false 
) [explicit, protected]

Construct a new PangoRenderer from an existing GdkPangoRenderer.

Parameters:
renderer A pointer to a GdkPangoRenderer.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The renderer can be a newly created GdkPangoRenderer or an existing GdkPangoRenderer. (see G::Object::Object).

Xfc::Gdk::PangoRenderer::PangoRenderer ( const Screen screen  ) 

Constructs a new PangoRenderer for screen.

Parameters:
screen A Gdk::Screen.
Normally you can use the results of get_default() rather than creating a new renderer. The PangoRenderer is created with a reference count of one that the caller owns.


Member Function Documentation

static Gdk::PangoRenderer* Xfc::Gdk::PangoRenderer::get_default ( const Screen screen  )  [static]

Gets the default Gdk::PangoRenderer for a screen.

Parameters:
screen A Gdk::Screen.
Returns:
The default PangoRenderer for screen.
This default renderer is shared by all users of the display, so properties such as the color or transformation matrix set for the renderer may be overwritten by functions such as Gdk::Drawable::draw_layout(). Before using the renderer, you need to call set_drawable() and set_gc() to set the drawable and graphics context to use for drawing.

Note, the renderer is owned by GTK+ and will be kept around until the screen is closed.

void Xfc::Gdk::PangoRenderer::set_drawable ( Drawable drawable  ) 

Sets the drawable the renderer draws to.

Parameters:
drawable The new target drawable, or null to unset.

void Xfc::Gdk::PangoRenderer::set_gc ( const GC gc  ) 

Sets the GC the renderer draws with.

Parameters:
gc The new GC to use for drawing, or null to unset.
Note that the GC must not be modified until it is unset by calling the function again with null for the gc parameter, since GDK may make internal copies of the GC which won't be updated to follow changes to the original GC.

void Xfc::Gdk::PangoRenderer::set_stipple ( Pango::RenderPart  part,
Bitmap stipple 
)

Sets the stipple for one render part (foreground, background, underline, etc).

Parameters:
part The part to render with the stipple.
stipple The new stipple value, or null to unset.
Note that this is overwritten when iterating through the individual styled runs of a Pango::Layout or Pango::LayoutLine. This function is thus only useful when you call low level functions like Pango::Renderer::draw_glyphs() directly.

void Xfc::Gdk::PangoRenderer::set_override_color ( Pango::RenderPart  part,
const Color color 
)

Sets the color for a particular render part (foreground, background, underline, etc), overriding any attributes on the layouts renderered with this renderer.

Parameters:
part The part to render to set the color of.
color The color to use, or null to unset a previously set override color.


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3