gi-atk-2.0.28: Atk bindings

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

GI.Atk.Structs.TextSelection

Contents

- Exported types
- Methods
- Properties
  - endObject
  - endOffset
  - startIsActive
  - startObject
  - startOffset

Description

This structure represents a single text selection within a document. This selection is defined by two points in the content, where each one is defined by an AtkObject supporting the AtkText interface and a character offset relative to it.

The end object must appear after the start object in the accessibility tree, i.e. the end object must be reachable from the start object by navigating forward (next, first child etc).

This struct also contains a `startIsActive` boolean, to communicate if the start of the selection is the active point or not.

The active point corresponds to the user's focus or point of interest. The user moves the active point to expand or collapse the range. The anchor point is the other point of the range and typically remains constant. In most cases, anchor is the start of the range and active is the end. However, when selecting backwards (e.g. pressing shift+left arrow in a text field), the start of the range is the active point, as the user moves this to manipulate the selection.

Since: 2.52

Synopsis

- newtype TextSelection = TextSelection (ManagedPtr TextSelection)
- newZeroTextSelection :: MonadIO m => m TextSelection
- clearTextSelectionEndObject :: MonadIO m => TextSelection -> m ()
- getTextSelectionEndObject :: MonadIO m => TextSelection -> m (Maybe Object)
- setTextSelectionEndObject :: MonadIO m => TextSelection -> Ptr Object -> m ()
- getTextSelectionEndOffset :: MonadIO m => TextSelection -> m Int32
- setTextSelectionEndOffset :: MonadIO m => TextSelection -> Int32 -> m ()
- getTextSelectionStartIsActive :: MonadIO m => TextSelection -> m Bool
- setTextSelectionStartIsActive :: MonadIO m => TextSelection -> Bool -> m ()
- clearTextSelectionStartObject :: MonadIO m => TextSelection -> m ()
- getTextSelectionStartObject :: MonadIO m => TextSelection -> m (Maybe Object)
- setTextSelectionStartObject :: MonadIO m => TextSelection -> Ptr Object -> m ()
- getTextSelectionStartOffset :: MonadIO m => TextSelection -> m Int32
- setTextSelectionStartOffset :: MonadIO m => TextSelection -> Int32 -> m ()

# Exported types

newtype TextSelection Source #

Memory-managed wrapper type.

Constructors

TextSelection (ManagedPtr TextSelection) |

#### Instances

Instances details

Eq TextSelection Source # |
Instance details Defined in GI.Atk.Structs.TextSelection Methods (==) :: TextSelection -> TextSelection -> Bool Source # (/=) :: TextSelection -> TextSelection -> Bool Source #
BoxedPtr TextSelection Source # |
Instance details Defined in GI.Atk.Structs.TextSelection Methods boxedPtrCopy :: TextSelection -> IO TextSelection Source # boxedPtrFree :: TextSelection -> IO () Source #
CallocPtr TextSelection Source # |
Instance details Defined in GI.Atk.Structs.TextSelection Methods boxedPtrCalloc :: IO (Ptr TextSelection) Source #
ManagedPtrNewtype TextSelection Source # |
Instance details Defined in GI.Atk.Structs.TextSelection Methods toManagedPtr :: TextSelection -> ManagedPtr TextSelection Source #
tag ~ 'AttrSet => Constructible TextSelection tag Source # |
Instance details Defined in GI.Atk.Structs.TextSelection Methods new :: MonadIO m => (ManagedPtr TextSelection -> TextSelection) -> [AttrOp TextSelection tag] -> m TextSelection Source #

newZeroTextSelection :: MonadIO m => m TextSelection Source #

Construct a `TextSelection` struct initialized to zero.

# Methods

# Properties

## endObject

the AtkText containing the end of the selection.

clearTextSelectionEndObject :: MonadIO m => TextSelection -> m () Source #

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

    clear #endObject

getTextSelectionEndObject :: MonadIO m => TextSelection -> m (Maybe Object) Source #

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

    get textSelection #endObject

setTextSelectionEndObject :: MonadIO m => TextSelection -> Ptr Object -> m () Source #

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

    set textSelection [ #endObject := value ]

## endOffset

the text offset of the end of the selection within `endObject`.

getTextSelectionEndOffset :: MonadIO m => TextSelection -> m Int32 Source #

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

    get textSelection #endOffset

setTextSelectionEndOffset :: MonadIO m => TextSelection -> Int32 -> m () Source #

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

    set textSelection [ #endOffset := value ]

## startIsActive

a gboolean indicating whether the start of the selection is the active point.

getTextSelectionStartIsActive :: MonadIO m => TextSelection -> m Bool Source #

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

    get textSelection #startIsActive

setTextSelectionStartIsActive :: MonadIO m => TextSelection -> Bool -> m () Source #

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

    set textSelection [ #startIsActive := value ]

## startObject

the AtkText containing the start of the selection.

clearTextSelectionStartObject :: MonadIO m => TextSelection -> m () Source #

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

    clear #startObject

getTextSelectionStartObject :: MonadIO m => TextSelection -> m (Maybe Object) Source #

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

    get textSelection #startObject

setTextSelectionStartObject :: MonadIO m => TextSelection -> Ptr Object -> m () Source #

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

    set textSelection [ #startObject := value ]

## startOffset

the text offset of the beginning of the selection within `startObject`.

getTextSelectionStartOffset :: MonadIO m => TextSelection -> m Int32 Source #

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

    get textSelection #startOffset

setTextSelectionStartOffset :: MonadIO m => TextSelection -> Int32 -> m () Source #

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

    set textSelection [ #startOffset := value ]