![]() | ![]() | ![]() | exo Reference Manual | ![]() |
---|
Extensions to PangoExtensions to Pango — Miscelleanous extensions to the Pango library. |
#include <exo/exo.h> enum ExoPangoEllipsizeMode; gboolean exo_pango_layout_set_text_ellipsized (PangoLayout *layout, const char *string, int width, ExoPangoEllipsizeMode mode);
This facility provides ellipsizing support functions for Pango 1.4 and below. If its build against Pango 1.6 or above, it uses the ellipsizing functionality provided by Pango, else its emulated in libexo.
typedef enum /*< enum,prefix=EXO_PANGO_ELLIPSIZE_MODE >*/ { EXO_PANGO_ELLIPSIZE_NONE, EXO_PANGO_ELLIPSIZE_START, EXO_PANGO_ELLIPSIZE_MIDDLE, EXO_PANGO_ELLIPSIZE_END, } ExoPangoEllipsizeMode;
gboolean exo_pango_layout_set_text_ellipsized (PangoLayout *layout, const char *string, int width, ExoPangoEllipsizeMode mode);
Truncates a string if required to fit in width
and sets it on the
layout. Truncation involves removing characters from the start, middle or end
respectively and replacing them with "...". Algorithm is a bit
fuzzy, won't work 100%.
layout : | A PangoLayout. |
string : | The string to ellipsize. |
width : | The maximal width for the layout .
|
mode : | The ellipsize mode. |
Returns : | TRUE if string had to be ellipsized to fit into width , else
FALSE .
|
<< Extensions to GObject | Part V. Miscelleanous >> |