gi-gtk4-4.0.12: Gtk 4.x 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.Objects.TextChildAnchor

Contents

- Exported types
- Methods
  - getDeleted
  - getWidgets
  - new
  - newWithReplacement

Description

Marks a spot in a `GtkTextBuffer` where child widgets can be “anchored”.

The anchor can have multiple widgets anchored, to allow for multiple views.

Synopsis

- newtype TextChildAnchor = TextChildAnchor (ManagedPtr TextChildAnchor)
- class (GObject o, IsDescendantOf TextChildAnchor o) => IsTextChildAnchor o
- toTextChildAnchor :: (MonadIO m, IsTextChildAnchor o) => o -> m TextChildAnchor
- textChildAnchorGetDeleted :: (HasCallStack, MonadIO m, IsTextChildAnchor a) => a -> m Bool
- textChildAnchorGetWidgets :: (HasCallStack, MonadIO m, IsTextChildAnchor a) => a -> m [Widget]
- textChildAnchorNew :: (HasCallStack, MonadIO m) => m TextChildAnchor
- textChildAnchorNewWithReplacement :: (HasCallStack, MonadIO m) => Text -> m TextChildAnchor

# Exported types

newtype TextChildAnchor Source #

Memory-managed wrapper type.

Constructors

TextChildAnchor (ManagedPtr TextChildAnchor) |

#### Instances

Instances details

Eq TextChildAnchor Source # |
Instance details Defined in GI.Gtk.Objects.TextChildAnchor Methods (==) :: TextChildAnchor -> TextChildAnchor -> Bool Source # (/=) :: TextChildAnchor -> TextChildAnchor -> Bool Source #
GObject TextChildAnchor Source # |
Instance details Defined in GI.Gtk.Objects.TextChildAnchor
ManagedPtrNewtype TextChildAnchor Source # |
Instance details Defined in GI.Gtk.Objects.TextChildAnchor Methods toManagedPtr :: TextChildAnchor -> ManagedPtr TextChildAnchor Source #
TypedObject TextChildAnchor Source # |
Instance details Defined in GI.Gtk.Objects.TextChildAnchor Methods glibType :: IO GType Source #
HasParentTypes TextChildAnchor Source # |
Instance details Defined in GI.Gtk.Objects.TextChildAnchor
IsGValue (Maybe TextChildAnchor) Source # | Convert `TextChildAnchor` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.TextChildAnchor Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe TextChildAnchor -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe TextChildAnchor) Source #
type ParentTypes TextChildAnchor Source # |
Instance details Defined in GI.Gtk.Objects.TextChildAnchor type ParentTypes TextChildAnchor = '[Object]

class (GObject o, IsDescendantOf TextChildAnchor o) => IsTextChildAnchor o Source #

Type class for types which can be safely cast to `TextChildAnchor`, for instance with `toTextChildAnchor`.

#### Instances

Instances details

(GObject o, IsDescendantOf TextChildAnchor o) => IsTextChildAnchor o Source # |
Instance details Defined in GI.Gtk.Objects.TextChildAnchor

toTextChildAnchor :: (MonadIO m, IsTextChildAnchor o) => o -> m TextChildAnchor Source #

Cast to `TextChildAnchor`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

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

Expand

#### Methods

bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getData, getDeleted, getProperty, getQdata, getWidgets.

#### Setters

setData, setDataFull, setProperty.

## getDeleted

textChildAnchorGetDeleted Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextChildAnchor a) |
=> a | `anchor`: a `GtkTextChildAnchor`
-> m Bool | Returns: `True` if the child anchor has been deleted from its buffer

Determines whether a child anchor has been deleted from the buffer.

Keep in mind that the child anchor will be unreferenced when removed from the buffer, so you need to hold your own reference (with `objectRef`) if you plan to use this function — otherwise all deleted child anchors will also be finalized.

## getWidgets

textChildAnchorGetWidgets Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextChildAnchor a) |
=> a | `anchor`: a `GtkTextChildAnchor`
-> m [Widget] | Returns: an array of widgets anchored at `anchor`

Gets a list of all widgets anchored at this child anchor.

The order in which the widgets are returned is not defined.

## new

textChildAnchorNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m TextChildAnchor | Returns: a new `GtkTextChildAnchor`

Creates a new `GtkTextChildAnchor`.

Usually you would then insert it into a `GtkTextBuffer` with `textBufferInsertChildAnchor`. To perform the creation and insertion in one step, use the convenience function `textBufferCreateChildAnchor`.

## newWithReplacement

textChildAnchorNewWithReplacement Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Text | `character`: a replacement character
-> m TextChildAnchor | Returns: a new `GtkTextChildAnchor`

Creates a new `GtkTextChildAnchor` with the given replacement character.

Usually you would then insert it into a `GtkTextBuffer` with `textBufferInsertChildAnchor`.

Since: 4.6