PangoLayout —
Defines functions to extract data from a GList and to produce a GList from a list of pointers.
The same for GSList.
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 () |
Enumerate to which side incomplete lines are flushed.
| data LayoutAlignment = | AlignCenter |
| | | AlignLeft |
| | | AlignRight |
An iterator to examine a layout. An iterator to examine a layout.
| newtype LayoutIter = | LayoutIter (ForeignPtr (LayoutIter)) |
A single line in a PangoLayout. A single line in a PangoLayout.
| newtype LayoutLine = | LayoutLine (ForeignPtr (LayoutLine)) |
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.
Get the alignment for the layout.
| layoutGetAlignment | :: PangoLayout | :: IO LayoutAlignment |
| pl |
Retrieves the PangoContext from this layout.
| layoutGetContext | :: PangoLayout | :: IO PangoContext |
| pl |
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.
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.
Ask for the number of lines in this layout.
| layoutGetLineCount | :: PangoLayout | :: IO Int |
| pl |
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.
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.
Retrieve if newlines are honored.
| layoutGetSingleParagraphMode | :: PangoLayout | :: IO Bool |
| pl |
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.
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).
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.
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.
Extract the line under the iterator.
| layoutIterGetLine | :: LayoutIter | :: IO (Maybe LayoutLine) |
| li |
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.
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.
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.
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.
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.
Set how this paragraph is aligned.
| layoutSetAlignment | :: PangoLayout | :: LayoutAlignment | :: IO () |
| pl | am |
Sets the alignment for the layout (how partial lines are positioned within the horizontal space available.)
Set the indentation of this paragraph.
| layoutSetIndent | :: PangoLayout | :: Int | :: IO () |
| pl | indent |
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.
Set if text should be streched to fit width.
| layoutSetJustify | :: PangoLayout | :: Bool | :: IO () |
| pl | j |
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.
Set the string in the layout.
| layoutSetMarkup | :: PangoLayout | :: Markup | :: IO () |
| pl | txt |
The string may include Markup.
Set the string in the layout.
| layoutSetMarkupWithAccel | :: PangoLayout | :: Markup | :: IO Char |
| pl | txt |
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.
Honor newlines or not.
| layoutSetSingleParagraphMode | :: PangoLayout | :: Bool | :: IO () |
| pl | honor |
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.
Set the spacing between lines of this paragraph.
| layoutSetSpacing | :: PangoLayout | :: Int | :: IO () |
| pl | spacing |
Set the width of this paragraph.
| layoutSetWidth | :: PangoLayout | :: Int | :: IO () |
| pl | width |
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.
Set how this paragraph is wrapped.
| layoutSetWrap | :: PangoLayout | :: LayoutWrapMode | :: IO () |
| pl | wm |
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.
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.