Next: , Previous: Scripts, Up: Top


9 Tab Stops

Structures for storing tab stops

9.1 Overview

Functions in this section are used to deal with <pango-tab-array> objects that can be used to set tab stop positions in a <pango-layout>.

9.2 Usage

— Class: <pango-tab-array>

Derives from <gboxed>.

This class defines no direct slots.

— Function: pango-tab-array-new (initial_size int) (positions_in_pixels bool) ⇒  (ret <pango-tab-array>)

Creates an array of initial-size tab stops. Tab stops are specified in pixel units if positions-in-pixels is ‘#t’, otherwise in Pango units. All stops are initially at position 0.

initial-size
Initial number of tab stops to allocate, can be 0
positions-in-pixels
whether positions are in pixel units
ret
the newly allocated <pango-tab-array>, which should be freed with pango-tab-array-free.
— Function: pango-tab-array-copy (self <pango-tab-array>) ⇒  (ret <pango-tab-array>)

Copies a <pango-tab-array>

src
<pango-tab-array> to copy
ret
the newly allocated <pango-tab-array>, which should be freed with pango-tab-array-free.
— Function: pango-tab-array-get-size (self <pango-tab-array>) ⇒  (ret int)

Gets the number of tab stops in tab-array.

tab-array
a <pango-tab-array>
ret
the number of tab stops in the array.
— Function: pango-tab-array-resize (self <pango-tab-array>) (new_size int)

Resizes a tab array. You must subsequently initialize any tabs that were added as a result of growing the array.

tab-array
a <pango-tab-array>
new-size
new size of the array
— Function: pango-tab-array-set-tab (self <pango-tab-array>) (tab_index int) (alignment <pango-tab-align>) (location int)

Sets the alignment and location of a tab stop. alignment must always be <pango-tab-left> in the current implementation.

tab-array
a <pango-tab-array>
tab-index
the index of a tab stop
alignment
tab alignment
location
tab location in Pango units