Layout Objects
High-level layout driver objects
pangoLayoutNew(context)pangoLayoutCopy(object)pangoLayoutGetContext(object)pangoLayoutContextChanged(object)pangoLayoutSetText(object, text, length = -1)pangoLayoutGetText(object)pangoLayoutSetMarkup(object, markup, length = -1)pangoLayoutSetMarkupWithAccel(object, markup, accel.marker)pangoLayoutSetAttributes(object, attrs)pangoLayoutGetAttributes(object)pangoLayoutSetFontDescription(object, desc = NULL)pangoLayoutGetFontDescription(object)pangoLayoutSetWidth(object, width)pangoLayoutGetWidth(object)pangoLayoutSetHeight(object, height)pangoLayoutGetHeight(object)pangoLayoutSetWrap(object, wrap)pangoLayoutGetWrap(object)pangoLayoutIsWrapped(object)pangoLayoutSetEllipsize(object, ellipsize)pangoLayoutGetEllipsize(object)pangoLayoutIsEllipsized(object)pangoLayoutSetIndent(object, indent)pangoLayoutGetIndent(object)pangoLayoutGetSpacing(object)pangoLayoutSetSpacing(object, spacing)pangoLayoutSetJustify(object, justify)pangoLayoutGetJustify(object)pangoLayoutSetAutoDir(object, auto.dir)pangoLayoutGetAutoDir(object)pangoLayoutSetAlignment(object, alignment)pangoLayoutGetAlignment(object)pangoLayoutSetTabs(object, tabs = NULL)pangoLayoutGetTabs(object)pangoLayoutSetSingleParagraphMode(object, setting)pangoLayoutGetSingleParagraphMode(object)pangoLayoutGetUnknownGlyphsCount(object)pangoLayoutGetLogAttrs(object)pangoLayoutIndexToPos(object, index, pos)pangoLayoutIndexToLineX(object, index., trailing)pangoLayoutXyToIndex(object, x, y)pangoLayoutGetCursorPos(object, index)pangoLayoutMoveCursorVisually(object, strong, old.index, old.trailing, direction)pangoLayoutGetExtents(object)pangoLayoutGetPixelExtents(object)pangoLayoutGetSize(object)pangoLayoutGetPixelSize(object)pangoLayoutGetBaseline(object)pangoLayoutGetLineCount(object)pangoLayoutGetLine(object, line)pangoLayoutGetLineReadonly(object, line)pangoLayoutGetLines(object)pangoLayoutGetLinesReadonly(object)pangoLayoutGetIter(object)pangoLayoutIterNextRun(object)pangoLayoutIterNextChar(object)pangoLayoutIterNextCluster(object)pangoLayoutIterNextLine(object)pangoLayoutIterAtLastLine(object)pangoLayoutIterGetIndex(object)pangoLayoutIterGetBaseline(object)pangoLayoutIterGetRun(object)pangoLayoutIterGetRunReadonly(object)pangoLayoutIterGetLine(object)pangoLayoutIterGetLineReadonly(object)pangoLayoutIterGetLayout(iter)pangoLayoutIterGetCharExtents(object)pangoLayoutIterGetClusterExtents(object)pangoLayoutIterGetRunExtents(object)pangoLayoutIterGetLineYrange(object)pangoLayoutIterGetLineExtents(object)pangoLayoutIterGetLayoutExtents(object)pangoLayoutLineGetExtents(object)pangoLayoutLineGetPixelExtents(object)pangoLayoutLineIndexToX(object, index, trailing)pangoLayoutLineXToIndex(object, x.pos)pangoLayoutLineGetXRanges(object, start.index, end.index)pangoLayout(context)
GObject +----PangoLayout
While complete access to the layout capabilities of Pango is provided using the detailed interfaces for itemization and shaping, using that functionality directly involves writing a fairly large amount of code. The objects and functions in this section provide a high-level driver for formatting entire paragraphs of text at once.
PangoLayoutThe PangoLayout structure represents an entire paragraph
of text. It is initialized with a PangoContext, UTF-8 string
and set of attributes for that string. Once that is done, the
set of formatted lines can be extracted from the object,
the layout can be rendered, and conversion between logical
character positions within the layout's text, and the physical
position of the resulting glyphs can be made.
There are also a number of parameters to adjust the formatting
of a PangoLayout, which are illustrated in .
It is possible, as well, to ignore the 2-D setup, and simply
treat the results of a PangoLayout as a list of lines.
The PangoLayout structure is opaque, and has no user-visible
fields.
PangoLayoutIterA PangoLayoutIter structure can be used to
iterate over the visual extents of a PangoLayout.
The PangoLayoutIter structure is opaque, and
has no user-visible fields.
PangoLayoutLineThe PangoLayoutLine structure represents one of the lines resulting
from laying out a paragraph via PangoLayout. PangoLayoutLine
structures are obtained by calling pangoLayoutGetLine and
are only valid until the text, attributes, or settings of the
parent PangoLayout are modified.
Routines for rendering PangoLayout objects are provided in code specific to each rendering system.
layout[PangoLayout] the parent layout for this line
startIndex[integer] the start of the line as byte index into layout->text
length[integer] the length of the line in bytes
runs[list] a list containing the runs of the line in visual order
isParagraphStart[numeric] TRUE if this is the first line of the paragraph
resolvedDir[numeric] the resolved PangoDirection of the line
pangoLayout is the equivalent of pangoLayoutNew.
PangoWrapModeA PangoWrapMode describes how to wrap the lines of a PangoLayout to the desired width.
wordwrap lines at word boundaries.
charwrap lines at character boundaries.
PangoEllipsizeModeThe PangoEllipsizeMode type describes what sort of (if any)
ellipsization should be applied to a line of text. In
the ellipsization process characters are removed from the
text in order to make it fit to a given width and replaced
with an ellipsis.
noneNo ellipsization
startOmit characters at the start of the text
middleOmit characters in the middle of the text
endOmit characters at the end of the text
PangoAlignmentA PangoAlignment describes how to align the lines of a PangoLayout within the
available space. If the PangoLayout is set to justify
using pangoLayoutSetJustify, this only has effect for partial lines.
leftPut all available space on the right
centerCenter the line within the available space
rightPut all available space on the left
Derived by RGtkGen from GTK+ documentation
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.