gi-gtk-3.0.43: Gtk bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Structs.TextAttributes

Contents

- Exported types
- Methods
  - copy
  - copyValues
  - new
  - ref
  - unref
- Properties
  - appearance
  - bgFullHeight
  - direction
  - editable
  - font
  - fontScale
  - indent
  - invisible
  - justification
  - language
  - leftMargin
  - letterSpacing
  - noFallback
  - pixelsAboveLines
  - pixelsBelowLines
  - pixelsInsideWrap
  - rightMargin
  - tabs
  - wrapMode

Description

Using `TextAttributes` directly should rarely be necessary. It’s primarily useful with `textIterGetAttributes`. As with most GTK+ structs, the fields in this struct should only be read, never modified directly.

Synopsis

- newtype TextAttributes = TextAttributes (ManagedPtr TextAttributes)
- newZeroTextAttributes :: MonadIO m => m TextAttributes
- textAttributesCopy :: (HasCallStack, MonadIO m) => TextAttributes -> m TextAttributes
- textAttributesCopyValues :: (HasCallStack, MonadIO m) => TextAttributes -> TextAttributes -> m ()
- textAttributesNew :: (HasCallStack, MonadIO m) => m TextAttributes
- textAttributesRef :: (HasCallStack, MonadIO m) => TextAttributes -> m TextAttributes
- textAttributesUnref :: (HasCallStack, MonadIO m) => TextAttributes -> m ()
- getTextAttributesAppearance :: MonadIO m => TextAttributes -> m TextAppearance
- getTextAttributesBgFullHeight :: MonadIO m => TextAttributes -> m Word32
- setTextAttributesBgFullHeight :: MonadIO m => TextAttributes -> Word32 -> m ()
- getTextAttributesDirection :: MonadIO m => TextAttributes -> m TextDirection
- setTextAttributesDirection :: MonadIO m => TextAttributes -> TextDirection -> m ()
- getTextAttributesEditable :: MonadIO m => TextAttributes -> m Word32
- setTextAttributesEditable :: MonadIO m => TextAttributes -> Word32 -> m ()
- clearTextAttributesFont :: MonadIO m => TextAttributes -> m ()
- getTextAttributesFont :: MonadIO m => TextAttributes -> m (Maybe FontDescription)
- setTextAttributesFont :: MonadIO m => TextAttributes -> Ptr FontDescription -> m ()
- getTextAttributesFontScale :: MonadIO m => TextAttributes -> m Double
- setTextAttributesFontScale :: MonadIO m => TextAttributes -> Double -> m ()
- getTextAttributesIndent :: MonadIO m => TextAttributes -> m Int32
- setTextAttributesIndent :: MonadIO m => TextAttributes -> Int32 -> m ()
- getTextAttributesInvisible :: MonadIO m => TextAttributes -> m Word32
- setTextAttributesInvisible :: MonadIO m => TextAttributes -> Word32 -> m ()
- getTextAttributesJustification :: MonadIO m => TextAttributes -> m Justification
- setTextAttributesJustification :: MonadIO m => TextAttributes -> Justification -> m ()
- clearTextAttributesLanguage :: MonadIO m => TextAttributes -> m ()
- getTextAttributesLanguage :: MonadIO m => TextAttributes -> m (Maybe Language)
- setTextAttributesLanguage :: MonadIO m => TextAttributes -> Ptr Language -> m ()
- getTextAttributesLeftMargin :: MonadIO m => TextAttributes -> m Int32
- setTextAttributesLeftMargin :: MonadIO m => TextAttributes -> Int32 -> m ()
- getTextAttributesLetterSpacing :: MonadIO m => TextAttributes -> m Int32
- setTextAttributesLetterSpacing :: MonadIO m => TextAttributes -> Int32 -> m ()
- getTextAttributesNoFallback :: MonadIO m => TextAttributes -> m Word32
- setTextAttributesNoFallback :: MonadIO m => TextAttributes -> Word32 -> m ()
- getTextAttributesPixelsAboveLines :: MonadIO m => TextAttributes -> m Int32
- setTextAttributesPixelsAboveLines :: MonadIO m => TextAttributes -> Int32 -> m ()
- getTextAttributesPixelsBelowLines :: MonadIO m => TextAttributes -> m Int32
- setTextAttributesPixelsBelowLines :: MonadIO m => TextAttributes -> Int32 -> m ()
- getTextAttributesPixelsInsideWrap :: MonadIO m => TextAttributes -> m Int32
- setTextAttributesPixelsInsideWrap :: MonadIO m => TextAttributes -> Int32 -> m ()
- getTextAttributesRightMargin :: MonadIO m => TextAttributes -> m Int32
- setTextAttributesRightMargin :: MonadIO m => TextAttributes -> Int32 -> m ()
- clearTextAttributesTabs :: MonadIO m => TextAttributes -> m ()
- getTextAttributesTabs :: MonadIO m => TextAttributes -> m (Maybe TabArray)
- setTextAttributesTabs :: MonadIO m => TextAttributes -> Ptr TabArray -> m ()
- getTextAttributesWrapMode :: MonadIO m => TextAttributes -> m WrapMode
- setTextAttributesWrapMode :: MonadIO m => TextAttributes -> WrapMode -> m ()

# Exported types

newtype TextAttributes Source #

Memory-managed wrapper type.

Constructors

TextAttributes (ManagedPtr TextAttributes) |

#### Instances

Instances details

Eq TextAttributes Source # |
Instance details Defined in GI.Gtk.Structs.TextAttributes Methods (==) :: TextAttributes -> TextAttributes -> Bool Source # (/=) :: TextAttributes -> TextAttributes -> Bool Source #
GBoxed TextAttributes Source # |
Instance details Defined in GI.Gtk.Structs.TextAttributes
ManagedPtrNewtype TextAttributes Source # |
Instance details Defined in GI.Gtk.Structs.TextAttributes Methods toManagedPtr :: TextAttributes -> ManagedPtr TextAttributes Source #
TypedObject TextAttributes Source # |
Instance details Defined in GI.Gtk.Structs.TextAttributes Methods glibType :: IO GType Source #
HasParentTypes TextAttributes Source # |
Instance details Defined in GI.Gtk.Structs.TextAttributes
tag ~ 'AttrSet => Constructible TextAttributes tag Source # |
Instance details Defined in GI.Gtk.Structs.TextAttributes Methods new :: MonadIO m => (ManagedPtr TextAttributes -> TextAttributes) -> [AttrOp TextAttributes tag] -> m TextAttributes Source #
IsGValue (Maybe TextAttributes) Source # | Convert `TextAttributes` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Structs.TextAttributes Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe TextAttributes -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe TextAttributes) Source #
type ParentTypes TextAttributes Source # |
Instance details Defined in GI.Gtk.Structs.TextAttributes type ParentTypes TextAttributes = '[] :: [Type]

newZeroTextAttributes :: MonadIO m => m TextAttributes Source #

Construct a `TextAttributes` struct initialized to zero.

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

copy, copyValues, ref, unref.

#### Getters

None.

#### Setters

None.

## copy

textAttributesCopy Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TextAttributes | `src`: a `TextAttributes` to be copied
-> m TextAttributes | Returns: a copy of `src`, free with `textAttributesUnref`

Copies `src` and returns a new `TextAttributes`.

## copyValues

textAttributesCopyValues Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TextAttributes | `src`: a `TextAttributes`
-> TextAttributes | `dest`: another `TextAttributes`
-> m () |

Copies the values from `src` to `dest` so that `dest` has the same values as `src`. Frees existing values in `dest`.

## new

textAttributesNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m TextAttributes | Returns: a new `TextAttributes`, free with `textAttributesUnref`.

Creates a `TextAttributes`, which describes a set of properties on some text.

## ref

textAttributesRef Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TextAttributes | `values`: a `TextAttributes`
-> m TextAttributes | Returns: the `TextAttributes` that were passed in

Increments the reference count on `values`.

## unref

textAttributesUnref Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TextAttributes | `values`: a `TextAttributes`
-> m () |

Decrements the reference count on `values`, freeing the structure if the reference count reaches 0.

# Properties

## appearance

`TextAppearance` for text.

getTextAttributesAppearance :: MonadIO m => TextAttributes -> m TextAppearance Source #

Get the value of the “`appearance`” field. When overloading is enabled, this is equivalent to

    get textAttributes #appearance

## bgFullHeight

Background is fit to full line height rather than baseline +/- ascent/descent (font height).

getTextAttributesBgFullHeight :: MonadIO m => TextAttributes -> m Word32 Source #

Get the value of the “`bg_full_height`” field. When overloading is enabled, this is equivalent to

    get textAttributes #bgFullHeight

setTextAttributesBgFullHeight :: MonadIO m => TextAttributes -> Word32 -> m () Source #

Set the value of the “`bg_full_height`” field. When overloading is enabled, this is equivalent to

    set textAttributes [ #bgFullHeight := value ]

## direction

`TextDirection` for text.

getTextAttributesDirection :: MonadIO m => TextAttributes -> m TextDirection Source #

Get the value of the “`direction`” field. When overloading is enabled, this is equivalent to

    get textAttributes #direction

setTextAttributesDirection :: MonadIO m => TextAttributes -> TextDirection -> m () Source #

Set the value of the “`direction`” field. When overloading is enabled, this is equivalent to

    set textAttributes [ #direction := value ]

## editable

Can edit this text.

getTextAttributesEditable :: MonadIO m => TextAttributes -> m Word32 Source #

Get the value of the “`editable`” field. When overloading is enabled, this is equivalent to

    get textAttributes #editable

setTextAttributesEditable :: MonadIO m => TextAttributes -> Word32 -> m () Source #

Set the value of the “`editable`” field. When overloading is enabled, this is equivalent to

    set textAttributes [ #editable := value ]

## font

`FontDescription` for text.

clearTextAttributesFont :: MonadIO m => TextAttributes -> m () Source #

Set the value of the “`font`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #font

getTextAttributesFont :: MonadIO m => TextAttributes -> m (Maybe FontDescription) Source #

Get the value of the “`font`” field. When overloading is enabled, this is equivalent to

    get textAttributes #font

setTextAttributesFont :: MonadIO m => TextAttributes -> Ptr FontDescription -> m () Source #

Set the value of the “`font`” field. When overloading is enabled, this is equivalent to

    set textAttributes [ #font := value ]

## fontScale

Font scale factor.

getTextAttributesFontScale :: MonadIO m => TextAttributes -> m Double Source #

Get the value of the “`font_scale`” field. When overloading is enabled, this is equivalent to

    get textAttributes #fontScale

setTextAttributesFontScale :: MonadIO m => TextAttributes -> Double -> m () Source #

Set the value of the “`font_scale`” field. When overloading is enabled, this is equivalent to

    set textAttributes [ #fontScale := value ]

## indent

Amount to indent the paragraph, in pixels.

getTextAttributesIndent :: MonadIO m => TextAttributes -> m Int32 Source #

Get the value of the “`indent`” field. When overloading is enabled, this is equivalent to

    get textAttributes #indent

setTextAttributesIndent :: MonadIO m => TextAttributes -> Int32 -> m () Source #

Set the value of the “`indent`” field. When overloading is enabled, this is equivalent to

    set textAttributes [ #indent := value ]

## invisible

Hide the text.

getTextAttributesInvisible :: MonadIO m => TextAttributes -> m Word32 Source #

Get the value of the “`invisible`” field. When overloading is enabled, this is equivalent to

    get textAttributes #invisible

setTextAttributesInvisible :: MonadIO m => TextAttributes -> Word32 -> m () Source #

Set the value of the “`invisible`” field. When overloading is enabled, this is equivalent to

    set textAttributes [ #invisible := value ]

## justification

`Justification` for text.

getTextAttributesJustification :: MonadIO m => TextAttributes -> m Justification Source #

Get the value of the “`justification`” field. When overloading is enabled, this is equivalent to

    get textAttributes #justification

setTextAttributesJustification :: MonadIO m => TextAttributes -> Justification -> m () Source #

Set the value of the “`justification`” field. When overloading is enabled, this is equivalent to

    set textAttributes [ #justification := value ]

## language

`Language` for text.

clearTextAttributesLanguage :: MonadIO m => TextAttributes -> m () Source #

Set the value of the “`language`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #language

getTextAttributesLanguage :: MonadIO m => TextAttributes -> m (Maybe Language) Source #

Get the value of the “`language`” field. When overloading is enabled, this is equivalent to

    get textAttributes #language

setTextAttributesLanguage :: MonadIO m => TextAttributes -> Ptr Language -> m () Source #

Set the value of the “`language`” field. When overloading is enabled, this is equivalent to

    set textAttributes [ #language := value ]

## leftMargin

Width of the left margin in pixels.

getTextAttributesLeftMargin :: MonadIO m => TextAttributes -> m Int32 Source #

Get the value of the “`left_margin`” field. When overloading is enabled, this is equivalent to

    get textAttributes #leftMargin

setTextAttributesLeftMargin :: MonadIO m => TextAttributes -> Int32 -> m () Source #

Set the value of the “`left_margin`” field. When overloading is enabled, this is equivalent to

    set textAttributes [ #leftMargin := value ]

## letterSpacing

Extra space to insert between graphemes, in Pango units

getTextAttributesLetterSpacing :: MonadIO m => TextAttributes -> m Int32 Source #

Get the value of the “`letter_spacing`” field. When overloading is enabled, this is equivalent to

    get textAttributes #letterSpacing

setTextAttributesLetterSpacing :: MonadIO m => TextAttributes -> Int32 -> m () Source #

Set the value of the “`letter_spacing`” field. When overloading is enabled, this is equivalent to

    set textAttributes [ #letterSpacing := value ]

## noFallback

Whether to disable font fallback.

getTextAttributesNoFallback :: MonadIO m => TextAttributes -> m Word32 Source #

Get the value of the “`no_fallback`” field. When overloading is enabled, this is equivalent to

    get textAttributes #noFallback

setTextAttributesNoFallback :: MonadIO m => TextAttributes -> Word32 -> m () Source #

Set the value of the “`no_fallback`” field. When overloading is enabled, this is equivalent to

    set textAttributes [ #noFallback := value ]

## pixelsAboveLines

Pixels of blank space above paragraphs.

getTextAttributesPixelsAboveLines :: MonadIO m => TextAttributes -> m Int32 Source #

Get the value of the “`pixels_above_lines`” field. When overloading is enabled, this is equivalent to

    get textAttributes #pixelsAboveLines

setTextAttributesPixelsAboveLines :: MonadIO m => TextAttributes -> Int32 -> m () Source #

Set the value of the “`pixels_above_lines`” field. When overloading is enabled, this is equivalent to

    set textAttributes [ #pixelsAboveLines := value ]

## pixelsBelowLines

Pixels of blank space below paragraphs.

getTextAttributesPixelsBelowLines :: MonadIO m => TextAttributes -> m Int32 Source #

Get the value of the “`pixels_below_lines`” field. When overloading is enabled, this is equivalent to

    get textAttributes #pixelsBelowLines

setTextAttributesPixelsBelowLines :: MonadIO m => TextAttributes -> Int32 -> m () Source #

Set the value of the “`pixels_below_lines`” field. When overloading is enabled, this is equivalent to

    set textAttributes [ #pixelsBelowLines := value ]

## pixelsInsideWrap

Pixels of blank space between wrapped lines in a paragraph.

getTextAttributesPixelsInsideWrap :: MonadIO m => TextAttributes -> m Int32 Source #

Get the value of the “`pixels_inside_wrap`” field. When overloading is enabled, this is equivalent to

    get textAttributes #pixelsInsideWrap

setTextAttributesPixelsInsideWrap :: MonadIO m => TextAttributes -> Int32 -> m () Source #

Set the value of the “`pixels_inside_wrap`” field. When overloading is enabled, this is equivalent to

    set textAttributes [ #pixelsInsideWrap := value ]

## rightMargin

Width of the right margin in pixels.

getTextAttributesRightMargin :: MonadIO m => TextAttributes -> m Int32 Source #

Get the value of the “`right_margin`” field. When overloading is enabled, this is equivalent to

    get textAttributes #rightMargin

setTextAttributesRightMargin :: MonadIO m => TextAttributes -> Int32 -> m () Source #

Set the value of the “`right_margin`” field. When overloading is enabled, this is equivalent to

    set textAttributes [ #rightMargin := value ]

## tabs

Custom `TabArray` for this text.

clearTextAttributesTabs :: MonadIO m => TextAttributes -> m () Source #

Set the value of the “`tabs`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #tabs

getTextAttributesTabs :: MonadIO m => TextAttributes -> m (Maybe TabArray) Source #

Get the value of the “`tabs`” field. When overloading is enabled, this is equivalent to

    get textAttributes #tabs

setTextAttributesTabs :: MonadIO m => TextAttributes -> Ptr TabArray -> m () Source #

Set the value of the “`tabs`” field. When overloading is enabled, this is equivalent to

    set textAttributes [ #tabs := value ]

## wrapMode

`WrapMode` for text.

getTextAttributesWrapMode :: MonadIO m => TextAttributes -> m WrapMode Source #

Get the value of the “`wrap_mode`” field. When overloading is enabled, this is equivalent to

    get textAttributes #wrapMode

setTextAttributesWrapMode :: MonadIO m => TextAttributes -> WrapMode -> m () Source #

Set the value of the “`wrap_mode`” field. When overloading is enabled, this is equivalent to

    set textAttributes [ #wrapMode := value ]