Top |
#define | PANGO_TYPE_TAB_ARRAY |
#define | PANGO_TYPE_TAB_ALIGN |
PangoTabArray * | pango_tab_array_new () |
PangoTabArray * | pango_tab_array_new_with_positions () |
PangoTabArray * | pango_tab_array_copy () |
void | pango_tab_array_free () |
gint | pango_tab_array_get_size () |
void | pango_tab_array_resize () |
void | pango_tab_array_set_tab () |
void | pango_tab_array_get_tab () |
void | pango_tab_array_get_tabs () |
gboolean | pango_tab_array_get_positions_in_pixels () |
Functions in this section are used to deal with PangoTabArray objects that can be used to set tab stop positions in a PangoLayout.
#define PANGO_TYPE_TAB_ARRAY (pango_tab_array_get_type ())
The GObject type for PangoTabArray.
PangoTabArray * pango_tab_array_new (gint initial_size
,gboolean positions_in_pixels
);
Creates an array of initial_size
tab stops. Tab stops are specified in
pixel units if positions_in_pixels
is TRUE
, otherwise in Pango
units. All stops are initially at position 0.
PangoTabArray * pango_tab_array_new_with_positions (gint size
,gboolean positions_in_pixels
,PangoTabAlign first_alignment
,gint first_position
,...
);
This is a convenience function that creates a PangoTabArray
and allows you to specify the alignment and position of each
tab stop. You must provide an alignment
and position for size
tab stops.
PangoTabArray *
pango_tab_array_copy (PangoTabArray *src
);
Copies a PangoTabArray
void
pango_tab_array_free (PangoTabArray *tab_array
);
Frees a tab array and associated resources.
gint
pango_tab_array_get_size (PangoTabArray *tab_array
);
Gets the number of tab stops in tab_array
.
void pango_tab_array_resize (PangoTabArray *tab_array
,gint new_size
);
Resizes a tab array. You must subsequently initialize any tabs that were added as a result of growing the array.
void pango_tab_array_set_tab (PangoTabArray *tab_array
,gint tab_index
,PangoTabAlign alignment
,gint location
);
Sets the alignment and location of a tab stop.
alignment
must always be PANGO_TAB_LEFT in the current
implementation.
void pango_tab_array_get_tab (PangoTabArray *tab_array
,gint tab_index
,PangoTabAlign *alignment
,gint *location
);
Gets the alignment and position of a tab stop.
void pango_tab_array_get_tabs (PangoTabArray *tab_array
,PangoTabAlign **alignments
,gint **locations
);
If non-NULL
, alignments
and locations
are filled with allocated
arrays of length pango_tab_array_get_size()
. You must free the
returned array.
gboolean
pango_tab_array_get_positions_in_pixels
(PangoTabArray *tab_array
);
Returns TRUE
if the tab positions are in pixels, FALSE
if they are
in Pango units.
typedef struct _PangoTabArray PangoTabArray;
A PangoTabArray struct contains an array of tab stops. Each tab stop has an alignment and a position.