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.TextView

Contents

- Exported types
- Methods
  - addChildAtAnchor
  - addOverlay
  - backwardDisplayLine
  - backwardDisplayLineStart
  - bufferToWindowCoords
  - forwardDisplayLine
  - forwardDisplayLineEnd
  - getAcceptsTab
  - getBottomMargin
  - getBuffer
  - getCursorLocations
  - getCursorVisible
  - getEditable
  - getExtraMenu
  - getGutter
  - getIndent
  - getInputHints
  - getInputPurpose
  - getIterAtLocation
  - getIterAtPosition
  - getIterLocation
  - getJustification
  - getLeftMargin
  - getLineAtY
  - getLineYrange
  - getLtrContext
  - getMonospace
  - getOverwrite
  - getPixelsAboveLines
  - getPixelsBelowLines
  - getPixelsInsideWrap
  - getRightMargin
  - getRtlContext
  - getTabs
  - getTopMargin
  - getVisibleOffset
  - getVisibleRect
  - getWrapMode
  - imContextFilterKeypress
  - moveMarkOnscreen
  - moveOverlay
  - moveVisually
  - new
  - newWithBuffer
  - placeCursorOnscreen
  - remove
  - resetCursorBlink
  - resetImContext
  - scrollMarkOnscreen
  - scrollToIter
  - scrollToMark
  - setAcceptsTab
  - setBottomMargin
  - setBuffer
  - setCursorVisible
  - setEditable
  - setExtraMenu
  - setGutter
  - setIndent
  - setInputHints
  - setInputPurpose
  - setJustification
  - setLeftMargin
  - setMonospace
  - setOverwrite
  - setPixelsAboveLines
  - setPixelsBelowLines
  - setPixelsInsideWrap
  - setRightMargin
  - setTabs
  - setTopMargin
  - setWrapMode
  - startsDisplayLine
  - windowToBufferCoords
- Properties
  - acceptsTab
  - bottomMargin
  - buffer
  - cursorVisible
  - editable
  - extraMenu
  - imModule
  - indent
  - inputHints
  - inputPurpose
  - justification
  - leftMargin
  - monospace
  - overwrite
  - pixelsAboveLines
  - pixelsBelowLines
  - pixelsInsideWrap
  - rightMargin
  - tabs
  - topMargin
  - wrapMode
- Signals
  - backspace
  - copyClipboard
  - cutClipboard
  - deleteFromCursor
  - extendSelection
  - insertAtCursor
  - insertEmoji
  - moveCursor
  - moveViewport
  - pasteClipboard
  - preeditChanged
  - selectAll
  - setAnchor
  - toggleCursorVisible
  - toggleOverwrite

Description

Displays the contents of a `TextBuffer`.

<picture> <source srcset="multiline-text-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An example GtkTextView" src="multiline-text.png"> </picture>

You may wish to begin by reading the conceptual overview, which gives an overview of all the objects and data types related to the text widget and how they work together.

## Shortcuts and Gestures

`GtkTextView` supports the following keyboard shortcuts:

- <kbd>Shift</kbd>+<kbd>F10</kbd> or <kbd>Menu</kbd> opens the context menu.
- <kbd>Ctrl</kbd>+<kbd>Z</kbd> undoes the last modification.
- <kbd>Ctrl</kbd>+<kbd>Y</kbd> or <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Z</kbd> redoes the last undone modification.
- <kbd>Clear</kbd> clears the content.

Additionally, the following signals have default keybindings:

- TextView::backspace
- TextView::copyClipboard
- TextView::cutClipboard
- TextView::deleteFromCursor
- TextView::insertEmoji
- TextView::moveCursor
- TextView::pasteClipboard
- TextView::selectAll
- TextView::toggleCursorVisible
- TextView::toggleOverwrite

## Actions

`GtkTextView` defines a set of built-in actions:

- `clipboard.copy` copies the contents to the clipboard.
- `clipboard.cut` copies the contents to the clipboard and deletes it from the widget.
- `clipboard.paste` inserts the contents of the clipboard into the widget.
- `menu.popup` opens the context menu.
- `misc.insert-emoji` opens the Emoji chooser.
- `selection.delete` deletes the current selection.
- `selection.select-all` selects all of the widgets content.
- `text.redo` redoes the last change to the contents.
- `text.undo` undoes the last change to the contents.
- `text.clear` clears the content.

## CSS nodes

    textview.view
    ├── border.top
    ├── border.left
    ├── text
    │   ├── [preedit[.whole][.selection][.prediction][.prefix/.suffix][.spelling-error][.compose-error]]
    │   ╰── [selection]
    ├── border.right
    ├── border.bottom
    ╰── [window.popup]

`GtkTextView` has a main css node with name textview and style class .view, and subnodes for each of the border windows, and the main text area, with names border and text, respectively. The border nodes each get one of the style classes .left, .right, .top or .bottom.

A node representing the selection will appear below the text node.

If a context menu is opened, the window node will appear as a subnode of the main node.

If using an input method with a pre-edit buffer, this string will be styled with a `preedit` subnode of the `text` node. the different style classes express the possible roles of a piece of text in the pre-edit buffer:

- `.whole` denotes the parts of the pre-edit buffer without a special role
- `.selection`, `.prefix` and `.suffix` style classes will be used to highlight the specific portions of the pre-edit buffer being edited and its surroundings
- `.prediction` will be used for parts of the pre-edit buffer not typed by the user (e.g. autocompletion)
- `.spelling-error` and `.compose-error` will be respectively used to indicate errors in spelling or character composition (e.g. non-existent transliterations).

## Accessibility

`GtkTextView` uses the `AccessibleRoleTextBox` role.

Synopsis

- newtype TextView = TextView (ManagedPtr TextView)
- class (GObject o, IsDescendantOf TextView o) => IsTextView o
- toTextView :: (MonadIO m, IsTextView o) => o -> m TextView
- textViewAddChildAtAnchor :: (HasCallStack, MonadIO m, IsTextView a, IsWidget b, IsTextChildAnchor c) => a -> b -> c -> m ()
- textViewAddOverlay :: (HasCallStack, MonadIO m, IsTextView a, IsWidget b) => a -> b -> Int32 -> Int32 -> m ()
- textViewBackwardDisplayLine :: (HasCallStack, MonadIO m, IsTextView a) => a -> TextIter -> m Bool
- textViewBackwardDisplayLineStart :: (HasCallStack, MonadIO m, IsTextView a) => a -> TextIter -> m Bool
- textViewBufferToWindowCoords :: (HasCallStack, MonadIO m, IsTextView a) => a -> TextWindowType -> Int32 -> Int32 -> m (Int32, Int32)
- textViewForwardDisplayLine :: (HasCallStack, MonadIO m, IsTextView a) => a -> TextIter -> m Bool
- textViewForwardDisplayLineEnd :: (HasCallStack, MonadIO m, IsTextView a) => a -> TextIter -> m Bool
- textViewGetAcceptsTab :: (HasCallStack, MonadIO m, IsTextView a) => a -> m Bool
- textViewGetBottomMargin :: (HasCallStack, MonadIO m, IsTextView a) => a -> m Int32
- textViewGetBuffer :: (HasCallStack, MonadIO m, IsTextView a) => a -> m TextBuffer
- textViewGetCursorLocations :: (HasCallStack, MonadIO m, IsTextView a) => a -> Maybe TextIter -> m (Rectangle, Rectangle)
- textViewGetCursorVisible :: (HasCallStack, MonadIO m, IsTextView a) => a -> m Bool
- textViewGetEditable :: (HasCallStack, MonadIO m, IsTextView a) => a -> m Bool
- textViewGetExtraMenu :: (HasCallStack, MonadIO m, IsTextView a) => a -> m (Maybe MenuModel)
- textViewGetGutter :: (HasCallStack, MonadIO m, IsTextView a) => a -> TextWindowType -> m (Maybe Widget)
- textViewGetIndent :: (HasCallStack, MonadIO m, IsTextView a) => a -> m Int32
- textViewGetInputHints :: (HasCallStack, MonadIO m, IsTextView a) => a -> m [InputHints]
- textViewGetInputPurpose :: (HasCallStack, MonadIO m, IsTextView a) => a -> m InputPurpose
- textViewGetIterAtLocation :: (HasCallStack, MonadIO m, IsTextView a) => a -> Int32 -> Int32 -> m (Bool, TextIter)
- textViewGetIterAtPosition :: (HasCallStack, MonadIO m, IsTextView a) => a -> Int32 -> Int32 -> m (Bool, TextIter, Int32)
- textViewGetIterLocation :: (HasCallStack, MonadIO m, IsTextView a) => a -> TextIter -> m Rectangle
- textViewGetJustification :: (HasCallStack, MonadIO m, IsTextView a) => a -> m Justification
- textViewGetLeftMargin :: (HasCallStack, MonadIO m, IsTextView a) => a -> m Int32
- textViewGetLineAtY :: (HasCallStack, MonadIO m, IsTextView a) => a -> Int32 -> m (TextIter, Int32)
- textViewGetLineYrange :: (HasCallStack, MonadIO m, IsTextView a) => a -> TextIter -> m (Int32, Int32)
- textViewGetLtrContext :: (HasCallStack, MonadIO m, IsTextView a) => a -> m Context
- textViewGetMonospace :: (HasCallStack, MonadIO m, IsTextView a) => a -> m Bool
- textViewGetOverwrite :: (HasCallStack, MonadIO m, IsTextView a) => a -> m Bool
- textViewGetPixelsAboveLines :: (HasCallStack, MonadIO m, IsTextView a) => a -> m Int32
- textViewGetPixelsBelowLines :: (HasCallStack, MonadIO m, IsTextView a) => a -> m Int32
- textViewGetPixelsInsideWrap :: (HasCallStack, MonadIO m, IsTextView a) => a -> m Int32
- textViewGetRightMargin :: (HasCallStack, MonadIO m, IsTextView a) => a -> m Int32
- textViewGetRtlContext :: (HasCallStack, MonadIO m, IsTextView a) => a -> m Context
- textViewGetTabs :: (HasCallStack, MonadIO m, IsTextView a) => a -> m (Maybe TabArray)
- textViewGetTopMargin :: (HasCallStack, MonadIO m, IsTextView a) => a -> m Int32
- textViewGetVisibleOffset :: (HasCallStack, MonadIO m, IsTextView a) => a -> m (Double, Double)
- textViewGetVisibleRect :: (HasCallStack, MonadIO m, IsTextView a) => a -> m Rectangle
- textViewGetWrapMode :: (HasCallStack, MonadIO m, IsTextView a) => a -> m WrapMode
- textViewImContextFilterKeypress :: (HasCallStack, MonadIO m, IsTextView a, IsEvent b) => a -> b -> m Bool
- textViewMoveMarkOnscreen :: (HasCallStack, MonadIO m, IsTextView a, IsTextMark b) => a -> b -> m Bool
- textViewMoveOverlay :: (HasCallStack, MonadIO m, IsTextView a, IsWidget b) => a -> b -> Int32 -> Int32 -> m ()
- textViewMoveVisually :: (HasCallStack, MonadIO m, IsTextView a) => a -> TextIter -> Int32 -> m Bool
- textViewNew :: (HasCallStack, MonadIO m) => m TextView
- textViewNewWithBuffer :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m TextView
- textViewPlaceCursorOnscreen :: (HasCallStack, MonadIO m, IsTextView a) => a -> m Bool
- textViewRemove :: (HasCallStack, MonadIO m, IsTextView a, IsWidget b) => a -> b -> m ()
- textViewResetCursorBlink :: (HasCallStack, MonadIO m, IsTextView a) => a -> m ()
- textViewResetImContext :: (HasCallStack, MonadIO m, IsTextView a) => a -> m ()
- textViewScrollMarkOnscreen :: (HasCallStack, MonadIO m, IsTextView a, IsTextMark b) => a -> b -> m ()
- textViewScrollToIter :: (HasCallStack, MonadIO m, IsTextView a) => a -> TextIter -> Double -> Bool -> Double -> Double -> m Bool
- textViewScrollToMark :: (HasCallStack, MonadIO m, IsTextView a, IsTextMark b) => a -> b -> Double -> Bool -> Double -> Double -> m ()
- textViewSetAcceptsTab :: (HasCallStack, MonadIO m, IsTextView a) => a -> Bool -> m ()
- textViewSetBottomMargin :: (HasCallStack, MonadIO m, IsTextView a) => a -> Int32 -> m ()
- textViewSetBuffer :: (HasCallStack, MonadIO m, IsTextView a, IsTextBuffer b) => a -> Maybe b -> m ()
- textViewSetCursorVisible :: (HasCallStack, MonadIO m, IsTextView a) => a -> Bool -> m ()
- textViewSetEditable :: (HasCallStack, MonadIO m, IsTextView a) => a -> Bool -> m ()
- textViewSetExtraMenu :: (HasCallStack, MonadIO m, IsTextView a, IsMenuModel b) => a -> Maybe b -> m ()
- textViewSetGutter :: (HasCallStack, MonadIO m, IsTextView a, IsWidget b) => a -> TextWindowType -> Maybe b -> m ()
- textViewSetIndent :: (HasCallStack, MonadIO m, IsTextView a) => a -> Int32 -> m ()
- textViewSetInputHints :: (HasCallStack, MonadIO m, IsTextView a) => a -> [InputHints] -> m ()
- textViewSetInputPurpose :: (HasCallStack, MonadIO m, IsTextView a) => a -> InputPurpose -> m ()
- textViewSetJustification :: (HasCallStack, MonadIO m, IsTextView a) => a -> Justification -> m ()
- textViewSetLeftMargin :: (HasCallStack, MonadIO m, IsTextView a) => a -> Int32 -> m ()
- textViewSetMonospace :: (HasCallStack, MonadIO m, IsTextView a) => a -> Bool -> m ()
- textViewSetOverwrite :: (HasCallStack, MonadIO m, IsTextView a) => a -> Bool -> m ()
- textViewSetPixelsAboveLines :: (HasCallStack, MonadIO m, IsTextView a) => a -> Int32 -> m ()
- textViewSetPixelsBelowLines :: (HasCallStack, MonadIO m, IsTextView a) => a -> Int32 -> m ()
- textViewSetPixelsInsideWrap :: (HasCallStack, MonadIO m, IsTextView a) => a -> Int32 -> m ()
- textViewSetRightMargin :: (HasCallStack, MonadIO m, IsTextView a) => a -> Int32 -> m ()
- textViewSetTabs :: (HasCallStack, MonadIO m, IsTextView a) => a -> TabArray -> m ()
- textViewSetTopMargin :: (HasCallStack, MonadIO m, IsTextView a) => a -> Int32 -> m ()
- textViewSetWrapMode :: (HasCallStack, MonadIO m, IsTextView a) => a -> WrapMode -> m ()
- textViewStartsDisplayLine :: (HasCallStack, MonadIO m, IsTextView a) => a -> TextIter -> m Bool
- textViewWindowToBufferCoords :: (HasCallStack, MonadIO m, IsTextView a) => a -> TextWindowType -> Int32 -> Int32 -> m (Int32, Int32)
- constructTextViewAcceptsTab :: (IsTextView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getTextViewAcceptsTab :: (MonadIO m, IsTextView o) => o -> m Bool
- setTextViewAcceptsTab :: (MonadIO m, IsTextView o) => o -> Bool -> m ()
- constructTextViewBottomMargin :: (IsTextView o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getTextViewBottomMargin :: (MonadIO m, IsTextView o) => o -> m Int32
- setTextViewBottomMargin :: (MonadIO m, IsTextView o) => o -> Int32 -> m ()
- clearTextViewBuffer :: (MonadIO m, IsTextView o) => o -> m ()
- constructTextViewBuffer :: (IsTextView o, MonadIO m, IsTextBuffer a) => a -> m (GValueConstruct o)
- getTextViewBuffer :: (MonadIO m, IsTextView o) => o -> m TextBuffer
- setTextViewBuffer :: (MonadIO m, IsTextView o, IsTextBuffer a) => o -> a -> m ()
- constructTextViewCursorVisible :: (IsTextView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getTextViewCursorVisible :: (MonadIO m, IsTextView o) => o -> m Bool
- setTextViewCursorVisible :: (MonadIO m, IsTextView o) => o -> Bool -> m ()
- constructTextViewEditable :: (IsTextView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getTextViewEditable :: (MonadIO m, IsTextView o) => o -> m Bool
- setTextViewEditable :: (MonadIO m, IsTextView o) => o -> Bool -> m ()
- clearTextViewExtraMenu :: (MonadIO m, IsTextView o) => o -> m ()
- constructTextViewExtraMenu :: (IsTextView o, MonadIO m, IsMenuModel a) => a -> m (GValueConstruct o)
- getTextViewExtraMenu :: (MonadIO m, IsTextView o) => o -> m (Maybe MenuModel)
- setTextViewExtraMenu :: (MonadIO m, IsTextView o, IsMenuModel a) => o -> a -> m ()
- clearTextViewImModule :: (MonadIO m, IsTextView o) => o -> m ()
- constructTextViewImModule :: (IsTextView o, MonadIO m) => Text -> m (GValueConstruct o)
- getTextViewImModule :: (MonadIO m, IsTextView o) => o -> m (Maybe Text)
- setTextViewImModule :: (MonadIO m, IsTextView o) => o -> Text -> m ()
- constructTextViewIndent :: (IsTextView o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getTextViewIndent :: (MonadIO m, IsTextView o) => o -> m Int32
- setTextViewIndent :: (MonadIO m, IsTextView o) => o -> Int32 -> m ()
- constructTextViewInputHints :: (IsTextView o, MonadIO m) => [InputHints] -> m (GValueConstruct o)
- getTextViewInputHints :: (MonadIO m, IsTextView o) => o -> m [InputHints]
- setTextViewInputHints :: (MonadIO m, IsTextView o) => o -> [InputHints] -> m ()
- constructTextViewInputPurpose :: (IsTextView o, MonadIO m) => InputPurpose -> m (GValueConstruct o)
- getTextViewInputPurpose :: (MonadIO m, IsTextView o) => o -> m InputPurpose
- setTextViewInputPurpose :: (MonadIO m, IsTextView o) => o -> InputPurpose -> m ()
- constructTextViewJustification :: (IsTextView o, MonadIO m) => Justification -> m (GValueConstruct o)
- getTextViewJustification :: (MonadIO m, IsTextView o) => o -> m Justification
- setTextViewJustification :: (MonadIO m, IsTextView o) => o -> Justification -> m ()
- constructTextViewLeftMargin :: (IsTextView o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getTextViewLeftMargin :: (MonadIO m, IsTextView o) => o -> m Int32
- setTextViewLeftMargin :: (MonadIO m, IsTextView o) => o -> Int32 -> m ()
- constructTextViewMonospace :: (IsTextView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getTextViewMonospace :: (MonadIO m, IsTextView o) => o -> m Bool
- setTextViewMonospace :: (MonadIO m, IsTextView o) => o -> Bool -> m ()
- constructTextViewOverwrite :: (IsTextView o, MonadIO m) => Bool -> m (GValueConstruct o)
- getTextViewOverwrite :: (MonadIO m, IsTextView o) => o -> m Bool
- setTextViewOverwrite :: (MonadIO m, IsTextView o) => o -> Bool -> m ()
- constructTextViewPixelsAboveLines :: (IsTextView o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getTextViewPixelsAboveLines :: (MonadIO m, IsTextView o) => o -> m Int32
- setTextViewPixelsAboveLines :: (MonadIO m, IsTextView o) => o -> Int32 -> m ()
- constructTextViewPixelsBelowLines :: (IsTextView o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getTextViewPixelsBelowLines :: (MonadIO m, IsTextView o) => o -> m Int32
- setTextViewPixelsBelowLines :: (MonadIO m, IsTextView o) => o -> Int32 -> m ()
- constructTextViewPixelsInsideWrap :: (IsTextView o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getTextViewPixelsInsideWrap :: (MonadIO m, IsTextView o) => o -> m Int32
- setTextViewPixelsInsideWrap :: (MonadIO m, IsTextView o) => o -> Int32 -> m ()
- constructTextViewRightMargin :: (IsTextView o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getTextViewRightMargin :: (MonadIO m, IsTextView o) => o -> m Int32
- setTextViewRightMargin :: (MonadIO m, IsTextView o) => o -> Int32 -> m ()
- constructTextViewTabs :: (IsTextView o, MonadIO m) => TabArray -> m (GValueConstruct o)
- getTextViewTabs :: (MonadIO m, IsTextView o) => o -> m (Maybe TabArray)
- setTextViewTabs :: (MonadIO m, IsTextView o) => o -> TabArray -> m ()
- constructTextViewTopMargin :: (IsTextView o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getTextViewTopMargin :: (MonadIO m, IsTextView o) => o -> m Int32
- setTextViewTopMargin :: (MonadIO m, IsTextView o) => o -> Int32 -> m ()
- constructTextViewWrapMode :: (IsTextView o, MonadIO m) => WrapMode -> m (GValueConstruct o)
- getTextViewWrapMode :: (MonadIO m, IsTextView o) => o -> m WrapMode
- setTextViewWrapMode :: (MonadIO m, IsTextView o) => o -> WrapMode -> m ()
- type TextViewBackspaceCallback = IO ()
- afterTextViewBackspace :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewBackspaceCallback) -> m SignalHandlerId
- onTextViewBackspace :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewBackspaceCallback) -> m SignalHandlerId
- type TextViewCopyClipboardCallback = IO ()
- afterTextViewCopyClipboard :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewCopyClipboardCallback) -> m SignalHandlerId
- onTextViewCopyClipboard :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewCopyClipboardCallback) -> m SignalHandlerId
- type TextViewCutClipboardCallback = IO ()
- afterTextViewCutClipboard :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewCutClipboardCallback) -> m SignalHandlerId
- onTextViewCutClipboard :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewCutClipboardCallback) -> m SignalHandlerId
- type TextViewDeleteFromCursorCallback = DeleteType -> Int32 -> IO ()
- afterTextViewDeleteFromCursor :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewDeleteFromCursorCallback) -> m SignalHandlerId
- onTextViewDeleteFromCursor :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewDeleteFromCursorCallback) -> m SignalHandlerId
- type TextViewExtendSelectionCallback = TextExtendSelection -> TextIter -> TextIter -> TextIter -> IO Bool
- afterTextViewExtendSelection :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewExtendSelectionCallback) -> m SignalHandlerId
- onTextViewExtendSelection :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewExtendSelectionCallback) -> m SignalHandlerId
- type TextViewInsertAtCursorCallback = Text -> IO ()
- afterTextViewInsertAtCursor :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewInsertAtCursorCallback) -> m SignalHandlerId
- onTextViewInsertAtCursor :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewInsertAtCursorCallback) -> m SignalHandlerId
- type TextViewInsertEmojiCallback = IO ()
- afterTextViewInsertEmoji :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewInsertEmojiCallback) -> m SignalHandlerId
- onTextViewInsertEmoji :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewInsertEmojiCallback) -> m SignalHandlerId
- type TextViewMoveCursorCallback = MovementStep -> Int32 -> Bool -> IO ()
- afterTextViewMoveCursor :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewMoveCursorCallback) -> m SignalHandlerId
- onTextViewMoveCursor :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewMoveCursorCallback) -> m SignalHandlerId
- type TextViewMoveViewportCallback = ScrollStep -> Int32 -> IO ()
- afterTextViewMoveViewport :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewMoveViewportCallback) -> m SignalHandlerId
- onTextViewMoveViewport :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewMoveViewportCallback) -> m SignalHandlerId
- type TextViewPasteClipboardCallback = IO ()
- afterTextViewPasteClipboard :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewPasteClipboardCallback) -> m SignalHandlerId
- onTextViewPasteClipboard :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewPasteClipboardCallback) -> m SignalHandlerId
- type TextViewPreeditChangedCallback = Text -> IO ()
- afterTextViewPreeditChanged :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewPreeditChangedCallback) -> m SignalHandlerId
- onTextViewPreeditChanged :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewPreeditChangedCallback) -> m SignalHandlerId
- type TextViewSelectAllCallback = Bool -> IO ()
- afterTextViewSelectAll :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewSelectAllCallback) -> m SignalHandlerId
- onTextViewSelectAll :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewSelectAllCallback) -> m SignalHandlerId
- type TextViewSetAnchorCallback = IO ()
- afterTextViewSetAnchor :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewSetAnchorCallback) -> m SignalHandlerId
- onTextViewSetAnchor :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewSetAnchorCallback) -> m SignalHandlerId
- type TextViewToggleCursorVisibleCallback = IO ()
- afterTextViewToggleCursorVisible :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewToggleCursorVisibleCallback) -> m SignalHandlerId
- onTextViewToggleCursorVisible :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewToggleCursorVisibleCallback) -> m SignalHandlerId
- type TextViewToggleOverwriteCallback = IO ()
- afterTextViewToggleOverwrite :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewToggleOverwriteCallback) -> m SignalHandlerId
- onTextViewToggleOverwrite :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewToggleOverwriteCallback) -> m SignalHandlerId

# Exported types

newtype TextView Source #

Memory-managed wrapper type.

Constructors

TextView (ManagedPtr TextView) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf TextView o) => IsTextView o Source #

Type class for types which can be safely cast to `TextView`, for instance with `toTextView`.

#### Instances

Instances details

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

toTextView :: (MonadIO m, IsTextView o) => o -> m TextView Source #

Cast to `TextView`, 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

actionSetEnabled, activate, activateAction, activateDefault, addChildAtAnchor, addController, addCssClass, addMnemonicLabel, addOverlay, addTickCallback, allocate, announce, backwardDisplayLine, backwardDisplayLineStart, bindProperty, bindPropertyFull, bufferToWindowCoords, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, forwardDisplayLine, forwardDisplayLineEnd, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, imContextFilterKeypress, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, moveMarkOnscreen, moveOverlay, moveVisually, notify, notifyByPspec, observeChildren, observeControllers, pick, placeCursorOnscreen, queueAllocate, queueDraw, queueResize, realize, ref, refSink, remove, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetCursorBlink, resetImContext, resetProperty, resetRelation, resetState, runDispose, scrollMarkOnscreen, scrollToIter, scrollToMark, shouldLayout, show, sizeAllocate, snapshotChild, startsDisplayLine, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateCaretPosition, updateContents, updateNextAccessibleSibling, updatePlatformState, updateProperty, updateRelation, updateSelectionBound, updateState, watchClosure, windowToBufferCoords.

#### Getters

getAcceptsTab, getAccessibleId, getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBaseline, getBorder, getBottomMargin, getBounds, getBuffer, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getCursorLocations, getCursorVisible, getData, getDirection, getDisplay, getEditable, getExtraMenu, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getGutter, getHadjustment, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getHscrollPolicy, getIndent, getInputHints, getInputPurpose, getIterAtLocation, getIterAtPosition, getIterLocation, getJustification, getLastChild, getLayoutManager, getLeftMargin, getLimitEvents, getLineAtY, getLineYrange, getLtrContext, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getMonospace, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getOverwrite, getPangoContext, getParent, getPixelsAboveLines, getPixelsBelowLines, getPixelsInsideWrap, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRightMargin, getRoot, getRtlContext, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTabs, getTemplateChild, getTooltipMarkup, getTooltipText, getTopMargin, getVadjustment, getValign, getVexpand, getVexpandSet, getVisible, getVisibleOffset, getVisibleRect, getVscrollPolicy, getWidth, getWrapMode.

#### Setters

setAcceptsTab, setAccessibleParent, setBottomMargin, setBuffer, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setCursorVisible, setData, setDataFull, setDirection, setEditable, setExtraMenu, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setGutter, setHadjustment, setHalign, setHasTooltip, setHexpand, setHexpandSet, setHscrollPolicy, setIndent, setInputHints, setInputPurpose, setJustification, setLayoutManager, setLeftMargin, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setMonospace, setName, setOpacity, setOverflow, setOverwrite, setParent, setPixelsAboveLines, setPixelsBelowLines, setPixelsInsideWrap, setProperty, setReceivesDefault, setRightMargin, setSensitive, setSizeRequest, setStateFlags, setTabs, setTooltipMarkup, setTooltipText, setTopMargin, setVadjustment, setValign, setVexpand, setVexpandSet, setVisible, setVscrollPolicy, setWrapMode.

## addChildAtAnchor

textViewAddChildAtAnchor Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a, IsWidget b, IsTextChildAnchor c) |
=> a | `textView`: a `GtkTextView`
-> b | `child`: a `GtkWidget`
-> c | `anchor`: a `GtkTextChildAnchor` in the `GtkTextBuffer` for `textView`
-> m () |

Adds a child widget in the text buffer, at the given `anchor`.

## addOverlay

textViewAddOverlay Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a, IsWidget b) |
=> a | `textView`: a `GtkTextView`
-> b | `child`: a `GtkWidget`
-> Int32 | `xpos`: X position of child in window coordinates
-> Int32 | `ypos`: Y position of child in window coordinates
-> m () |

Adds `child` at a fixed coordinate in the `GtkTextView`'s text window.

The `xpos` and `ypos` must be in buffer coordinates (see `textViewGetIterLocation` to convert to buffer coordinates).

`child` will scroll with the text view.

If instead you want a widget that will not move with the `GtkTextView` contents see `GtkOverlay`.

## backwardDisplayLine

textViewBackwardDisplayLine Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> TextIter | `iter`: a `GtkTextIter`
-> m Bool | Returns: `True` if `iter` was moved and is not on the end iterator

Moves the given `iter` backward by one display (wrapped) line.

A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view’s width; paragraphs are the same in all views, since they depend on the contents of the `GtkTextBuffer`.

## backwardDisplayLineStart

textViewBackwardDisplayLineStart Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> TextIter | `iter`: a `GtkTextIter`
-> m Bool | Returns: `True` if `iter` was moved and is not on the end iterator

Moves the given `iter` backward to the next display line start.

A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view’s width; paragraphs are the same in all views, since they depend on the contents of the `GtkTextBuffer`.

## bufferToWindowCoords

textViewBufferToWindowCoords Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> TextWindowType | `win`: a `GtkTextWindowType`
-> Int32 | `bufferX`: buffer x coordinate
-> Int32 | `bufferY`: buffer y coordinate
-> m (Int32, Int32) |

Converts buffer coordinates to window coordinates.

## forwardDisplayLine

textViewForwardDisplayLine Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> TextIter | `iter`: a `GtkTextIter`
-> m Bool | Returns: `True` if `iter` was moved and is not on the end iterator

Moves the given `iter` forward by one display (wrapped) line.

A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view’s width; paragraphs are the same in all views, since they depend on the contents of the `GtkTextBuffer`.

## forwardDisplayLineEnd

textViewForwardDisplayLineEnd Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> TextIter | `iter`: a `GtkTextIter`
-> m Bool | Returns: `True` if `iter` was moved and is not on the end iterator

Moves the given `iter` forward to the next display line end.

A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view’s width; paragraphs are the same in all views, since they depend on the contents of the `GtkTextBuffer`.

## getAcceptsTab

textViewGetAcceptsTab Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: A `GtkTextView`
-> m Bool | Returns: `True` if pressing the Tab key inserts a tab character, `False` if pressing the Tab key moves the keyboard focus.

Returns whether pressing the <kbd>Tab</kbd> key inserts a tab characters.

See `textViewSetAcceptsTab`.

## getBottomMargin

textViewGetBottomMargin Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m Int32 | Returns: bottom margin in pixels

Gets the bottom margin for text in the `textView`.

## getBuffer

textViewGetBuffer Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m TextBuffer | Returns: a `GtkTextBuffer`

Returns the `GtkTextBuffer` being displayed by this text view.

The reference count on the buffer is not incremented; the caller of this function won’t own a new reference.

## getCursorLocations

textViewGetCursorLocations Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> Maybe TextIter | `iter`: a `GtkTextIter`
-> m (Rectangle, Rectangle) |

Determine the positions of the strong and weak cursors if the insertion point is at `iter`.

The position of each cursor is stored as a zero-width rectangle. The strong cursor location is the location where characters of the directionality equal to the base direction of the paragraph are inserted. The weak cursor location is the location where characters of the directionality opposite to the base direction of the paragraph are inserted.

If `iter` is `Nothing`, the actual cursor position is used.

Note that if `iter` happens to be the actual cursor position, and there is currently an IM preedit sequence being entered, the returned locations will be adjusted to account for the preedit cursor’s offset within the preedit sequence.

The rectangle position is in buffer coordinates; use `textViewBufferToWindowCoords` to convert these coordinates to coordinates for one of the windows in the text view.

## getCursorVisible

textViewGetCursorVisible Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m Bool | Returns: whether the insertion mark is visible

Find out whether the cursor should be displayed.

## getEditable

textViewGetEditable Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m Bool | Returns: whether text is editable by default

Returns the default editability of the `GtkTextView`.

Tags in the buffer may override this setting for some ranges of text.

## getExtraMenu

textViewGetExtraMenu Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m (Maybe MenuModel) | Returns: the menu model

Gets the menu model that gets added to the context menu or `Nothing` if none has been set.

## getGutter

textViewGetGutter Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> TextWindowType | `win`: a `GtkTextWindowType`
-> m (Maybe Widget) | Returns: a `GtkWidget`

Gets a `GtkWidget` that has previously been set as gutter.

See `textViewSetGutter`.

`win` must be one of `TextWindowTypeLeft`, `TextWindowTypeRight`, `TextWindowTypeTop`, or `TextWindowTypeBottom`.

## getIndent

textViewGetIndent Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m Int32 | Returns: number of pixels of indentation

Gets the default indentation of paragraphs in `textView`.

Tags in the view’s buffer may override the default. The indentation may be negative.

## getInputHints

textViewGetInputHints Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m [InputHints] | Returns: the input hints

Gets the `input-hints` of the `GtkTextView`.

## getInputPurpose

textViewGetInputPurpose Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m InputPurpose | Returns: the input purpose

Gets the `input-purpose` of the `GtkTextView`.

## getIterAtLocation

textViewGetIterAtLocation Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> Int32 | `x`: x position, in buffer coordinates
-> Int32 | `y`: y position, in buffer coordinates
-> m (Bool, TextIter) | Returns: `True` if the position is over text

Retrieves the iterator at buffer coordinates `x` and `y`.

Buffer coordinates are coordinates for the entire buffer, not just the currently-displayed portion. If you have coordinates from an event, you have to convert those to buffer coordinates with `textViewWindowToBufferCoords`.

## getIterAtPosition

textViewGetIterAtPosition Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> Int32 | `x`: x position, in buffer coordinates
-> Int32 | `y`: y position, in buffer coordinates
-> m (Bool, TextIter, Int32) | Returns: `True` if the position is over text

Retrieves the iterator pointing to the character at buffer coordinates `x` and `y`.

Buffer coordinates are coordinates for the entire buffer, not just the currently-displayed portion. If you have coordinates from an event, you have to convert those to buffer coordinates with `textViewWindowToBufferCoords`.

Note that this is different from `textViewGetIterAtLocation`, which returns cursor locations, i.e. positions between characters.

## getIterLocation

textViewGetIterLocation Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> TextIter | `iter`: a `GtkTextIter`
-> m Rectangle |

Gets a rectangle which roughly contains the character at `iter`.

The rectangle position is in buffer coordinates; use `textViewBufferToWindowCoords` to convert these coordinates to coordinates for one of the windows in the text view.

## getJustification

textViewGetJustification Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m Justification | Returns: default justification

Gets the default justification of paragraphs in `textView`.

Tags in the buffer may override the default.

## getLeftMargin

textViewGetLeftMargin Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m Int32 | Returns: left margin in pixels

Gets the default left margin size of paragraphs in the `textView`.

Tags in the buffer may override the default.

## getLineAtY

textViewGetLineAtY Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> Int32 | `y`: a y coordinate
-> m (TextIter, Int32) |

Gets the `GtkTextIter` at the start of the line containing the coordinate `y`.

`y` is in buffer coordinates, convert from window coordinates with `textViewWindowToBufferCoords`. If non-`Nothing`, `lineTop` will be filled with the coordinate of the top edge of the line.

## getLineYrange

textViewGetLineYrange Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> TextIter | `iter`: a `GtkTextIter`
-> m (Int32, Int32) |

Gets the y coordinate of the top of the line containing `iter`, and the height of the line.

The coordinate is a buffer coordinate; convert to window coordinates with `textViewBufferToWindowCoords`.

## getLtrContext

textViewGetLtrContext Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m Context | Returns: a `PangoContext`

Gets the `PangoContext` that is used for rendering LTR directed text layouts.

The context may be replaced when CSS changes occur.

Since: 4.4

## getMonospace

textViewGetMonospace Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m Bool | Returns: `True` if monospace fonts are desired

Gets whether the `GtkTextView` uses monospace styling.

## getOverwrite

textViewGetOverwrite Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m Bool | Returns: whether `textView` is in overwrite mode or not.

Returns whether the `GtkTextView` is in overwrite mode or not.

## getPixelsAboveLines

textViewGetPixelsAboveLines Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m Int32 | Returns: default number of pixels above paragraphs

Gets the default number of pixels to put above paragraphs.

Adding this function with `textViewGetPixelsBelowLines` is equal to the line space between each paragraph.

## getPixelsBelowLines

textViewGetPixelsBelowLines Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m Int32 | Returns: default number of blank pixels below paragraphs

Gets the default number of pixels to put below paragraphs.

The line space is the sum of the value returned by this function and the value returned by `textViewGetPixelsAboveLines`.

## getPixelsInsideWrap

textViewGetPixelsInsideWrap Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m Int32 | Returns: default number of pixels of blank space between wrapped lines

Gets the default number of pixels to put between wrapped lines inside a paragraph.

## getRightMargin

textViewGetRightMargin Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m Int32 | Returns: right margin in pixels

Gets the default right margin for text in `textView`.

Tags in the buffer may override the default.

## getRtlContext

textViewGetRtlContext Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m Context | Returns: a `PangoContext`

Gets the `PangoContext` that is used for rendering RTL directed text layouts.

The context may be replaced when CSS changes occur.

Since: 4.4

## getTabs

textViewGetTabs Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m (Maybe TabArray) | Returns: copy of default tab array, or `Nothing` if standard tabs are used; must be freed with `tabArrayFree`.

Gets the default tabs for `textView`.

Tags in the buffer may override the defaults. The returned array will be `Nothing` if “standard” (8-space) tabs are used. Free the return value with `tabArrayFree`.

## getTopMargin

textViewGetTopMargin Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m Int32 | Returns: top margin in pixels

Gets the top margin for text in the `textView`.

## getVisibleOffset

textViewGetVisibleOffset Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m (Double, Double) |

Gets the X,Y offset in buffer coordinates of the top-left corner of the textview's text contents.

This allows for more-precise positioning than what is provided by `textViewGetVisibleRect` as you can discover what device pixel is being quantized for text positioning.

You might want this when making ulterior widgets align with quantized device pixels of the textview contents such as line numbers.

Since: 4.18

## getVisibleRect

textViewGetVisibleRect Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m Rectangle |

Fills `visibleRect` with the currently-visible region of the buffer, in buffer coordinates.

Convert to window coordinates with `textViewBufferToWindowCoords`.

## getWrapMode

textViewGetWrapMode Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m WrapMode | Returns: the line wrap setting

Gets the line wrapping for the view.

## imContextFilterKeypress

textViewImContextFilterKeypress Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a, IsEvent b) |
=> a | `textView`: a `GtkTextView`
-> b | `event`: the key event
-> m Bool | Returns: `True` if the input method handled the key event.

Allow the `GtkTextView` input method to internally handle key press and release events.

If this function returns `True`, then no further processing should be done for this key event. See `iMContextFilterKeypress`.

Note that you are expected to call this function from your handler when overriding key event handling. This is needed in the case when you need to insert your own key handling between the input method and the default key event handling of the `GtkTextView`.

### c code

    static gboolean
    gtk_foo_bar_key_press_event (GtkWidget *widget,
                                 GdkEvent  *event)
    {
      guint keyval;

      gdk_event_get_keyval ((GdkEvent*)event, &keyval);

      if (keyval == GDK_KEY_Return || keyval == GDK_KEY_KP_Enter)
        {
          if (gtk_text_view_im_context_filter_keypress (GTK_TEXT_VIEW (widget), event))
            return TRUE;
        }

      // Do some stuff

      return GTK_WIDGET_CLASS (gtk_foo_bar_parent_class)->key_press_event (widget, event);
    }

## moveMarkOnscreen

textViewMoveMarkOnscreen Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a, IsTextMark b) |
=> a | `textView`: a `GtkTextView`
-> b | `mark`: a `GtkTextMark`
-> m Bool | Returns: `True` if the mark moved (wasn’t already onscreen)

Moves a mark within the buffer so that it's located within the currently-visible text area.

## moveOverlay

textViewMoveOverlay Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a, IsWidget b) |
=> a | `textView`: a `GtkTextView`
-> b | `child`: a widget already added with `textViewAddOverlay`
-> Int32 | `xpos`: new X position in buffer coordinates
-> Int32 | `ypos`: new Y position in buffer coordinates
-> m () |

Updates the position of a child.

See `textViewAddOverlay`.

## moveVisually

textViewMoveVisually Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> TextIter | `iter`: a `GtkTextIter`
-> Int32 | `count`: number of characters to move (negative moves left, positive moves right)
-> m Bool | Returns: `True` if `iter` moved and is not on the end iterator

Move the iterator a given number of characters visually, treating it as the strong cursor position.

If `count` is positive, then the new strong cursor position will be `count` positions to the right of the old cursor position. If `count` is negative then the new strong cursor position will be `count` positions to the left of the old cursor position.

In the presence of bi-directional text, the correspondence between logical and visual order will depend on the direction of the current run, and there may be jumps when the cursor is moved off of the end of a run.

## new

textViewNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m TextView | Returns: a new `GtkTextView`

Creates a new `GtkTextView`.

If you don’t call `textViewSetBuffer` before using the text view, an empty default buffer will be created for you. Get the buffer with `textViewGetBuffer`. If you want to specify your own buffer, consider `textViewNewWithBuffer`.

## newWithBuffer

textViewNewWithBuffer Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextBuffer a) |
=> a | `buffer`: a `GtkTextBuffer`
-> m TextView | Returns: a new `GtkTextView`.

Creates a new `GtkTextView` widget displaying the buffer `buffer`.

One buffer can be shared among many widgets. `buffer` may be `Nothing` to create a default buffer, in which case this function is equivalent to `textViewNew`. The text view adds its own reference count to the buffer; it does not take over an existing reference.

## placeCursorOnscreen

textViewPlaceCursorOnscreen Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m Bool | Returns: `True` if the cursor had to be moved.

Moves the cursor to the currently visible region of the buffer.

## remove

textViewRemove Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a, IsWidget b) |
=> a | `textView`: a `GtkTextView`
-> b | `child`: the child to remove
-> m () |

Removes a child widget from `textView`.

## resetCursorBlink

textViewResetCursorBlink Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m () |

Ensures that the cursor is shown.

This also resets the time that it will stay blinking (or visible, in case blinking is disabled).

This function should be called in response to user input (e.g. from derived classes that override the textview's event handlers).

## resetImContext

textViewResetImContext Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> m () |

Reset the input method context of the text view if needed.

This can be necessary in the case where modifying the buffer would confuse on-going input method behavior.

## scrollMarkOnscreen

textViewScrollMarkOnscreen Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a, IsTextMark b) |
=> a | `textView`: a `GtkTextView`
-> b | `mark`: a mark in the buffer for `textView`
-> m () |

Scrolls `textView` the minimum distance such that `mark` is contained within the visible area of the widget.

## scrollToIter

textViewScrollToIter Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> TextIter | `iter`: a `GtkTextIter`
-> Double | `withinMargin`: margin as a [0.0,0.5) fraction of screen size
-> Bool | `useAlign`: whether to use alignment arguments (if `False`, just get the mark onscreen)
-> Double | `xalign`: horizontal alignment of mark within visible area
-> Double | `yalign`: vertical alignment of mark within visible area
-> m Bool | Returns: `True` if scrolling occurred

Scrolls `textView` so that `iter` is on the screen in the position indicated by `xalign` and `yalign`.

An alignment of 0.0 indicates left or top, 1.0 indicates right or bottom, 0.5 means center. If `useAlign` is `False`, the text scrolls the minimal distance to get the mark onscreen, possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size `withinMargin`.

Note that this function uses the currently-computed height of the lines in the text buffer. Line heights are computed in an idle handler; so this function may not have the desired effect if it’s called before the height computations. To avoid oddness, consider using `textViewScrollToMark` which saves a point to be scrolled to after line validation.

## scrollToMark

textViewScrollToMark Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a, IsTextMark b) |
=> a | `textView`: a `GtkTextView`
-> b | `mark`: a `GtkTextMark`
-> Double | `withinMargin`: margin as a [0.0,0.5) fraction of screen size
-> Bool | `useAlign`: whether to use alignment arguments (if `False`, just get the mark onscreen)
-> Double | `xalign`: horizontal alignment of mark within visible area
-> Double | `yalign`: vertical alignment of mark within visible area
-> m () |

Scrolls `textView` so that `mark` is on the screen in the position indicated by `xalign` and `yalign`.

An alignment of 0.0 indicates left or top, 1.0 indicates right or bottom, 0.5 means center. If `useAlign` is `False`, the text scrolls the minimal distance to get the mark onscreen, possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size `withinMargin`.

## setAcceptsTab

textViewSetAcceptsTab Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: A `GtkTextView`
-> Bool | `acceptsTab`: `True` if pressing the Tab key should insert a tab character, `False`, if pressing the Tab key should move the keyboard focus.
-> m () |

Sets the behavior of the text widget when the <kbd>Tab</kbd> key is pressed.

If `acceptsTab` is `True`, a tab character is inserted. If `acceptsTab` is `False` the keyboard focus is moved to the next widget in the focus chain.

Focus can always be moved using <kbd>Ctrl</kbd>+<kbd>Tab</kbd>.

## setBottomMargin

textViewSetBottomMargin Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> Int32 | `bottomMargin`: bottom margin in pixels
-> m () |

Sets the bottom margin for text in `textView`.

Note that this function is confusingly named. In CSS terms, the value set here is padding.

## setBuffer

textViewSetBuffer Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a, IsTextBuffer b) |
=> a | `textView`: a `GtkTextView`
-> Maybe b | `buffer`: a `GtkTextBuffer`
-> m () |

Sets `buffer` as the buffer being displayed by `textView`.

The previous buffer displayed by the text view is unreferenced, and a reference is added to `buffer`. If you owned a reference to `buffer` before passing it to this function, you must remove that reference yourself; `GtkTextView` will not “adopt” it.

## setCursorVisible

textViewSetCursorVisible Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> Bool | `setting`: whether to show the insertion cursor
-> m () |

Toggles whether the insertion point should be displayed.

A buffer with no editable text probably shouldn’t have a visible cursor, so you may want to turn the cursor off.

Note that this property may be overridden by the Settings:gtkKeynavUseCaret setting.

## setEditable

textViewSetEditable Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> Bool | `setting`: whether it’s editable
-> m () |

Sets the default editability of the `GtkTextView`.

You can override this default setting with tags in the buffer, using the “editable” attribute of tags.

## setExtraMenu

textViewSetExtraMenu Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a, IsMenuModel b) |
=> a | `textView`: a `GtkTextView`
-> Maybe b | `model`: a `GMenuModel`
-> m () |

Sets a menu model to add when constructing the context menu for `textView`.

You can pass `Nothing` to remove a previously set extra menu.

## setGutter

textViewSetGutter Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a, IsWidget b) |
=> a | `textView`: a `GtkTextView`
-> TextWindowType | `win`: a `GtkTextWindowType`
-> Maybe b | `widget`: a `GtkWidget`
-> m () |

Places `widget` into the gutter specified by `win`.

`win` must be one of `TextWindowTypeLeft`, `TextWindowTypeRight`, `TextWindowTypeTop`, or `TextWindowTypeBottom`.

## setIndent

textViewSetIndent Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> Int32 | `indent`: indentation in pixels
-> m () |

Sets the default indentation for paragraphs in `textView`.

Tags in the buffer may override the default.

## setInputHints

textViewSetInputHints Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> [InputHints] | `hints`: the hints
-> m () |

Sets the `input-hints` of the `GtkTextView`.

The `input-hints` allow input methods to fine-tune their behaviour.

## setInputPurpose

textViewSetInputPurpose Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> InputPurpose | `purpose`: the purpose
-> m () |

Sets the `input-purpose` of the `GtkTextView`.

The `input-purpose` can be used by on-screen keyboards and other input methods to adjust their behaviour.

## setJustification

textViewSetJustification Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> Justification | `justification`: justification
-> m () |

Sets the default justification of text in `textView`.

Tags in the view’s buffer may override the default.

## setLeftMargin

textViewSetLeftMargin Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> Int32 | `leftMargin`: left margin in pixels
-> m () |

Sets the default left margin for text in `textView`.

Tags in the buffer may override the default.

Note that this function is confusingly named. In CSS terms, the value set here is padding.

## setMonospace

textViewSetMonospace Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> Bool | `monospace`: `True` to request monospace styling
-> m () |

Sets whether the `GtkTextView` should display text in monospace styling.

## setOverwrite

textViewSetOverwrite Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> Bool | `overwrite`: `True` to turn on overwrite mode, `False` to turn it off
-> m () |

Changes the `GtkTextView` overwrite mode.

## setPixelsAboveLines

textViewSetPixelsAboveLines Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> Int32 | `pixelsAboveLines`: pixels above paragraphs
-> m () |

Sets the default number of blank pixels above paragraphs in `textView`.

Tags in the buffer for `textView` may override the defaults.

## setPixelsBelowLines

textViewSetPixelsBelowLines Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> Int32 | `pixelsBelowLines`: pixels below paragraphs
-> m () |

Sets the default number of pixels of blank space to put below paragraphs in `textView`.

May be overridden by tags applied to `textView`’s buffer.

## setPixelsInsideWrap

textViewSetPixelsInsideWrap Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> Int32 | `pixelsInsideWrap`: default number of pixels between wrapped lines
-> m () |

Sets the default number of pixels of blank space to leave between display/wrapped lines within a paragraph.

May be overridden by tags in `textView`’s buffer.

## setRightMargin

textViewSetRightMargin Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> Int32 | `rightMargin`: right margin in pixels
-> m () |

Sets the default right margin for text in the text view.

Tags in the buffer may override the default.

Note that this function is confusingly named. In CSS terms, the value set here is padding.

## setTabs

textViewSetTabs Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> TabArray | `tabs`: tabs as a `PangoTabArray`
-> m () |

Sets the default tab stops for paragraphs in `textView`.

Tags in the buffer may override the default.

## setTopMargin

textViewSetTopMargin Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> Int32 | `topMargin`: top margin in pixels
-> m () |

Sets the top margin for text in `textView`.

Note that this function is confusingly named. In CSS terms, the value set here is padding.

## setWrapMode

textViewSetWrapMode Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> WrapMode | `wrapMode`: a `GtkWrapMode`
-> m () |

Sets the line wrapping for the view.

## startsDisplayLine

textViewStartsDisplayLine Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> TextIter | `iter`: a `GtkTextIter`
-> m Bool | Returns: `True` if `iter` begins a wrapped line

Determines whether `iter` is at the start of a display line.

See `textViewForwardDisplayLine` for an explanation of display lines vs. paragraphs.

## windowToBufferCoords

textViewWindowToBufferCoords Source #

Arguments

:: (HasCallStack, MonadIO m, IsTextView a) |
=> a | `textView`: a `GtkTextView`
-> TextWindowType | `win`: a `GtkTextWindowType`
-> Int32 | `windowX`: window x coordinate
-> Int32 | `windowY`: window y coordinate
-> m (Int32, Int32) |

Converts coordinates on the window identified by `win` to buffer coordinates.

# Properties

## acceptsTab

Whether Tab will result in a tab character being entered.

constructTextViewAcceptsTab :: (IsTextView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`accepts-tab`” property. This is rarely needed directly, but it is used by `new`.

getTextViewAcceptsTab :: (MonadIO m, IsTextView o) => o -> m Bool Source #

Get the value of the “`accepts-tab`” property. When overloading is enabled, this is equivalent to

    get textView #acceptsTab

setTextViewAcceptsTab :: (MonadIO m, IsTextView o) => o -> Bool -> m () Source #

Set the value of the “`accepts-tab`” property. When overloading is enabled, this is equivalent to

    set textView [ #acceptsTab := value ]

## bottomMargin

The bottom margin for text in the text view.

Note that this property is confusingly named. In CSS terms, the value set here is padding, and it is applied in addition to the padding from the theme.

Don't confuse this property with Widget:marginBottom.

constructTextViewBottomMargin :: (IsTextView o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`bottom-margin`” property. This is rarely needed directly, but it is used by `new`.

getTextViewBottomMargin :: (MonadIO m, IsTextView o) => o -> m Int32 Source #

Get the value of the “`bottom-margin`” property. When overloading is enabled, this is equivalent to

    get textView #bottomMargin

setTextViewBottomMargin :: (MonadIO m, IsTextView o) => o -> Int32 -> m () Source #

Set the value of the “`bottom-margin`” property. When overloading is enabled, this is equivalent to

    set textView [ #bottomMargin := value ]

## buffer

The buffer which is displayed.

clearTextViewBuffer :: (MonadIO m, IsTextView o) => o -> m () Source #

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

    clear #buffer

constructTextViewBuffer :: (IsTextView o, MonadIO m, IsTextBuffer a) => a -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`buffer`” property. This is rarely needed directly, but it is used by `new`.

getTextViewBuffer :: (MonadIO m, IsTextView o) => o -> m TextBuffer Source #

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

    get textView #buffer

setTextViewBuffer :: (MonadIO m, IsTextView o, IsTextBuffer a) => o -> a -> m () Source #

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

    set textView [ #buffer := value ]

## cursorVisible

If the insertion cursor is shown.

constructTextViewCursorVisible :: (IsTextView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`cursor-visible`” property. This is rarely needed directly, but it is used by `new`.

getTextViewCursorVisible :: (MonadIO m, IsTextView o) => o -> m Bool Source #

Get the value of the “`cursor-visible`” property. When overloading is enabled, this is equivalent to

    get textView #cursorVisible

setTextViewCursorVisible :: (MonadIO m, IsTextView o) => o -> Bool -> m () Source #

Set the value of the “`cursor-visible`” property. When overloading is enabled, this is equivalent to

    set textView [ #cursorVisible := value ]

## editable

Whether the text can be modified by the user.

constructTextViewEditable :: (IsTextView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`editable`” property. This is rarely needed directly, but it is used by `new`.

getTextViewEditable :: (MonadIO m, IsTextView o) => o -> m Bool Source #

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

    get textView #editable

setTextViewEditable :: (MonadIO m, IsTextView o) => o -> Bool -> m () Source #

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

    set textView [ #editable := value ]

## extraMenu

A menu model whose contents will be appended to the context menu.

clearTextViewExtraMenu :: (MonadIO m, IsTextView o) => o -> m () Source #

Set the value of the “`extra-menu`” property to `Nothing`. When overloading is enabled, this is equivalent to

    clear #extraMenu

constructTextViewExtraMenu :: (IsTextView o, MonadIO m, IsMenuModel a) => a -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`extra-menu`” property. This is rarely needed directly, but it is used by `new`.

getTextViewExtraMenu :: (MonadIO m, IsTextView o) => o -> m (Maybe MenuModel) Source #

Get the value of the “`extra-menu`” property. When overloading is enabled, this is equivalent to

    get textView #extraMenu

setTextViewExtraMenu :: (MonadIO m, IsTextView o, IsMenuModel a) => o -> a -> m () Source #

Set the value of the “`extra-menu`” property. When overloading is enabled, this is equivalent to

    set textView [ #extraMenu := value ]

## imModule

Which IM (input method) module should be used for this text_view.

See `IMMulticontext`.

Setting this to a non-`Nothing` value overrides the system-wide IM module setting. See the GtkSettings Settings:gtkImModule property.

clearTextViewImModule :: (MonadIO m, IsTextView o) => o -> m () Source #

Set the value of the “`im-module`” property to `Nothing`. When overloading is enabled, this is equivalent to

    clear #imModule

constructTextViewImModule :: (IsTextView o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`im-module`” property. This is rarely needed directly, but it is used by `new`.

getTextViewImModule :: (MonadIO m, IsTextView o) => o -> m (Maybe Text) Source #

Get the value of the “`im-module`” property. When overloading is enabled, this is equivalent to

    get textView #imModule

setTextViewImModule :: (MonadIO m, IsTextView o) => o -> Text -> m () Source #

Set the value of the “`im-module`” property. When overloading is enabled, this is equivalent to

    set textView [ #imModule := value ]

## indent

Amount to indent the paragraph, in pixels.

A negative value of indent will produce a hanging indentation. That is, the first line will have the full width, and subsequent lines will be indented by the absolute value of indent.

constructTextViewIndent :: (IsTextView o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`indent`” property. This is rarely needed directly, but it is used by `new`.

getTextViewIndent :: (MonadIO m, IsTextView o) => o -> m Int32 Source #

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

    get textView #indent

setTextViewIndent :: (MonadIO m, IsTextView o) => o -> Int32 -> m () Source #

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

    set textView [ #indent := value ]

## inputHints

Additional hints (beyond TextView:inputPurpose) that allow input methods to fine-tune their behaviour.

constructTextViewInputHints :: (IsTextView o, MonadIO m) => [InputHints] -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`input-hints`” property. This is rarely needed directly, but it is used by `new`.

getTextViewInputHints :: (MonadIO m, IsTextView o) => o -> m [InputHints] Source #

Get the value of the “`input-hints`” property. When overloading is enabled, this is equivalent to

    get textView #inputHints

setTextViewInputHints :: (MonadIO m, IsTextView o) => o -> [InputHints] -> m () Source #

Set the value of the “`input-hints`” property. When overloading is enabled, this is equivalent to

    set textView [ #inputHints := value ]

## inputPurpose

The purpose of this text field.

This property can be used by on-screen keyboards and other input methods to adjust their behaviour.

constructTextViewInputPurpose :: (IsTextView o, MonadIO m) => InputPurpose -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`input-purpose`” property. This is rarely needed directly, but it is used by `new`.

getTextViewInputPurpose :: (MonadIO m, IsTextView o) => o -> m InputPurpose Source #

Get the value of the “`input-purpose`” property. When overloading is enabled, this is equivalent to

    get textView #inputPurpose

setTextViewInputPurpose :: (MonadIO m, IsTextView o) => o -> InputPurpose -> m () Source #

Set the value of the “`input-purpose`” property. When overloading is enabled, this is equivalent to

    set textView [ #inputPurpose := value ]

## justification

Left, right, or center justification.

constructTextViewJustification :: (IsTextView o, MonadIO m) => Justification -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`justification`” property. This is rarely needed directly, but it is used by `new`.

getTextViewJustification :: (MonadIO m, IsTextView o) => o -> m Justification Source #

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

    get textView #justification

setTextViewJustification :: (MonadIO m, IsTextView o) => o -> Justification -> m () Source #

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

    set textView [ #justification := value ]

## leftMargin

The default left margin for text in the text view.

Tags in the buffer may override the default.

Note that this property is confusingly named. In CSS terms, the value set here is padding, and it is applied in addition to the padding from the theme.

constructTextViewLeftMargin :: (IsTextView o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`left-margin`” property. This is rarely needed directly, but it is used by `new`.

getTextViewLeftMargin :: (MonadIO m, IsTextView o) => o -> m Int32 Source #

Get the value of the “`left-margin`” property. When overloading is enabled, this is equivalent to

    get textView #leftMargin

setTextViewLeftMargin :: (MonadIO m, IsTextView o) => o -> Int32 -> m () Source #

Set the value of the “`left-margin`” property. When overloading is enabled, this is equivalent to

    set textView [ #leftMargin := value ]

## monospace

Whether text should be displayed in a monospace font.

If `True`, set the .monospace style class on the text view to indicate that a monospace font is desired.

constructTextViewMonospace :: (IsTextView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`monospace`” property. This is rarely needed directly, but it is used by `new`.

getTextViewMonospace :: (MonadIO m, IsTextView o) => o -> m Bool Source #

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

    get textView #monospace

setTextViewMonospace :: (MonadIO m, IsTextView o) => o -> Bool -> m () Source #

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

    set textView [ #monospace := value ]

## overwrite

Whether entered text overwrites existing contents.

constructTextViewOverwrite :: (IsTextView o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`overwrite`” property. This is rarely needed directly, but it is used by `new`.

getTextViewOverwrite :: (MonadIO m, IsTextView o) => o -> m Bool Source #

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

    get textView #overwrite

setTextViewOverwrite :: (MonadIO m, IsTextView o) => o -> Bool -> m () Source #

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

    set textView [ #overwrite := value ]

## pixelsAboveLines

Pixels of blank space above paragraphs.

constructTextViewPixelsAboveLines :: (IsTextView o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`pixels-above-lines`” property. This is rarely needed directly, but it is used by `new`.

getTextViewPixelsAboveLines :: (MonadIO m, IsTextView o) => o -> m Int32 Source #

Get the value of the “`pixels-above-lines`” property. When overloading is enabled, this is equivalent to

    get textView #pixelsAboveLines

setTextViewPixelsAboveLines :: (MonadIO m, IsTextView o) => o -> Int32 -> m () Source #

Set the value of the “`pixels-above-lines`” property. When overloading is enabled, this is equivalent to

    set textView [ #pixelsAboveLines := value ]

## pixelsBelowLines

Pixels of blank space below paragraphs.

constructTextViewPixelsBelowLines :: (IsTextView o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`pixels-below-lines`” property. This is rarely needed directly, but it is used by `new`.

getTextViewPixelsBelowLines :: (MonadIO m, IsTextView o) => o -> m Int32 Source #

Get the value of the “`pixels-below-lines`” property. When overloading is enabled, this is equivalent to

    get textView #pixelsBelowLines

setTextViewPixelsBelowLines :: (MonadIO m, IsTextView o) => o -> Int32 -> m () Source #

Set the value of the “`pixels-below-lines`” property. When overloading is enabled, this is equivalent to

    set textView [ #pixelsBelowLines := value ]

## pixelsInsideWrap

Pixels of blank space between wrapped lines in a paragraph.

constructTextViewPixelsInsideWrap :: (IsTextView o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`pixels-inside-wrap`” property. This is rarely needed directly, but it is used by `new`.

getTextViewPixelsInsideWrap :: (MonadIO m, IsTextView o) => o -> m Int32 Source #

Get the value of the “`pixels-inside-wrap`” property. When overloading is enabled, this is equivalent to

    get textView #pixelsInsideWrap

setTextViewPixelsInsideWrap :: (MonadIO m, IsTextView o) => o -> Int32 -> m () Source #

Set the value of the “`pixels-inside-wrap`” property. When overloading is enabled, this is equivalent to

    set textView [ #pixelsInsideWrap := value ]

## rightMargin

The default right margin for text in the text view.

Tags in the buffer may override the default.

Note that this property is confusingly named. In CSS terms, the value set here is padding, and it is applied in addition to the padding from the theme.

constructTextViewRightMargin :: (IsTextView o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`right-margin`” property. This is rarely needed directly, but it is used by `new`.

getTextViewRightMargin :: (MonadIO m, IsTextView o) => o -> m Int32 Source #

Get the value of the “`right-margin`” property. When overloading is enabled, this is equivalent to

    get textView #rightMargin

setTextViewRightMargin :: (MonadIO m, IsTextView o) => o -> Int32 -> m () Source #

Set the value of the “`right-margin`” property. When overloading is enabled, this is equivalent to

    set textView [ #rightMargin := value ]

## tabs

Custom tabs for this text.

constructTextViewTabs :: (IsTextView o, MonadIO m) => TabArray -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`tabs`” property. This is rarely needed directly, but it is used by `new`.

getTextViewTabs :: (MonadIO m, IsTextView o) => o -> m (Maybe TabArray) Source #

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

    get textView #tabs

setTextViewTabs :: (MonadIO m, IsTextView o) => o -> TabArray -> m () Source #

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

    set textView [ #tabs := value ]

## topMargin

The top margin for text in the text view.

Note that this property is confusingly named. In CSS terms, the value set here is padding, and it is applied in addition to the padding from the theme.

Don't confuse this property with Widget:marginTop.

constructTextViewTopMargin :: (IsTextView o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`top-margin`” property. This is rarely needed directly, but it is used by `new`.

getTextViewTopMargin :: (MonadIO m, IsTextView o) => o -> m Int32 Source #

Get the value of the “`top-margin`” property. When overloading is enabled, this is equivalent to

    get textView #topMargin

setTextViewTopMargin :: (MonadIO m, IsTextView o) => o -> Int32 -> m () Source #

Set the value of the “`top-margin`” property. When overloading is enabled, this is equivalent to

    set textView [ #topMargin := value ]

## wrapMode

Whether to wrap lines never, at word boundaries, or at character boundaries.

constructTextViewWrapMode :: (IsTextView o, MonadIO m) => WrapMode -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`wrap-mode`” property. This is rarely needed directly, but it is used by `new`.

getTextViewWrapMode :: (MonadIO m, IsTextView o) => o -> m WrapMode Source #

Get the value of the “`wrap-mode`” property. When overloading is enabled, this is equivalent to

    get textView #wrapMode

setTextViewWrapMode :: (MonadIO m, IsTextView o) => o -> WrapMode -> m () Source #

Set the value of the “`wrap-mode`” property. When overloading is enabled, this is equivalent to

    set textView [ #wrapMode := value ]

# Signals

## backspace

type TextViewBackspaceCallback = IO () Source #

Gets emitted when the user asks for it.

The backspace signal is a keybinding signal.

The default bindings for this signal are <kbd>Backspace</kbd> and <kbd>Shift</kbd>+<kbd>Backspace</kbd>.

afterTextViewBackspace :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewBackspaceCallback) -> m SignalHandlerId Source #

Connect a signal handler for the backspace signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after textView #backspace callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onTextViewBackspace :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewBackspaceCallback) -> m SignalHandlerId Source #

Connect a signal handler for the backspace signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on textView #backspace callback

## copyClipboard

type TextViewCopyClipboardCallback = IO () Source #

Gets emitted to copy the selection to the clipboard.

The copyClipboard signal is a keybinding signal.

The default bindings for this signal are <kbd>Ctrl</kbd>+<kbd>c</kbd> and <kbd>Ctrl</kbd>+<kbd>Insert</kbd>.

afterTextViewCopyClipboard :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewCopyClipboardCallback) -> m SignalHandlerId Source #

Connect a signal handler for the copyClipboard signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after textView #copyClipboard callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onTextViewCopyClipboard :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewCopyClipboardCallback) -> m SignalHandlerId Source #

Connect a signal handler for the copyClipboard signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on textView #copyClipboard callback

## cutClipboard

type TextViewCutClipboardCallback = IO () Source #

Gets emitted to cut the selection to the clipboard.

The cutClipboard signal is a keybinding signal.

The default bindings for this signal are <kbd>Ctrl</kbd>+<kbd>x</kbd> and <kbd>Shift</kbd>+<kbd>Delete</kbd>.

afterTextViewCutClipboard :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewCutClipboardCallback) -> m SignalHandlerId Source #

Connect a signal handler for the cutClipboard signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after textView #cutClipboard callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onTextViewCutClipboard :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewCutClipboardCallback) -> m SignalHandlerId Source #

Connect a signal handler for the cutClipboard signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on textView #cutClipboard callback

## deleteFromCursor

type TextViewDeleteFromCursorCallback Source #

Arguments

= DeleteType | `type`: the granularity of the deletion, as a `GtkDeleteType`
-> Int32 | `count`: the number of `type` units to delete
-> IO () |

Gets emitted when the user initiates a text deletion.

The deleteFromCursor signal is a keybinding signal.

If the `type` is `DeleteTypeChars`, GTK deletes the selection if there is one, otherwise it deletes the requested number of characters.

The default bindings for this signal are <kbd>Delete</kbd> for deleting a character, <kbd>Ctrl</kbd>+<kbd>Delete</kbd> for deleting a word and <kbd>Ctrl</kbd>+<kbd>Backspace</kbd> for deleting a word backwards.

afterTextViewDeleteFromCursor :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewDeleteFromCursorCallback) -> m SignalHandlerId Source #

Connect a signal handler for the deleteFromCursor signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after textView #deleteFromCursor callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onTextViewDeleteFromCursor :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewDeleteFromCursorCallback) -> m SignalHandlerId Source #

Connect a signal handler for the deleteFromCursor signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on textView #deleteFromCursor callback

## extendSelection

type TextViewExtendSelectionCallback Source #

Arguments

= TextExtendSelection | `granularity`: the granularity type
-> TextIter | `location`: the location where to extend the selection
-> TextIter | `start`: where the selection should start
-> TextIter | `end`: where the selection should end
-> IO Bool | Returns: `EVENT_STOP` to stop other handlers from being invoked for the event. `EVENT_PROPAGATE` to propagate the event further.

Emitted when the selection needs to be extended at `location`.

afterTextViewExtendSelection :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewExtendSelectionCallback) -> m SignalHandlerId Source #

Connect a signal handler for the extendSelection signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after textView #extendSelection callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onTextViewExtendSelection :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewExtendSelectionCallback) -> m SignalHandlerId Source #

Connect a signal handler for the extendSelection signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on textView #extendSelection callback

## insertAtCursor

type TextViewInsertAtCursorCallback Source #

Arguments

= Text | `string`: the string to insert
-> IO () |

Gets emitted when the user initiates the insertion of a fixed string at the cursor.

The insertAtCursor signal is a keybinding signal.

This signal has no default bindings.

afterTextViewInsertAtCursor :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewInsertAtCursorCallback) -> m SignalHandlerId Source #

Connect a signal handler for the insertAtCursor signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after textView #insertAtCursor callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onTextViewInsertAtCursor :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewInsertAtCursorCallback) -> m SignalHandlerId Source #

Connect a signal handler for the insertAtCursor signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on textView #insertAtCursor callback

## insertEmoji

type TextViewInsertEmojiCallback = IO () Source #

Gets emitted to present the Emoji chooser for the `textView`.

The insertEmoji signal is a keybinding signal.

The default bindings for this signal are <kbd>Ctrl</kbd>+<kbd>.</kbd> and <kbd>Ctrl</kbd>+<kbd>;</kbd>

afterTextViewInsertEmoji :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewInsertEmojiCallback) -> m SignalHandlerId Source #

Connect a signal handler for the insertEmoji signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after textView #insertEmoji callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onTextViewInsertEmoji :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewInsertEmojiCallback) -> m SignalHandlerId Source #

Connect a signal handler for the insertEmoji signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on textView #insertEmoji callback

## moveCursor

type TextViewMoveCursorCallback Source #

Arguments

= MovementStep | `step`: the granularity of the move, as a `GtkMovementStep`
-> Int32 | `count`: the number of `step` units to move
-> Bool | `extendSelection`: `True` if the move should extend the selection
-> IO () |

Gets emitted when the user initiates a cursor movement.

The moveCursor signal is a keybinding signal. If the cursor is not visible in `textView`, this signal causes the viewport to be moved instead.

Applications should not connect to it, but may emit it with `g_signal_emit_by_name()` if they need to control the cursor programmatically.

The default bindings for this signal come in two variants, the variant with the <kbd>Shift</kbd> modifier extends the selection, the variant without it does not. There are too many key combinations to list them all here.

- <kbd>←</kbd>, <kbd>→</kbd>, <kbd>↑</kbd>, <kbd>↓</kbd> move by individual characters/lines
- <kbd>Ctrl</kbd>+<kbd>←</kbd>, etc. move by words/paragraphs
- <kbd>Home</kbd> and <kbd>End</kbd> move to the ends of the buffer
- <kbd>PgUp</kbd> and <kbd>PgDn</kbd> move vertically by pages
- <kbd>Ctrl</kbd>+<kbd>PgUp</kbd> and <kbd>Ctrl</kbd>+<kbd>PgDn</kbd> move horizontally by pages

afterTextViewMoveCursor :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewMoveCursorCallback) -> m SignalHandlerId Source #

Connect a signal handler for the moveCursor signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after textView #moveCursor callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onTextViewMoveCursor :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewMoveCursorCallback) -> m SignalHandlerId Source #

Connect a signal handler for the moveCursor signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on textView #moveCursor callback

## moveViewport

type TextViewMoveViewportCallback Source #

Arguments

= ScrollStep | `step`: the granularity of the movement, as a `GtkScrollStep`
-> Int32 | `count`: the number of `step` units to move
-> IO () |

Gets emitted to move the viewport.

The moveViewport signal is a keybinding signal, which can be bound to key combinations to allow the user to move the viewport, i.e. change what part of the text view is visible in a containing scrolled window.

There are no default bindings for this signal.

afterTextViewMoveViewport :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewMoveViewportCallback) -> m SignalHandlerId Source #

Connect a signal handler for the moveViewport signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after textView #moveViewport callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onTextViewMoveViewport :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewMoveViewportCallback) -> m SignalHandlerId Source #

Connect a signal handler for the moveViewport signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on textView #moveViewport callback

## pasteClipboard

type TextViewPasteClipboardCallback = IO () Source #

Gets emitted to paste the contents of the clipboard into the text view.

The pasteClipboard signal is a keybinding signal.

The default bindings for this signal are <kbd>Ctrl</kbd>+<kbd>v</kbd> and <kbd>Shift</kbd>+<kbd>Insert</kbd>.

afterTextViewPasteClipboard :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewPasteClipboardCallback) -> m SignalHandlerId Source #

Connect a signal handler for the pasteClipboard signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after textView #pasteClipboard callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onTextViewPasteClipboard :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewPasteClipboardCallback) -> m SignalHandlerId Source #

Connect a signal handler for the pasteClipboard signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on textView #pasteClipboard callback

## preeditChanged

type TextViewPreeditChangedCallback Source #

Arguments

= Text | `preedit`: the current preedit string
-> IO () |

Emitted when preedit text of the active IM changes.

If an input method is used, the typed text will not immediately be committed to the buffer. So if you are interested in the text, connect to this signal.

This signal is only emitted if the text at the given position is actually editable.

afterTextViewPreeditChanged :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewPreeditChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the preeditChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after textView #preeditChanged callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onTextViewPreeditChanged :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewPreeditChangedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the preeditChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on textView #preeditChanged callback

## selectAll

type TextViewSelectAllCallback Source #

Arguments

= Bool | `select`: `True` to select, `False` to unselect
-> IO () |

Gets emitted to select or unselect the complete contents of the text view.

The selectAll signal is a keybinding signal.

The default bindings for this signal are <kbd>Ctrl</kbd>+<kbd>a</kbd> and <kbd>Ctrl</kbd>+<kbd>/</kbd> for selecting and <kbd>Shift</kbd>+<kbd>Ctrl</kbd>+<kbd>a</kbd> and <kbd>Ctrl</kbd>+<kbd>\</kbd> for unselecting.

afterTextViewSelectAll :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewSelectAllCallback) -> m SignalHandlerId Source #

Connect a signal handler for the selectAll signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after textView #selectAll callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onTextViewSelectAll :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewSelectAllCallback) -> m SignalHandlerId Source #

Connect a signal handler for the selectAll signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on textView #selectAll callback

## setAnchor

type TextViewSetAnchorCallback = IO () Source #

Gets emitted when the user initiates settings the "anchor" mark.

The setAnchor signal is a keybinding signal which gets emitted when the user initiates setting the "anchor" mark. The "anchor" mark gets placed at the same position as the "insert" mark.

This signal has no default bindings.

afterTextViewSetAnchor :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewSetAnchorCallback) -> m SignalHandlerId Source #

Connect a signal handler for the setAnchor signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after textView #setAnchor callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onTextViewSetAnchor :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewSetAnchorCallback) -> m SignalHandlerId Source #

Connect a signal handler for the setAnchor signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on textView #setAnchor callback

## toggleCursorVisible

type TextViewToggleCursorVisibleCallback = IO () Source #

Gets emitted to toggle the `cursor-visible` property.

The toggleCursorVisible signal is a keybinding signal.

The default binding for this signal is <kbd>F7</kbd>.

afterTextViewToggleCursorVisible :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewToggleCursorVisibleCallback) -> m SignalHandlerId Source #

Connect a signal handler for the toggleCursorVisible signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after textView #toggleCursorVisible callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onTextViewToggleCursorVisible :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewToggleCursorVisibleCallback) -> m SignalHandlerId Source #

Connect a signal handler for the toggleCursorVisible signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on textView #toggleCursorVisible callback

## toggleOverwrite

type TextViewToggleOverwriteCallback = IO () Source #

Gets emitted to toggle the overwrite mode of the text view.

The toggleOverwrite signal is a keybinding signal.

The default binding for this signal is <kbd>Insert</kbd>.

afterTextViewToggleOverwrite :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewToggleOverwriteCallback) -> m SignalHandlerId Source #

Connect a signal handler for the toggleOverwrite signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after textView #toggleOverwrite callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onTextViewToggleOverwrite :: (IsTextView a, MonadIO m) => a -> ((?self :: a) => TextViewToggleOverwriteCallback) -> m SignalHandlerId Source #

Connect a signal handler for the toggleOverwrite signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on textView #toggleOverwrite callback