Name

PangoLayout —

Defines functions to extract data from a GList and to produce a GList from a list of pointers.

The same for GSList.

Synopsis

type
        GList
type
        GSList
data
        LayoutAlignment
newtype
        LayoutIter
newtype
        LayoutLine
data
        LayoutWrapMode
layoutGetIter:: PangoLayout -> IO LayoutIter
pangoScale:: Int

layoutAtLastLine <no type information>

layoutContextChanged:: PangoLayout -> IO ()
layoutCopy:: PangoLayout -> IO PangoLayout
layoutGetAlignment:: PangoLayout -> IO LayoutAlignment
layoutGetContext:: PangoLayout -> IO PangoContext
layoutGetExtents:: PangoLayout -> IO (Rectangle,Rectangle)
layoutGetIndent:: PangoLayout -> IO Int
layoutGetJustify:: PangoLayout -> IO Bool
layoutGetLineCount:: PangoLayout -> IO Int
layoutGetLines:: PangoLayout -> IO [LayoutLine]
layoutGetPixelExtents:: PangoLayout -> IO (Rectangle,Rectangle)
layoutGetSingleParagraphMode:: PangoLayout -> IO Bool
layoutGetSpacing:: PangoLayout -> IO Int
layoutGetText:: PangoLayout -> IO String
layoutGetWidth:: PangoLayout -> IO Int
layoutGetWrap:: PangoLayout -> IO LayoutWrapMode
layoutIterGetBaseline:: LayoutIter -> IO Int
layoutIterGetCharExtents:: LayoutIter -> IO Rectangle
layoutIterGetClusterExtents:: LayoutIter -> IO (Rectangle,Rectangle)
layoutIterGetLine:: LayoutIter -> IO (Maybe LayoutLine)
layoutIterGetLineExtents:: LayoutIter -> IO (Rectangle,Rectangle)
layoutIterGetLineYRange:: LayoutIter -> IO (Int,Int)
layoutIterGetRunExtents:: LayoutIter -> IO (Rectangle,Rectangle)
layoutLineGetExtents:: LayoutLine -> IO (Rectangle,Rectangle)
layoutLineGetPixelExtents:: LayoutLine -> IO (Rectangle,Rectangle)

layoutNextChar <no type information>

layoutNextCluster <no type information>

layoutNextLine <no type information>

layoutNextRun <no type information>

layoutSetAlignment:: PangoLayout -> LayoutAlignment -> IO ()
layoutSetIndent:: PangoLayout -> Int -> IO ()
layoutSetJustify:: PangoLayout -> Bool -> IO ()
layoutSetMarkup:: PangoLayout -> Markup -> IO ()
layoutSetMarkupWithAccel:: PangoLayout -> Markup -> IO Char
layoutSetSingleParagraphMode:: PangoLayout -> Bool -> IO ()
layoutSetSpacing:: PangoLayout -> Int -> IO ()
layoutSetText:: PangoLayout -> String -> IO ()
layoutSetWidth:: PangoLayout -> Int -> IO ()
layoutSetWrap:: PangoLayout -> LayoutWrapMode -> IO ()

Datatypes

type GList

GListPtr (())

type GSList

GSListPtr (())

data LayoutAlignment

Enumerate to which side incomplete lines are flushed.

data LayoutAlignment =AlignCenter
| AlignLeft
| AlignRight

newtype LayoutIter

An iterator to examine a layout. An iterator to examine a layout.

newtype LayoutIter =LayoutIter (ForeignPtr (LayoutIter))

newtype LayoutLine

A single line in a PangoLayout. A single line in a PangoLayout.

newtype LayoutLine =LayoutLine (ForeignPtr (LayoutLine))

data LayoutWrapMode

data LayoutWrapMode =WrapAnywhere
| WrapPartialWords
| WrapWholeWords

Constructors

layoutGetIter

Create an iterator to examine a layout.

layoutGetIter:: PangoLayout:: IO LayoutIter
pl

Methods

no type info on symbol layoutAtLastLine

layoutContextChanged

Signal a Context change.

layoutContextChanged:: PangoLayout:: IO ()
pl

Forces recomputation of any state in the PangoLayout that might depend on the layout's context. This function should be called if you make changes to the context subsequent to creating the layout.

layoutCopy

Create a copy of the Layout.

layoutCopy:: PangoLayout:: IO PangoLayout
pl

layoutGetAlignment

Get the alignment for the layout.

layoutGetAlignment:: PangoLayout:: IO LayoutAlignment
pl

layoutGetContext

Retrieves the PangoContext from this layout.

layoutGetContext:: PangoLayout:: IO PangoContext
pl

layoutGetExtents

Compute the physical size of the layout.

layoutGetExtents:: PangoLayout:: IO (Rectangle,Rectangle)
pl

Computes the logical and the ink size of the Layout. The logical layout is used for positioning, the ink size is the smallest bounding box that includes all character pixels. The ink size can be smaller or larger that the logical layout.

All values are in layout units. To get to device units (pixel for Drawables) divide by pangoScale.

layoutGetIndent

Gets the indentation of this paragraph.

layoutGetIndent:: PangoLayout:: IO Int
pl

Gets the amount by which the first line should be shorter than the rest of the lines.

layoutGetJustify

Retrieve the justification flag.

layoutGetJustify:: PangoLayout:: IO Bool
pl

See layoutSetJustify.

layoutGetLineCount

Ask for the number of lines in this layout.

layoutGetLineCount:: PangoLayout:: IO Int
pl

layoutGetLines

Extract the single lines of the layout.

layoutGetLines:: PangoLayout:: IO [LayoutLine]
pl

The lines of each layout are regenerated if any attribute changes. Thus the returned list does not reflect the current state of lines after a change has been made.

layoutGetPixelExtents

Compute the physical size of the layout.

layoutGetPixelExtents:: PangoLayout:: IO (Rectangle,Rectangle)
pl

Computes the logical and the ink size of the Layout. The logical layout is used for positioning, the ink size is the smallest bounding box that includes all character pixels. The ink size can be smaller or larger that the logical layout.

All values are in device units. This function is a wrapper around layoutGetExtents with scaling.

layoutGetSingleParagraphMode

Retrieve if newlines are honored.

layoutGetSingleParagraphMode:: PangoLayout:: IO Bool
pl

See layoutSetSingleParagraphMode.

layoutGetSpacing

Gets the spacing between the lines.

layoutGetSpacing:: PangoLayout:: IO Int
pl

layoutGetText

Retrieve the string in the layout.

layoutGetText:: PangoLayout:: IO String
pl

layoutGetWidth

Gets the width of this paragraph.

layoutGetWidth:: PangoLayout:: IO Int
pl

Gets the width to which the lines of the PangoLayout should be wrapped.

Returns is the current width, or -1 to indicate that no wrapping is performed.

layoutGetWrap

Get the wrap mode for the layout.

layoutGetWrap:: PangoLayout:: IO LayoutWrapMode
pl

layoutIterGetBaseline

Query the vertical position within the layout.

layoutIterGetBaseline:: LayoutIter:: IO Int

Gets the y position of the current line's baseline, in layout coordinates (origin at top left of the entire layout).

layoutIterGetCharExtents

Retrieve a rectangle surrounding a character.

layoutIterGetCharExtents:: LayoutIter:: IO Rectangle
li

Get the extents of the current character in layout cooridnates (origin is the top left of the entire layout). Only logical extents can sensibly be obtained for characters.

layoutIterGetClusterExtents

Compute the physical size of the cluster.

layoutIterGetClusterExtents:: LayoutIter:: IO (Rectangle,Rectangle)
li

Computes the logical and the ink size of the cluster pointed to by LayoutIter.

All values are in layoutIter units. To get to device units (pixel for Drawables) divide by pangoScale.

layoutIterGetLine

Extract the line under the iterator.

layoutIterGetLine:: LayoutIter:: IO (Maybe LayoutLine)
li

layoutIterGetLineExtents

Compute the physical size of the line.

layoutIterGetLineExtents:: LayoutIter:: IO (Rectangle,Rectangle)
li

Computes the logical and the ink size of the line pointed to by LayoutIter.

Extents are in layout coordinates (origin is the top-left corner of the entire PangoLayout). Thus the extents returned by this function will be the same width/height but not at the same x/y as the extents returned from pangoLayoutLineGetExtents.

layoutIterGetLineYRange

Retrieve vertical extent of this line.

layoutIterGetLineYRange:: LayoutIter:: IO (Int,Int)
li

Divides the vertical space in the PangoLayout being iterated over between the lines in the layout, and returns the space belonging to the current line. A line's range includes the line's logical extents, plus half of the spacing above and below the line, if pangoLayoutSetSpacing has been called to set layout spacing. The y positions are in layout coordinates (origin at top left of the entire layout).

The first element in the returned tuple is the start, the second is the end of this line.

layoutIterGetRunExtents

Compute the physical size of the run.

layoutIterGetRunExtents:: LayoutIter:: IO (Rectangle,Rectangle)
li

Computes the logical and the ink size of the run pointed to by LayoutIter.

All values are in layoutIter units. To get to device units (pixel for Drawables) divide by pangoScale.

layoutLineGetExtents

Compute the physical size of the line.

layoutLineGetExtents:: LayoutLine:: IO (Rectangle,Rectangle)
pl

Computes the logical and the ink size of the LayoutLine. The logical layout is used for positioning, the ink size is the smallest bounding box that includes all character pixels. The ink size can be smaller or larger that the logical layout.

All values are in layout units. To get to device units (pixel for Drawables) divide by pangoScale.

layoutLineGetPixelExtents

Compute the physical size of the line.

layoutLineGetPixelExtents:: LayoutLine:: IO (Rectangle,Rectangle)
pl

Computes the logical and the ink size of the LayoutLine. The logical layout is used for positioning, the ink size is the smallest bounding box that includes all character pixels. The ink size can be smaller or larger that the logical layout.

All values are in device units. This function is a wrapper around layoutLineGetExtents with scaling.

no type info on symbol layoutNextChar
no type info on symbol layoutNextCluster
no type info on symbol layoutNextLine
no type info on symbol layoutNextRun

layoutSetAlignment

Set how this paragraph is aligned.

layoutSetAlignment:: PangoLayout:: LayoutAlignment:: IO ()
plam

Sets the alignment for the layout (how partial lines are positioned within the horizontal space available.)

layoutSetIndent

Set the indentation of this paragraph.

layoutSetIndent:: PangoLayout:: Int:: IO ()
plindent

Sets the amount by which the first line should be shorter than the rest of the lines. This may be negative, in which case the subsequent lines will be shorter than the first line. (However, in either case, the entire width of the layout will be given by the value.

layoutSetJustify

Set if text should be streched to fit width.

layoutSetJustify:: PangoLayout:: Bool:: IO ()
plj

Sets whether or not each complete line should be stretched to fill the entire width of the layout. This stretching is typically done by adding whitespace, but for some scripts (such as Arabic), the justification is done by extending the characters.

layoutSetMarkup

Set the string in the layout.

layoutSetMarkup:: PangoLayout:: Markup:: IO ()
pltxt

The string may include Markup.

layoutSetMarkupWithAccel

Set the string in the layout.

layoutSetMarkupWithAccel:: PangoLayout:: Markup:: IO Char
pltxt

The string may include Markup. Furthermore, any underscore character indicates that the next character should be marked as accelerator (i.e. underlined). A literal underscore character can be produced by placing it twice in the string.

The character which follows the underscore is returned so it can be used to add the actual keyboard shortcut.

layoutSetSingleParagraphMode

Honor newlines or not.

layoutSetSingleParagraphMode:: PangoLayout:: Bool:: IO ()
plhonor

If honor is True, do not treat newlines and similar characters as paragraph separators; instead, keep all text in a single paragraph, and display a glyph for paragraph separator characters. Used when you want to allow editing of newlines on a single text line.

layoutSetSpacing

Set the spacing between lines of this paragraph.

layoutSetSpacing:: PangoLayout:: Int:: IO ()
plspacing

layoutSetText

Set the string in the layout.

layoutSetText:: PangoLayout:: String:: IO ()
pltxt

layoutSetWidth

Set the width of this paragraph.

layoutSetWidth:: PangoLayout:: Int:: IO ()
plwidth

Sets the width to which the lines of the PangoLayout should be wrapped.

width is the desired width, or -1 to indicate that no wrapping should be performed.

layoutSetWrap

Set how this paragraph is wrapped.

layoutSetWrap:: PangoLayout:: LayoutWrapMode:: IO ()
plwm

Sets the wrap style; the wrap style only has an effect if a width is set on the layout with layoutSetWidth. To turn off wrapping, set the width to -1.

Constants

pangoScale

Internal unit of measuring sizes.

pangoScale

The pangoScale constant represents the scale between dimensions used for distances in text rendering and device units. (The definition of device units is dependent on the output device; it will typically be pixels for a screen, and points for a printer.) When setting font sizes, device units are always considered to be points (as in "12 point font"), rather than pixels.