Copyright (C) 2000-2012 |
Whole document tree
gnome-icon-textSynopsis
DescriptionThis module implements a generic and simple interface for wrapping text and painting it to a drawable. It is used by the GnomeIconTextItem object to perform word wrapping for icon text captions. Detailsstruct GnomeIconTextInfoRow
This structure defines a row of text in the list of wrapped text rows of the GnomeIconTextInfo structure. The text field contains the text that fits in that row, and width contains the width in pixels of that text, calculated with respect to the font that was used to format the text. struct GnomeIconTextInfo
This structure contains the information about a wrapped text string. The rows field is a list of GnomeIconTextInfoRow structures with the final rows of text. The width, height, and baseline_skip fields contain the total width, total height, and baseline height of the text in pixels, respectively. gnome_icon_layout_text ()
Creates a new &GnomeIconTextInfo structure by wrapping the specified text. If non-NULL, the separators argument defines a set of characters to be used as word delimiters for performing word wrapping. If it is NULL, then only spaces will be used as word delimiters. The max_width argument is used to specify the width at which word wrapping will be performed. If there is a very long word that does not fit in a single line, the confine argument can be used to specify whether the word should be unconditionally split to fit or whether the maximum width should be increased as necessary.
gnome_icon_paint_text ()
Paints the formatted text in the icon text info structure onto a drawable. This is just a sample implementation; applications can choose to use other rendering functions. gnome_icon_text_info_free ()
Frees a &GnomeIconTextInfo structure. You should call this instead of freeing the structure yourself. |