Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
A PangoTabArray
contains an array of tab stops.
PangoTabArray
can be used to set tab stops in a PangoLayout
.
Each tab stop has an alignment, a position, and optionally
a character to use as decimal point.
Synopsis
- newtype TabArray = TabArray (ManagedPtr TabArray)
- tabArrayCopy :: (HasCallStack, MonadIO m) => TabArray -> m TabArray
- tabArrayFree :: (HasCallStack, MonadIO m) => TabArray -> m ()
- tabArrayFromString :: (HasCallStack, MonadIO m) => Text -> m (Maybe TabArray)
- tabArrayGetDecimalPoint :: (HasCallStack, MonadIO m) => TabArray -> Int32 -> m Char
- 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 ()
- tabArraySetDecimalPoint :: (HasCallStack, MonadIO m) => TabArray -> Int32 -> Char -> m ()
- tabArraySetPositionsInPixels :: (HasCallStack, MonadIO m) => TabArray -> Bool -> m ()
- tabArraySetTab :: (HasCallStack, MonadIO m) => TabArray -> Int32 -> TabAlign -> Int32 -> m ()
- tabArraySort :: (HasCallStack, MonadIO m) => TabArray -> m ()
- tabArrayToString :: (HasCallStack, MonadIO m) => TabArray -> m Text
Exported types
Memory-managed wrapper type.
Instances
Eq TabArray Source # | |
GBoxed TabArray Source # | |
Defined in GI.Pango.Structs.TabArray | |
ManagedPtrNewtype TabArray Source # | |
Defined in GI.Pango.Structs.TabArray toManagedPtr :: TabArray -> ManagedPtr TabArray # | |
TypedObject TabArray Source # | |
Defined in GI.Pango.Structs.TabArray | |
HasParentTypes TabArray Source # | |
Defined in GI.Pango.Structs.TabArray | |
IsGValue (Maybe TabArray) Source # | Convert |
Defined in GI.Pango.Structs.TabArray | |
type ParentTypes TabArray Source # | |
Defined in GI.Pango.Structs.TabArray |
Methods
Click to display all available methods, including inherited ones
Methods
copy, free, resize, sort, toString.
Getters
getDecimalPoint, getPositionsInPixels, getSize, getTab.
Setters
copy
:: (HasCallStack, MonadIO m) | |
=> TabArray |
|
-> m TabArray | Returns: the newly allocated |
Copies a PangoTabArray
.
free
:: (HasCallStack, MonadIO m) | |
=> TabArray |
|
-> m () |
Frees a tab array and associated resources.
fromString
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m (Maybe TabArray) | Returns: a new |
Deserializes a PangoTabArray
from a string.
This is the counterpart to tabArrayToString
.
See that functions for details about the format.
Since: 1.50
getDecimalPoint
tabArrayGetDecimalPoint Source #
:: (HasCallStack, MonadIO m) | |
=> TabArray |
|
-> Int32 |
|
-> m Char |
Gets the Unicode character to use as decimal point.
This is only relevant for tabs with TabAlignDecimal
alignment,
which align content at the first occurrence of the decimal point
character.
The default value of 0 means that Pango will use the decimal point according to the current locale.
Since: 1.50
getPositionsInPixels
tabArrayGetPositionsInPixels Source #
:: (HasCallStack, MonadIO m) | |
=> TabArray |
|
-> m Bool | Returns: whether positions are in pixels. |
getSize
:: (HasCallStack, MonadIO m) | |
=> TabArray |
|
-> m Int32 | Returns: the number of tab stops in the array. |
Gets the number of tab stops in tabArray
.
getTab
:: (HasCallStack, MonadIO m) | |
=> TabArray |
|
-> Int32 |
|
-> m (TabAlign, Int32) |
Gets the alignment and position of a tab stop.
new
:: (HasCallStack, MonadIO m) | |
=> Int32 |
|
-> Bool |
|
-> m TabArray | Returns: the newly allocated |
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
:: (HasCallStack, MonadIO m) | |
=> TabArray |
|
-> Int32 |
|
-> m () |
Resizes a tab array.
You must subsequently initialize any tabs that were added as a result of growing the array.
setDecimalPoint
tabArraySetDecimalPoint Source #
:: (HasCallStack, MonadIO m) | |
=> TabArray |
|
-> Int32 |
|
-> Char |
|
-> m () |
Sets the Unicode character to use as decimal point.
This is only relevant for tabs with TabAlignDecimal
alignment,
which align content at the first occurrence of the decimal point
character.
By default, Pango uses the decimal point according to the current locale.
Since: 1.50
setPositionsInPixels
tabArraySetPositionsInPixels Source #
:: (HasCallStack, MonadIO m) | |
=> TabArray |
|
-> Bool |
|
-> m () |
Sets whether positions in this array are specified in pixels.
Since: 1.50
setTab
:: (HasCallStack, MonadIO m) | |
=> TabArray |
|
-> Int32 |
|
-> TabAlign |
|
-> Int32 |
|
-> m () |
Sets the alignment and location of a tab stop.
sort
:: (HasCallStack, MonadIO m) | |
=> TabArray |
|
-> m () |
Utility function to ensure that the tab stops are in increasing order.
Since: 1.50
toString
:: (HasCallStack, MonadIO m) | |
=> TabArray |
|
-> m Text | Returns: a newly allocated string |
Serializes a PangoTabArray
to a string.
No guarantees are made about the format of the string, it may change between Pango versions.
The intended use of this function is testing and debugging. The format is not meant as a permanent storage format.
Since: 1.50