#include <gnome.h> struct GnomeIconTextInfoRow struct GnomeIconTextInfo GnomeIconTextInfo* gnome_icon_layout_text ( |
This module implements a generic and simple text wrapping and drawing interface.
The gnome_icon_layout_text() function can be used to layout a piece of text given a number of constraints. The gnome_icon_paint_text() routine is a simple routine that will render a piece of text that has been layed out by gnome_icon_layout_text().
typedef struct { GList *rows; GdkFont *font; int width; int height; int baseline_skip; } GnomeIconTextInfo; |
GnomeIconTextInfo* gnome_icon_layout_text ( |
Wraps the specified text and returns a new GnomeIconTextInfo structure. text is word-wrapped as defined by the specified separators characters (or just at spaces if separators is NULL). The max_width parameter specifies the width at which text will be wrapped. If a word is too long to be wrapped and confine is TRUE, it will be force-split somewhere in the middle; if confine is FALSE, then the text may exceed the specified max_width.
void gnome_icon_paint_text (GnomeIconTextInfo *ti, |
Paints text that was laid out by gnome_icon_layout_text(). The text is painted at the specified coordinates, with the specified justification. This is just a sample implementation, other are possible.
void gnome_icon_text_info_free (GnomeIconTextInfo *ti); |
Frees a GnomeIconTextInfo structure. You should call this instead of freeing it yourself.