gi-pango-1.0.19: Pango bindings

Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com)
Safe Haskell | None
Language | Haskell2010

GI.Pango.Structs.TabArray

Contents

- Exported types
- Methods
  - copy
  - free
  - getPositionsInPixels
  - getSize
  - getTab
  - new
  - resize
  - setTab

Description

A `TabArray` struct contains an array of tab stops. Each tab stop has an alignment and a position.

Synopsis

- newtype TabArray = TabArray (ManagedPtr TabArray)
- noTabArray :: Maybe TabArray
- tabArrayCopy :: (HasCallStack, MonadIO m) => TabArray -> m TabArray
- tabArrayFree :: (HasCallStack, MonadIO m) => TabArray -> m ()
- tabArrayGetPositionsInPixels :: (HasCallStack, MonadIO m) => TabArray -> m Bool
- tabArrayGetSize :: (HasCallStack, MonadIO m) => TabArray -> m Int32
- tabArrayGetTab :: (HasCallStack, MonadIO m) => TabArray -> Int32 -> m (TabAlign, Int32)
- tabArrayNew :: (HasCallStack, MonadIO m) => Int32 -> Bool -> m TabArray
- tabArrayResize :: (HasCallStack, MonadIO m) => TabArray -> Int32 -> m ()
- tabArraySetTab :: (HasCallStack, MonadIO m) => TabArray -> Int32 -> TabAlign -> Int32 -> m ()

# Exported types

newtype TabArray Source #

Memory-managed wrapper type.

Constructors

TabArray (ManagedPtr TabArray) |

Instances

BoxedObject TabArray Source # |
Instance details Defined in GI.Pango.Structs.TabArray Methods boxedType :: TabArray -> IO GType Source #

noTabArray :: Maybe TabArray Source #

A convenience alias for `Nothing` :: `Maybe` `TabArray`.

# Methods

## copy

tabArrayCopy Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TabArray | `src`: `TabArray` to copy
-> m TabArray | Returns: the newly allocated `TabArray`, which should be freed with `tabArrayFree`.

Copies a `TabArray`

## free

tabArrayFree Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TabArray | `tabArray`: a `TabArray`
-> m () |

Frees a tab array and associated resources.

## getPositionsInPixels

tabArrayGetPositionsInPixels Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TabArray | `tabArray`: a `TabArray`
-> m Bool | Returns: whether positions are in pixels.

Returns `True` if the tab positions are in pixels, `False` if they are in Pango units.

## getSize

tabArrayGetSize Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TabArray | `tabArray`: a `TabArray`
-> m Int32 | Returns: the number of tab stops in the array.

Gets the number of tab stops in `tabArray`.

## getTab

tabArrayGetTab Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TabArray | `tabArray`: a `TabArray`
-> Int32 | `tabIndex`: tab stop index
-> m (TabAlign, Int32) |

Gets the alignment and position of a tab stop.

## new

tabArrayNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Int32 | `initialSize`: Initial number of tab stops to allocate, can be 0
-> Bool | `positionsInPixels`: whether positions are in pixel units
-> m TabArray | Returns: the newly allocated `TabArray`, which should be freed with `tabArrayFree`.

Creates an array of `initialSize` tab stops. Tab stops are specified in pixel units if `positionsInPixels` is `True`, otherwise in Pango units. All stops are initially at position 0.

## resize

tabArrayResize Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TabArray | `tabArray`: a `TabArray`
-> Int32 | `newSize`: new size of the array
-> m () |

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

## setTab

tabArraySetTab Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TabArray | `tabArray`: a `TabArray`
-> Int32 | `tabIndex`: the index of a tab stop
-> TabAlign | `alignment`: tab alignment
-> Int32 | `location`: tab location in Pango units
-> m () |

Sets the alignment and location of a tab stop. `alignment` must always be `PANGO_TAB_LEFT` in the current implementation.