Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
- Exported types
- Methods
- Overloaded methods
- addMark
- addSelectionClipboard
- applyTag
- applyTagByName
- backspace
- beginIrreversibleAction
- beginUserAction
- copyClipboard
- createChildAnchor
- createMark
- cutClipboard
- delete
- deleteInteractive
- deleteMark
- deleteMarkByName
- deleteSelection
- endIrreversibleAction
- endUserAction
- getBounds
- getCanRedo
- getCanUndo
- getCharCount
- getEnableUndo
- getEndIter
- getHasSelection
- getInsert
- getIterAtChildAnchor
- getIterAtLine
- getIterAtLineIndex
- getIterAtLineOffset
- getIterAtMark
- getIterAtOffset
- getLineCount
- getMark
- getMaxUndoLevels
- getModified
- getSelectionBound
- getSelectionBounds
- getSelectionContent
- getSlice
- getStartIter
- getTagTable
- getText
- insert
- insertAtCursor
- insertChildAnchor
- insertInteractive
- insertInteractiveAtCursor
- insertMarkup
- insertPaintable
- insertRange
- insertRangeInteractive
- moveMark
- moveMarkByName
- new
- pasteClipboard
- placeCursor
- redo
- removeAllTags
- removeSelectionClipboard
- removeTag
- removeTagByName
- selectRange
- setEnableUndo
- setMaxUndoLevels
- setModified
- setText
- undo
- Properties
- Signals
You may wish to begin by reading the [text widget conceptual overview][TextWidget] which gives an overview of all the objects and data types related to the text widget and how they work together.
Synopsis
- newtype TextBuffer = TextBuffer (ManagedPtr TextBuffer)
- class (GObject o, IsDescendantOf TextBuffer o) => IsTextBuffer o
- toTextBuffer :: (MonadIO m, IsTextBuffer o) => o -> m TextBuffer
- textBufferAddMark :: (HasCallStack, MonadIO m, IsTextBuffer a, IsTextMark b) => a -> b -> TextIter -> m ()
- textBufferAddSelectionClipboard :: (HasCallStack, MonadIO m, IsTextBuffer a, IsClipboard b) => a -> b -> m ()
- textBufferApplyTag :: (HasCallStack, MonadIO m, IsTextBuffer a, IsTextTag b) => a -> b -> TextIter -> TextIter -> m ()
- textBufferApplyTagByName :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Text -> TextIter -> TextIter -> m ()
- textBufferBackspace :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> TextIter -> Bool -> Bool -> m Bool
- textBufferBeginIrreversibleAction :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m ()
- textBufferBeginUserAction :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m ()
- textBufferCopyClipboard :: (HasCallStack, MonadIO m, IsTextBuffer a, IsClipboard b) => a -> b -> m ()
- textBufferCreateChildAnchor :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> TextIter -> m TextChildAnchor
- textBufferCreateMark :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Maybe Text -> TextIter -> Bool -> m TextMark
- textBufferCutClipboard :: (HasCallStack, MonadIO m, IsTextBuffer a, IsClipboard b) => a -> b -> Bool -> m ()
- textBufferDelete :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> TextIter -> TextIter -> m ()
- textBufferDeleteInteractive :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> TextIter -> TextIter -> Bool -> m Bool
- textBufferDeleteMark :: (HasCallStack, MonadIO m, IsTextBuffer a, IsTextMark b) => a -> b -> m ()
- textBufferDeleteMarkByName :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Text -> m ()
- textBufferDeleteSelection :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Bool -> Bool -> m Bool
- textBufferEndIrreversibleAction :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m ()
- textBufferEndUserAction :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m ()
- textBufferGetBounds :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m (TextIter, TextIter)
- textBufferGetCanRedo :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m Bool
- textBufferGetCanUndo :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m Bool
- textBufferGetCharCount :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m Int32
- textBufferGetEnableUndo :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m Bool
- textBufferGetEndIter :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m TextIter
- textBufferGetHasSelection :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m Bool
- textBufferGetInsert :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m TextMark
- textBufferGetIterAtChildAnchor :: (HasCallStack, MonadIO m, IsTextBuffer a, IsTextChildAnchor b) => a -> b -> m TextIter
- textBufferGetIterAtLine :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Int32 -> m TextIter
- textBufferGetIterAtLineIndex :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Int32 -> Int32 -> m TextIter
- textBufferGetIterAtLineOffset :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Int32 -> Int32 -> m TextIter
- textBufferGetIterAtMark :: (HasCallStack, MonadIO m, IsTextBuffer a, IsTextMark b) => a -> b -> m TextIter
- textBufferGetIterAtOffset :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Int32 -> m TextIter
- textBufferGetLineCount :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m Int32
- textBufferGetMark :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Text -> m (Maybe TextMark)
- textBufferGetMaxUndoLevels :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m Word32
- textBufferGetModified :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m Bool
- textBufferGetSelectionBound :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m TextMark
- textBufferGetSelectionBounds :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m (Bool, TextIter, TextIter)
- textBufferGetSelectionContent :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m ContentProvider
- textBufferGetSlice :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> TextIter -> TextIter -> Bool -> m Text
- textBufferGetStartIter :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m TextIter
- textBufferGetTagTable :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m TextTagTable
- textBufferGetText :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> TextIter -> TextIter -> Bool -> m Text
- textBufferInsert :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> TextIter -> Text -> Int32 -> m ()
- textBufferInsertAtCursor :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Text -> Int32 -> m ()
- textBufferInsertChildAnchor :: (HasCallStack, MonadIO m, IsTextBuffer a, IsTextChildAnchor b) => a -> TextIter -> b -> m ()
- textBufferInsertInteractive :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> TextIter -> Text -> Int32 -> Bool -> m Bool
- textBufferInsertInteractiveAtCursor :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Text -> Int32 -> Bool -> m Bool
- textBufferInsertMarkup :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> TextIter -> Text -> Int32 -> m ()
- textBufferInsertPaintable :: (HasCallStack, MonadIO m, IsTextBuffer a, IsPaintable b) => a -> TextIter -> b -> m ()
- textBufferInsertRange :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> TextIter -> TextIter -> TextIter -> m ()
- textBufferInsertRangeInteractive :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> TextIter -> TextIter -> TextIter -> Bool -> m Bool
- textBufferMoveMark :: (HasCallStack, MonadIO m, IsTextBuffer a, IsTextMark b) => a -> b -> TextIter -> m ()
- textBufferMoveMarkByName :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Text -> TextIter -> m ()
- textBufferNew :: (HasCallStack, MonadIO m, IsTextTagTable a) => Maybe a -> m TextBuffer
- textBufferPasteClipboard :: (HasCallStack, MonadIO m, IsTextBuffer a, IsClipboard b) => a -> b -> Maybe TextIter -> Bool -> m ()
- textBufferPlaceCursor :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> TextIter -> m ()
- textBufferRedo :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m ()
- textBufferRemoveAllTags :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> TextIter -> TextIter -> m ()
- textBufferRemoveSelectionClipboard :: (HasCallStack, MonadIO m, IsTextBuffer a, IsClipboard b) => a -> b -> m ()
- textBufferRemoveTag :: (HasCallStack, MonadIO m, IsTextBuffer a, IsTextTag b) => a -> b -> TextIter -> TextIter -> m ()
- textBufferRemoveTagByName :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Text -> TextIter -> TextIter -> m ()
- textBufferSelectRange :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> TextIter -> TextIter -> m ()
- textBufferSetEnableUndo :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Bool -> m ()
- textBufferSetMaxUndoLevels :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Word32 -> m ()
- textBufferSetModified :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Bool -> m ()
- textBufferSetText :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Text -> Int32 -> m ()
- textBufferUndo :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m ()
- getTextBufferCanRedo :: (MonadIO m, IsTextBuffer o) => o -> m Bool
- getTextBufferCanUndo :: (MonadIO m, IsTextBuffer o) => o -> m Bool
- getTextBufferCopyTargetList :: (MonadIO m, IsTextBuffer o) => o -> m (Maybe ContentFormats)
- getTextBufferCursorPosition :: (MonadIO m, IsTextBuffer o) => o -> m Int32
- constructTextBufferEnableUndo :: (IsTextBuffer o, MonadIO m) => Bool -> m (GValueConstruct o)
- getTextBufferEnableUndo :: (MonadIO m, IsTextBuffer o) => o -> m Bool
- setTextBufferEnableUndo :: (MonadIO m, IsTextBuffer o) => o -> Bool -> m ()
- getTextBufferHasSelection :: (MonadIO m, IsTextBuffer o) => o -> m Bool
- getTextBufferPasteTargetList :: (MonadIO m, IsTextBuffer o) => o -> m (Maybe ContentFormats)
- constructTextBufferTagTable :: (IsTextBuffer o, MonadIO m, IsTextTagTable a) => a -> m (GValueConstruct o)
- getTextBufferTagTable :: (MonadIO m, IsTextBuffer o) => o -> m TextTagTable
- clearTextBufferText :: (MonadIO m, IsTextBuffer o) => o -> m ()
- constructTextBufferText :: (IsTextBuffer o, MonadIO m) => Text -> m (GValueConstruct o)
- getTextBufferText :: (MonadIO m, IsTextBuffer o) => o -> m (Maybe Text)
- setTextBufferText :: (MonadIO m, IsTextBuffer o) => o -> Text -> m ()
- type C_TextBufferApplyTagCallback = Ptr () -> Ptr TextTag -> Ptr TextIter -> Ptr TextIter -> Ptr () -> IO ()
- type TextBufferApplyTagCallback = TextTag -> TextIter -> TextIter -> IO ()
- afterTextBufferApplyTag :: (IsTextBuffer a, MonadIO m) => a -> TextBufferApplyTagCallback -> m SignalHandlerId
- genClosure_TextBufferApplyTag :: MonadIO m => TextBufferApplyTagCallback -> m (GClosure C_TextBufferApplyTagCallback)
- mk_TextBufferApplyTagCallback :: C_TextBufferApplyTagCallback -> IO (FunPtr C_TextBufferApplyTagCallback)
- noTextBufferApplyTagCallback :: Maybe TextBufferApplyTagCallback
- onTextBufferApplyTag :: (IsTextBuffer a, MonadIO m) => a -> TextBufferApplyTagCallback -> m SignalHandlerId
- wrap_TextBufferApplyTagCallback :: TextBufferApplyTagCallback -> C_TextBufferApplyTagCallback
- type C_TextBufferBeginUserActionCallback = Ptr () -> Ptr () -> IO ()
- type TextBufferBeginUserActionCallback = IO ()
- afterTextBufferBeginUserAction :: (IsTextBuffer a, MonadIO m) => a -> TextBufferBeginUserActionCallback -> m SignalHandlerId
- genClosure_TextBufferBeginUserAction :: MonadIO m => TextBufferBeginUserActionCallback -> m (GClosure C_TextBufferBeginUserActionCallback)
- mk_TextBufferBeginUserActionCallback :: C_TextBufferBeginUserActionCallback -> IO (FunPtr C_TextBufferBeginUserActionCallback)
- noTextBufferBeginUserActionCallback :: Maybe TextBufferBeginUserActionCallback
- onTextBufferBeginUserAction :: (IsTextBuffer a, MonadIO m) => a -> TextBufferBeginUserActionCallback -> m SignalHandlerId
- wrap_TextBufferBeginUserActionCallback :: TextBufferBeginUserActionCallback -> C_TextBufferBeginUserActionCallback
- type C_TextBufferChangedCallback = Ptr () -> Ptr () -> IO ()
- type TextBufferChangedCallback = IO ()
- afterTextBufferChanged :: (IsTextBuffer a, MonadIO m) => a -> TextBufferChangedCallback -> m SignalHandlerId
- genClosure_TextBufferChanged :: MonadIO m => TextBufferChangedCallback -> m (GClosure C_TextBufferChangedCallback)
- mk_TextBufferChangedCallback :: C_TextBufferChangedCallback -> IO (FunPtr C_TextBufferChangedCallback)
- noTextBufferChangedCallback :: Maybe TextBufferChangedCallback
- onTextBufferChanged :: (IsTextBuffer a, MonadIO m) => a -> TextBufferChangedCallback -> m SignalHandlerId
- wrap_TextBufferChangedCallback :: TextBufferChangedCallback -> C_TextBufferChangedCallback
- type C_TextBufferDeleteRangeCallback = Ptr () -> Ptr TextIter -> Ptr TextIter -> Ptr () -> IO ()
- type TextBufferDeleteRangeCallback = TextIter -> TextIter -> IO ()
- afterTextBufferDeleteRange :: (IsTextBuffer a, MonadIO m) => a -> TextBufferDeleteRangeCallback -> m SignalHandlerId
- genClosure_TextBufferDeleteRange :: MonadIO m => TextBufferDeleteRangeCallback -> m (GClosure C_TextBufferDeleteRangeCallback)
- mk_TextBufferDeleteRangeCallback :: C_TextBufferDeleteRangeCallback -> IO (FunPtr C_TextBufferDeleteRangeCallback)
- noTextBufferDeleteRangeCallback :: Maybe TextBufferDeleteRangeCallback
- onTextBufferDeleteRange :: (IsTextBuffer a, MonadIO m) => a -> TextBufferDeleteRangeCallback -> m SignalHandlerId
- wrap_TextBufferDeleteRangeCallback :: TextBufferDeleteRangeCallback -> C_TextBufferDeleteRangeCallback
- type C_TextBufferEndUserActionCallback = Ptr () -> Ptr () -> IO ()
- type TextBufferEndUserActionCallback = IO ()
- afterTextBufferEndUserAction :: (IsTextBuffer a, MonadIO m) => a -> TextBufferEndUserActionCallback -> m SignalHandlerId
- genClosure_TextBufferEndUserAction :: MonadIO m => TextBufferEndUserActionCallback -> m (GClosure C_TextBufferEndUserActionCallback)
- mk_TextBufferEndUserActionCallback :: C_TextBufferEndUserActionCallback -> IO (FunPtr C_TextBufferEndUserActionCallback)
- noTextBufferEndUserActionCallback :: Maybe TextBufferEndUserActionCallback
- onTextBufferEndUserAction :: (IsTextBuffer a, MonadIO m) => a -> TextBufferEndUserActionCallback -> m SignalHandlerId
- wrap_TextBufferEndUserActionCallback :: TextBufferEndUserActionCallback -> C_TextBufferEndUserActionCallback
- type C_TextBufferInsertChildAnchorCallback = Ptr () -> Ptr TextIter -> Ptr TextChildAnchor -> Ptr () -> IO ()
- type TextBufferInsertChildAnchorCallback = TextIter -> TextChildAnchor -> IO ()
- afterTextBufferInsertChildAnchor :: (IsTextBuffer a, MonadIO m) => a -> TextBufferInsertChildAnchorCallback -> m SignalHandlerId
- genClosure_TextBufferInsertChildAnchor :: MonadIO m => TextBufferInsertChildAnchorCallback -> m (GClosure C_TextBufferInsertChildAnchorCallback)
- mk_TextBufferInsertChildAnchorCallback :: C_TextBufferInsertChildAnchorCallback -> IO (FunPtr C_TextBufferInsertChildAnchorCallback)
- noTextBufferInsertChildAnchorCallback :: Maybe TextBufferInsertChildAnchorCallback
- onTextBufferInsertChildAnchor :: (IsTextBuffer a, MonadIO m) => a -> TextBufferInsertChildAnchorCallback -> m SignalHandlerId
- wrap_TextBufferInsertChildAnchorCallback :: TextBufferInsertChildAnchorCallback -> C_TextBufferInsertChildAnchorCallback
- type C_TextBufferInsertPaintableCallback = Ptr () -> Ptr TextIter -> Ptr Paintable -> Ptr () -> IO ()
- type TextBufferInsertPaintableCallback = TextIter -> Paintable -> IO ()
- afterTextBufferInsertPaintable :: (IsTextBuffer a, MonadIO m) => a -> TextBufferInsertPaintableCallback -> m SignalHandlerId
- genClosure_TextBufferInsertPaintable :: MonadIO m => TextBufferInsertPaintableCallback -> m (GClosure C_TextBufferInsertPaintableCallback)
- mk_TextBufferInsertPaintableCallback :: C_TextBufferInsertPaintableCallback -> IO (FunPtr C_TextBufferInsertPaintableCallback)
- noTextBufferInsertPaintableCallback :: Maybe TextBufferInsertPaintableCallback
- onTextBufferInsertPaintable :: (IsTextBuffer a, MonadIO m) => a -> TextBufferInsertPaintableCallback -> m SignalHandlerId
- wrap_TextBufferInsertPaintableCallback :: TextBufferInsertPaintableCallback -> C_TextBufferInsertPaintableCallback
- type C_TextBufferInsertTextCallback = Ptr () -> Ptr TextIter -> CString -> Int32 -> Ptr () -> IO ()
- type TextBufferInsertTextCallback = TextIter -> Text -> Int32 -> IO ()
- afterTextBufferInsertText :: (IsTextBuffer a, MonadIO m) => a -> TextBufferInsertTextCallback -> m SignalHandlerId
- genClosure_TextBufferInsertText :: MonadIO m => TextBufferInsertTextCallback -> m (GClosure C_TextBufferInsertTextCallback)
- mk_TextBufferInsertTextCallback :: C_TextBufferInsertTextCallback -> IO (FunPtr C_TextBufferInsertTextCallback)
- noTextBufferInsertTextCallback :: Maybe TextBufferInsertTextCallback
- onTextBufferInsertText :: (IsTextBuffer a, MonadIO m) => a -> TextBufferInsertTextCallback -> m SignalHandlerId
- wrap_TextBufferInsertTextCallback :: TextBufferInsertTextCallback -> C_TextBufferInsertTextCallback
- type C_TextBufferMarkDeletedCallback = Ptr () -> Ptr TextMark -> Ptr () -> IO ()
- type TextBufferMarkDeletedCallback = TextMark -> IO ()
- afterTextBufferMarkDeleted :: (IsTextBuffer a, MonadIO m) => a -> TextBufferMarkDeletedCallback -> m SignalHandlerId
- genClosure_TextBufferMarkDeleted :: MonadIO m => TextBufferMarkDeletedCallback -> m (GClosure C_TextBufferMarkDeletedCallback)
- mk_TextBufferMarkDeletedCallback :: C_TextBufferMarkDeletedCallback -> IO (FunPtr C_TextBufferMarkDeletedCallback)
- noTextBufferMarkDeletedCallback :: Maybe TextBufferMarkDeletedCallback
- onTextBufferMarkDeleted :: (IsTextBuffer a, MonadIO m) => a -> TextBufferMarkDeletedCallback -> m SignalHandlerId
- wrap_TextBufferMarkDeletedCallback :: TextBufferMarkDeletedCallback -> C_TextBufferMarkDeletedCallback
- type C_TextBufferMarkSetCallback = Ptr () -> Ptr TextIter -> Ptr TextMark -> Ptr () -> IO ()
- type TextBufferMarkSetCallback = TextIter -> TextMark -> IO ()
- afterTextBufferMarkSet :: (IsTextBuffer a, MonadIO m) => a -> TextBufferMarkSetCallback -> m SignalHandlerId
- genClosure_TextBufferMarkSet :: MonadIO m => TextBufferMarkSetCallback -> m (GClosure C_TextBufferMarkSetCallback)
- mk_TextBufferMarkSetCallback :: C_TextBufferMarkSetCallback -> IO (FunPtr C_TextBufferMarkSetCallback)
- noTextBufferMarkSetCallback :: Maybe TextBufferMarkSetCallback
- onTextBufferMarkSet :: (IsTextBuffer a, MonadIO m) => a -> TextBufferMarkSetCallback -> m SignalHandlerId
- wrap_TextBufferMarkSetCallback :: TextBufferMarkSetCallback -> C_TextBufferMarkSetCallback
- type C_TextBufferModifiedChangedCallback = Ptr () -> Ptr () -> IO ()
- type TextBufferModifiedChangedCallback = IO ()
- afterTextBufferModifiedChanged :: (IsTextBuffer a, MonadIO m) => a -> TextBufferModifiedChangedCallback -> m SignalHandlerId
- genClosure_TextBufferModifiedChanged :: MonadIO m => TextBufferModifiedChangedCallback -> m (GClosure C_TextBufferModifiedChangedCallback)
- mk_TextBufferModifiedChangedCallback :: C_TextBufferModifiedChangedCallback -> IO (FunPtr C_TextBufferModifiedChangedCallback)
- noTextBufferModifiedChangedCallback :: Maybe TextBufferModifiedChangedCallback
- onTextBufferModifiedChanged :: (IsTextBuffer a, MonadIO m) => a -> TextBufferModifiedChangedCallback -> m SignalHandlerId
- wrap_TextBufferModifiedChangedCallback :: TextBufferModifiedChangedCallback -> C_TextBufferModifiedChangedCallback
- type C_TextBufferPasteDoneCallback = Ptr () -> Ptr Clipboard -> Ptr () -> IO ()
- type TextBufferPasteDoneCallback = Clipboard -> IO ()
- afterTextBufferPasteDone :: (IsTextBuffer a, MonadIO m) => a -> TextBufferPasteDoneCallback -> m SignalHandlerId
- genClosure_TextBufferPasteDone :: MonadIO m => TextBufferPasteDoneCallback -> m (GClosure C_TextBufferPasteDoneCallback)
- mk_TextBufferPasteDoneCallback :: C_TextBufferPasteDoneCallback -> IO (FunPtr C_TextBufferPasteDoneCallback)
- noTextBufferPasteDoneCallback :: Maybe TextBufferPasteDoneCallback
- onTextBufferPasteDone :: (IsTextBuffer a, MonadIO m) => a -> TextBufferPasteDoneCallback -> m SignalHandlerId
- wrap_TextBufferPasteDoneCallback :: TextBufferPasteDoneCallback -> C_TextBufferPasteDoneCallback
- type C_TextBufferRedoCallback = Ptr () -> Ptr () -> IO ()
- type TextBufferRedoCallback = IO ()
- afterTextBufferRedo :: (IsTextBuffer a, MonadIO m) => a -> TextBufferRedoCallback -> m SignalHandlerId
- genClosure_TextBufferRedo :: MonadIO m => TextBufferRedoCallback -> m (GClosure C_TextBufferRedoCallback)
- mk_TextBufferRedoCallback :: C_TextBufferRedoCallback -> IO (FunPtr C_TextBufferRedoCallback)
- noTextBufferRedoCallback :: Maybe TextBufferRedoCallback
- onTextBufferRedo :: (IsTextBuffer a, MonadIO m) => a -> TextBufferRedoCallback -> m SignalHandlerId
- wrap_TextBufferRedoCallback :: TextBufferRedoCallback -> C_TextBufferRedoCallback
- type C_TextBufferRemoveTagCallback = Ptr () -> Ptr TextTag -> Ptr TextIter -> Ptr TextIter -> Ptr () -> IO ()
- type TextBufferRemoveTagCallback = TextTag -> TextIter -> TextIter -> IO ()
- afterTextBufferRemoveTag :: (IsTextBuffer a, MonadIO m) => a -> TextBufferRemoveTagCallback -> m SignalHandlerId
- genClosure_TextBufferRemoveTag :: MonadIO m => TextBufferRemoveTagCallback -> m (GClosure C_TextBufferRemoveTagCallback)
- mk_TextBufferRemoveTagCallback :: C_TextBufferRemoveTagCallback -> IO (FunPtr C_TextBufferRemoveTagCallback)
- noTextBufferRemoveTagCallback :: Maybe TextBufferRemoveTagCallback
- onTextBufferRemoveTag :: (IsTextBuffer a, MonadIO m) => a -> TextBufferRemoveTagCallback -> m SignalHandlerId
- wrap_TextBufferRemoveTagCallback :: TextBufferRemoveTagCallback -> C_TextBufferRemoveTagCallback
- type C_TextBufferUndoCallback = Ptr () -> Ptr () -> IO ()
- type TextBufferUndoCallback = IO ()
- afterTextBufferUndo :: (IsTextBuffer a, MonadIO m) => a -> TextBufferUndoCallback -> m SignalHandlerId
- genClosure_TextBufferUndo :: MonadIO m => TextBufferUndoCallback -> m (GClosure C_TextBufferUndoCallback)
- mk_TextBufferUndoCallback :: C_TextBufferUndoCallback -> IO (FunPtr C_TextBufferUndoCallback)
- noTextBufferUndoCallback :: Maybe TextBufferUndoCallback
- onTextBufferUndo :: (IsTextBuffer a, MonadIO m) => a -> TextBufferUndoCallback -> m SignalHandlerId
- wrap_TextBufferUndoCallback :: TextBufferUndoCallback -> C_TextBufferUndoCallback
Exported types
newtype TextBuffer Source #
Memory-managed wrapper type.
Instances
Eq TextBuffer Source # | |
Defined in GI.Gtk.Objects.TextBuffer (==) :: TextBuffer -> TextBuffer -> Bool # (/=) :: TextBuffer -> TextBuffer -> Bool # | |
IsGValue TextBuffer Source # | Convert |
Defined in GI.Gtk.Objects.TextBuffer toGValue :: TextBuffer -> IO GValue # fromGValue :: GValue -> IO TextBuffer # | |
ManagedPtrNewtype TextBuffer Source # | |
Defined in GI.Gtk.Objects.TextBuffer | |
TypedObject TextBuffer Source # | |
Defined in GI.Gtk.Objects.TextBuffer | |
GObject TextBuffer Source # | |
Defined in GI.Gtk.Objects.TextBuffer | |
HasParentTypes TextBuffer Source # | |
Defined in GI.Gtk.Objects.TextBuffer | |
type ParentTypes TextBuffer Source # | |
Defined in GI.Gtk.Objects.TextBuffer |
class (GObject o, IsDescendantOf TextBuffer o) => IsTextBuffer o Source #
Type class for types which can be safely cast to TextBuffer
, for instance with toTextBuffer
.
Instances
(GObject o, IsDescendantOf TextBuffer o) => IsTextBuffer o Source # | |
Defined in GI.Gtk.Objects.TextBuffer |
toTextBuffer :: (MonadIO m, IsTextBuffer o) => o -> m TextBuffer Source #
Cast to TextBuffer
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Overloaded methods
addMark
:: (HasCallStack, MonadIO m, IsTextBuffer a, IsTextMark b) | |
=> a |
|
-> b |
|
-> TextIter |
|
-> m () |
addSelectionClipboard
textBufferAddSelectionClipboard Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a, IsClipboard b) | |
=> a |
|
-> b |
|
-> m () |
Adds clipboard
to the list of clipboards in which the selection
contents of buffer
are available. In most cases, clipboard
will be
the Clipboard
returned by widgetGetPrimaryClipboard
for a view of buffer
.
applyTag
:: (HasCallStack, MonadIO m, IsTextBuffer a, IsTextTag b) | |
=> a |
|
-> b |
|
-> TextIter |
|
-> TextIter |
|
-> m () |
Emits the “apply-tag” signal on buffer
. The default
handler for the signal applies tag
to the given range.
start
and end
do not have to be in order.
applyTagByName
textBufferApplyTagByName Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Text |
|
-> TextIter |
|
-> TextIter |
|
-> m () |
Calls textTagTableLookup
on the buffer’s tag table to
get a TextTag
, then calls textBufferApplyTag
.
backspace
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> TextIter |
|
-> Bool |
|
-> Bool |
|
-> m Bool | Returns: |
Performs the appropriate action as if the user hit the delete
key with the cursor at the position specified by iter
. In the
normal case a single character will be deleted, but when
combining accents are involved, more than one character can
be deleted, and when precomposed character and accent combinations
are involved, less than one character will be deleted.
Because the buffer is modified, all outstanding iterators become
invalid after calling this function; however, the iter
will be
re-initialized to point to the location where text was deleted.
beginIrreversibleAction
textBufferBeginIrreversibleAction Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m () |
Denotes the beginning of an action that may not be undone. This will cause any previous operations in the undo/redo queue to be cleared.
This should be paired with a call to
textBufferEndIrreversibleAction
after the irreversible action
has completed.
You may nest calls to textBufferBeginIrreversibleAction
and
textBufferEndIrreversibleAction
pairs.
beginUserAction
textBufferBeginUserAction Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m () |
Called to indicate that the buffer operations between here and a
call to textBufferEndUserAction
are part of a single
user-visible operation. The operations between
textBufferBeginUserAction
and
textBufferEndUserAction
can then be grouped when creating
an undo stack. TextBuffer
maintains a count of calls to
textBufferBeginUserAction
that have not been closed with
a call to textBufferEndUserAction
, and emits the
“begin-user-action” and “end-user-action” signals only for the
outermost pair of calls. This allows you to build user actions
from other user actions.
The “interactive” buffer mutation functions, such as
textBufferInsertInteractive
, automatically call begin/end
user action around the buffer operations they perform, so there's
no need to add extra calls if you user action consists solely of a
single call to one of those functions.
copyClipboard
textBufferCopyClipboard Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a, IsClipboard b) | |
=> a |
|
-> b |
|
-> m () |
Copies the currently-selected text to a clipboard.
createChildAnchor
textBufferCreateChildAnchor Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> TextIter |
|
-> m TextChildAnchor | Returns: the created child anchor |
This is a convenience function which simply creates a child anchor
with textChildAnchorNew
and inserts it into the buffer
with textBufferInsertChildAnchor
. The new anchor is
owned by the buffer; no reference count is returned to
the caller of textBufferCreateChildAnchor
.
createMark
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Maybe Text |
|
-> TextIter |
|
-> Bool |
|
-> m TextMark | Returns: the new |
Creates a mark at position where
. If markName
is Nothing
, the mark
is anonymous; otherwise, the mark can be retrieved by name using
textBufferGetMark
. If a mark has left gravity, and text is
inserted at the mark’s current location, the mark will be moved to
the left of the newly-inserted text. If the mark has right gravity
(leftGravity
= False
), the mark will end up on the right of
newly-inserted text. The standard left-to-right cursor is a mark
with right gravity (when you type, the cursor stays on the right
side of the text you’re typing).
The caller of this function does not own a
reference to the returned TextMark
, so you can ignore the
return value if you like. Marks are owned by the buffer and go
away when the buffer does.
Emits the markSet signal as notification of the mark's initial placement.
cutClipboard
textBufferCutClipboard Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a, IsClipboard b) | |
=> a |
|
-> b |
|
-> Bool |
|
-> m () |
Copies the currently-selected text to a clipboard, then deletes said text if it’s editable.
delete
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> TextIter |
|
-> TextIter |
|
-> m () |
Deletes text between start
and end
. The order of start
and end
is not actually relevant; textBufferDelete
will reorder
them. This function actually emits the “delete-range” signal, and
the default handler of that signal deletes the text. Because the
buffer is modified, all outstanding iterators become invalid after
calling this function; however, the start
and end
will be
re-initialized to point to the location where text was deleted.
deleteInteractive
textBufferDeleteInteractive Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> TextIter |
|
-> TextIter |
|
-> Bool |
|
-> m Bool | Returns: whether some text was actually deleted |
Deletes all editable text in the given range.
Calls textBufferDelete
for each editable sub-range of
[start
,end
). start
and end
are revalidated to point to
the location of the last deleted range, or left untouched if
no text was deleted.
deleteMark
:: (HasCallStack, MonadIO m, IsTextBuffer a, IsTextMark b) | |
=> a |
|
-> b |
|
-> m () |
Deletes mark
, so that it’s no longer located anywhere in the
buffer. Removes the reference the buffer holds to the mark, so if
you haven’t called objectRef
on the mark, it will be freed. Even
if the mark isn’t freed, most operations on mark
become
invalid, until it gets added to a buffer again with
textBufferAddMark
. Use textMarkGetDeleted
to
find out if a mark has been removed from its buffer.
The markDeleted signal will be emitted as notification after
the mark is deleted.
deleteMarkByName
textBufferDeleteMarkByName Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Text |
|
-> m () |
Deletes the mark named name
; the mark must exist. See
textBufferDeleteMark
for details.
deleteSelection
textBufferDeleteSelection Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Bool |
|
-> Bool |
|
-> m Bool | Returns: whether there was a non-empty selection to delete |
Deletes the range between the “insert” and “selection_bound” marks,
that is, the currently-selected text. If interactive
is True
,
the editability of the selection will be considered (users can’t delete
uneditable text).
endIrreversibleAction
textBufferEndIrreversibleAction Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m () |
Denotes the end of an action that may not be undone. This will cause any previous operations in the undo/redo queue to be cleared.
This should be called after completing modifications to the text buffer
after textBufferBeginIrreversibleAction
was called.
You may nest calls to textBufferBeginIrreversibleAction
and
textBufferEndIrreversibleAction
pairs.
endUserAction
textBufferEndUserAction Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m () |
Should be paired with a call to textBufferBeginUserAction
.
See that function for a full explanation.
getBounds
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m (TextIter, TextIter) |
Retrieves the first and last iterators in the buffer, i.e. the
entire buffer lies within the range [start
,end
).
getCanRedo
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m Bool | Returns: |
Gets whether there is a redoable action in the history.
getCanUndo
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m Bool | Returns: |
Gets whether there is an undoable action in the history.
getCharCount
textBufferGetCharCount Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m Int32 | Returns: number of characters in the buffer |
Gets the number of characters in the buffer; note that characters and bytes are not the same, you can’t e.g. expect the contents of the buffer in string form to be this many bytes long. The character count is cached, so this function is very fast.
getEnableUndo
textBufferGetEnableUndo Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m Bool |
Gets whether the buffer is saving modifications to the buffer to allow for undo and redo actions.
See textBufferBeginIrreversibleAction
and
textBufferEndIrreversibleAction
to create changes to the buffer
that cannot be undone.
getEndIter
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m TextIter |
Initializes iter
with the “end iterator,” one past the last valid
character in the text buffer. If dereferenced with
textIterGetChar
, the end iterator has a character value of 0.
The entire buffer lies in the range from the first position in
the buffer (call textBufferGetStartIter
to get
character position 0) to the end iterator.
getHasSelection
textBufferGetHasSelection Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m Bool | Returns: |
Indicates whether the buffer has some text currently selected.
getInsert
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m TextMark | Returns: insertion point mark |
Returns the mark that represents the cursor (insertion point).
Equivalent to calling textBufferGetMark
to get the mark
named “insert”, but very slightly more efficient, and involves less
typing.
getIterAtChildAnchor
textBufferGetIterAtChildAnchor Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a, IsTextChildAnchor b) | |
=> a |
|
-> b |
|
-> m TextIter |
Obtains the location of anchor
within buffer
.
getIterAtLine
textBufferGetIterAtLine Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Int32 |
|
-> m TextIter |
Initializes iter
to the start of the given line. If lineNumber
is greater
than the number of lines in the buffer
, the end iterator is returned.
getIterAtLineIndex
textBufferGetIterAtLineIndex Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m TextIter |
Obtains an iterator pointing to byteIndex
within the given line.
byteIndex
must be the start of a UTF-8 character. Note bytes, not
characters; UTF-8 may encode one character as multiple bytes.
If lineNumber
is greater than the number of lines
in the buffer
, the end iterator is returned. And if byteIndex
is off the
end of the line, the iterator at the end of the line is returned.
getIterAtLineOffset
textBufferGetIterAtLineOffset Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m TextIter |
Obtains an iterator pointing to charOffset
within the given line. Note
characters, not bytes; UTF-8 may encode one character as multiple bytes.
Before the 3.20 version, it was not allowed to pass an invalid location.
If lineNumber
is greater than the number of lines
in the buffer
, the end iterator is returned. And if charOffset
is off the
end of the line, the iterator at the end of the line is returned.
getIterAtMark
textBufferGetIterAtMark Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a, IsTextMark b) | |
=> a |
|
-> b |
|
-> m TextIter |
Initializes iter
with the current position of mark
.
getIterAtOffset
textBufferGetIterAtOffset Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Int32 |
|
-> m TextIter |
Initializes iter
to a position charOffset
chars from the start
of the entire buffer. If charOffset
is -1 or greater than the number
of characters in the buffer, iter
is initialized to the end iterator,
the iterator one past the last valid character in the buffer.
getLineCount
textBufferGetLineCount Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m Int32 | Returns: number of lines in the buffer |
Obtains the number of lines in the buffer. This value is cached, so the function is very fast.
getMark
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Text |
|
-> m (Maybe TextMark) |
Returns the mark named name
in buffer buffer
, or Nothing
if no such
mark exists in the buffer.
getMaxUndoLevels
textBufferGetMaxUndoLevels Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m Word32 |
Gets the maximum number of undo levels to perform. If 0, unlimited undo actions may be performed. Note that this may have a memory usage impact as it requires storing an additional copy of the inserted or removed text within the text buffer.
getModified
textBufferGetModified Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m Bool | Returns: |
Indicates whether the buffer has been modified since the last call
to textBufferSetModified
set the modification flag to
False
. Used for example to enable a “save” function in a text
editor.
getSelectionBound
textBufferGetSelectionBound Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m TextMark | Returns: selection bound mark |
Returns the mark that represents the selection bound. Equivalent
to calling textBufferGetMark
to get the mark named
“selection_bound”, but very slightly more efficient, and involves
less typing.
The currently-selected text in buffer
is the region between the
“selection_bound” and “insert” marks. If “selection_bound” and
“insert” are in the same place, then there is no current selection.
textBufferGetSelectionBounds
is another convenient function
for handling the selection, if you just want to know whether there’s a
selection and what its bounds are.
getSelectionBounds
textBufferGetSelectionBounds Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m (Bool, TextIter, TextIter) | Returns: whether the selection has nonzero length |
Returns True
if some text is selected; places the bounds
of the selection in start
and end
(if the selection has length 0,
then start
and end
are filled in with the same value).
start
and end
will be in ascending order. If start
and end
are
NULL, then they are not filled in, but the return value still indicates
whether text is selected.
getSelectionContent
textBufferGetSelectionContent Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m ContentProvider | Returns: a new |
Get a content provider for this buffer.
getSlice
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> TextIter |
|
-> TextIter |
|
-> Bool |
|
-> m Text | Returns: an allocated UTF-8 string |
Returns the text in the range [start
,end
). Excludes undisplayed
text (text marked with tags that set the invisibility attribute) if
includeHiddenChars
is False
. The returned string includes a
0xFFFC character whenever the buffer contains
embedded images, so byte and character indexes into
the returned string do correspond to byte
and character indexes into the buffer. Contrast with
textBufferGetText
. Note that 0xFFFC can occur in normal
text as well, so it is not a reliable indicator that a paintable or
widget is in the buffer.
getStartIter
textBufferGetStartIter Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m TextIter |
Initialized iter
with the first position in the text buffer. This
is the same as using textBufferGetIterAtOffset
to get
the iter at character offset 0.
getTagTable
textBufferGetTagTable Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m TextTagTable | Returns: the buffer’s tag table |
Get the TextTagTable
associated with this buffer.
getText
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> TextIter |
|
-> TextIter |
|
-> Bool |
|
-> m Text | Returns: an allocated UTF-8 string |
Returns the text in the range [start
,end
). Excludes undisplayed
text (text marked with tags that set the invisibility attribute) if
includeHiddenChars
is False
. Does not include characters
representing embedded images, so byte and character indexes into
the returned string do not correspond to byte
and character indexes into the buffer. Contrast with
textBufferGetSlice
.
insert
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> TextIter |
|
-> Text |
|
-> Int32 |
|
-> m () |
Inserts len
bytes of text
at position iter
. If len
is -1,
text
must be nul-terminated and will be inserted in its
entirety. Emits the “insert-text” signal; insertion actually occurs
in the default handler for the signal. iter
is invalidated when
insertion occurs (because the buffer contents change), but the
default signal handler revalidates it to point to the end of the
inserted text.
insertAtCursor
textBufferInsertAtCursor Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Text |
|
-> Int32 |
|
-> m () |
Simply calls textBufferInsert
, using the current
cursor position as the insertion point.
insertChildAnchor
textBufferInsertChildAnchor Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a, IsTextChildAnchor b) | |
=> a |
|
-> TextIter |
|
-> b |
|
-> m () |
Inserts a child widget anchor into the text buffer at iter
. The
anchor will be counted as one character in character counts, and
when obtaining the buffer contents as a string, will be represented
by the Unicode “object replacement character” 0xFFFC. Note that the
“slice” variants for obtaining portions of the buffer as a string
include this character for child anchors, but the “text” variants do
not. E.g. see textBufferGetSlice
and
textBufferGetText
. Consider
textBufferCreateChildAnchor
as a more convenient
alternative to this function. The buffer will add a reference to
the anchor, so you can unref it after insertion.
insertInteractive
textBufferInsertInteractive Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> TextIter |
|
-> Text |
|
-> Int32 |
|
-> Bool |
|
-> m Bool | Returns: whether text was actually inserted |
Like textBufferInsert
, but the insertion will not occur if
iter
is at a non-editable location in the buffer. Usually you
want to prevent insertions at ineditable locations if the insertion
results from a user action (is interactive).
defaultEditable
indicates the editability of text that doesn't
have a tag affecting editability applied to it. Typically the
result of textViewGetEditable
is appropriate here.
insertInteractiveAtCursor
textBufferInsertInteractiveAtCursor Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Text |
|
-> Int32 |
|
-> Bool |
|
-> m Bool | Returns: whether text was actually inserted |
Calls textBufferInsertInteractive
at the cursor
position.
defaultEditable
indicates the editability of text that doesn't
have a tag affecting editability applied to it. Typically the
result of textViewGetEditable
is appropriate here.
insertMarkup
textBufferInsertMarkup Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> TextIter |
|
-> Text |
|
-> Int32 |
|
-> m () |
Inserts the text in markup
at position iter
. markup
will be inserted
in its entirety and must be nul-terminated and valid UTF-8. Emits the
insertText signal, possibly multiple times; insertion
actually occurs in the default handler for the signal. iter
will point
to the end of the inserted text on return.
insertPaintable
textBufferInsertPaintable Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a, IsPaintable b) | |
=> a |
|
-> TextIter |
|
-> b |
|
-> m () |
Inserts an image into the text buffer at iter
. The image will be
counted as one character in character counts, and when obtaining
the buffer contents as a string, will be represented by the Unicode
“object replacement character” 0xFFFC. Note that the “slice”
variants for obtaining portions of the buffer as a string include
this character for paintable, but the “text” variants do
not. e.g. see textBufferGetSlice
and
textBufferGetText
.
insertRange
textBufferInsertRange Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> TextIter |
|
-> TextIter |
|
-> TextIter |
|
-> m () |
Copies text, tags, and paintables between start
and end
(the order
of start
and end
doesn’t matter) and inserts the copy at iter
.
Used instead of simply getting/inserting text because it preserves
images and tags. If start
and end
are in a different buffer from
buffer
, the two buffers must share the same tag table.
Implemented via emissions of the insert_text and apply_tag signals, so expect those.
insertRangeInteractive
textBufferInsertRangeInteractive Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> TextIter |
|
-> TextIter |
|
-> TextIter |
|
-> Bool |
|
-> m Bool | Returns: whether an insertion was possible at |
Same as textBufferInsertRange
, but does nothing if the
insertion point isn’t editable. The defaultEditable
parameter
indicates whether the text is editable at iter
if no tags
enclosing iter
affect editability. Typically the result of
textViewGetEditable
is appropriate here.
moveMark
:: (HasCallStack, MonadIO m, IsTextBuffer a, IsTextMark b) | |
=> a |
|
-> b |
|
-> TextIter |
|
-> m () |
Moves mark
to the new location where
. Emits the markSet
signal as notification of the move.
moveMarkByName
textBufferMoveMarkByName Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Text |
|
-> TextIter |
|
-> m () |
Moves the mark named name
(which must exist) to location where
.
See textBufferMoveMark
for details.
new
:: (HasCallStack, MonadIO m, IsTextTagTable a) | |
=> Maybe a |
|
-> m TextBuffer | Returns: a new text buffer |
Creates a new text buffer.
pasteClipboard
textBufferPasteClipboard Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a, IsClipboard b) | |
=> a |
|
-> b |
|
-> Maybe TextIter |
|
-> Bool |
|
-> m () |
Pastes the contents of a clipboard. If overrideLocation
is Nothing
, the
pasted text will be inserted at the cursor position, or the buffer selection
will be replaced if the selection is non-empty.
Note: pasting is asynchronous, that is, we’ll ask for the paste data and return, and at some point later after the main loop runs, the paste data will be inserted.
placeCursor
textBufferPlaceCursor Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> TextIter |
|
-> m () |
This function moves the “insert” and “selection_bound” marks
simultaneously. If you move them to the same place in two steps
with textBufferMoveMark
, you will temporarily select a
region in between their old and new locations, which can be pretty
inefficient since the temporarily-selected region will force stuff
to be recalculated. This function moves them as a unit, which can
be optimized.
redo
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m () |
Redoes the next redoable action on the buffer, if there is one.
removeAllTags
textBufferRemoveAllTags Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> TextIter |
|
-> TextIter |
|
-> m () |
Removes all tags in the range between start
and end
. Be careful
with this function; it could remove tags added in code unrelated to
the code you’re currently writing. That is, using this function is
probably a bad idea if you have two or more unrelated code sections
that add tags.
removeSelectionClipboard
textBufferRemoveSelectionClipboard Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a, IsClipboard b) | |
=> a |
|
-> b |
|
-> m () |
Removes a Clipboard
added with
textBufferAddSelectionClipboard
.
removeTag
:: (HasCallStack, MonadIO m, IsTextBuffer a, IsTextTag b) | |
=> a |
|
-> b |
|
-> TextIter |
|
-> TextIter |
|
-> m () |
Emits the “remove-tag” signal. The default handler for the signal
removes all occurrences of tag
from the given range. start
and
end
don’t have to be in order.
removeTagByName
textBufferRemoveTagByName Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Text |
|
-> TextIter |
|
-> TextIter |
|
-> m () |
Calls textTagTableLookup
on the buffer’s tag table to
get a TextTag
, then calls textBufferRemoveTag
.
selectRange
textBufferSelectRange Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> TextIter |
|
-> TextIter |
|
-> m () |
This function moves the “insert” and “selection_bound” marks
simultaneously. If you move them in two steps
with textBufferMoveMark
, you will temporarily select a
region in between their old and new locations, which can be pretty
inefficient since the temporarily-selected region will force stuff
to be recalculated. This function moves them as a unit, which can
be optimized.
setEnableUndo
textBufferSetEnableUndo Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether or not to enable undoable actions in the text buffer. If
enabled, the user will be able to undo the last number of actions up to
textBufferGetMaxUndoLevels
.
See textBufferBeginIrreversibleAction
and
textBufferEndIrreversibleAction
to create changes to the buffer
that cannot be undone.
setMaxUndoLevels
textBufferSetMaxUndoLevels Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the maximum number of undo levels to perform. If 0, unlimited undo actions may be performed. Note that this may have a memory usage impact as it requires storing an additional copy of the inserted or removed text within the text buffer.
setModified
textBufferSetModified Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Bool |
|
-> m () |
Used to keep track of whether the buffer has been modified since the
last time it was saved. Whenever the buffer is saved to disk, call
gtk_text_buffer_set_modified (buffer
, FALSE). When the buffer is modified,
it will automatically toggled on the modified bit again. When the modified
bit flips, the buffer emits the modifiedChanged signal.
setText
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Text |
|
-> Int32 |
|
-> m () |
Deletes current contents of buffer
, and inserts text
instead. If
len
is -1, text
must be nul-terminated. text
must be valid UTF-8.
undo
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m () |
Undoes the last undoable action on the buffer, if there is one.
Properties
canRedo
The TextBuffer
:can-redo
property denotes that the buffer can reapply the
last undone action.
getTextBufferCanRedo :: (MonadIO m, IsTextBuffer o) => o -> m Bool Source #
Get the value of the “can-redo
” property.
When overloading is enabled, this is equivalent to
get
textBuffer #canRedo
canUndo
The TextBuffer
:can-undo
property denotes that the buffer can undo the last
applied action.
getTextBufferCanUndo :: (MonadIO m, IsTextBuffer o) => o -> m Bool Source #
Get the value of the “can-undo
” property.
When overloading is enabled, this is equivalent to
get
textBuffer #canUndo
copyTargetList
The list of targets this buffer supports for clipboard copying and as DND source.
getTextBufferCopyTargetList :: (MonadIO m, IsTextBuffer o) => o -> m (Maybe ContentFormats) Source #
Get the value of the “copy-target-list
” property.
When overloading is enabled, this is equivalent to
get
textBuffer #copyTargetList
cursorPosition
The position of the insert mark (as offset from the beginning of the buffer). It is useful for getting notified when the cursor moves.
getTextBufferCursorPosition :: (MonadIO m, IsTextBuffer o) => o -> m Int32 Source #
Get the value of the “cursor-position
” property.
When overloading is enabled, this is equivalent to
get
textBuffer #cursorPosition
enableUndo
The TextBuffer
:enable-undo
property denotes if support for undoing and
redoing changes to the buffer is allowed.
constructTextBufferEnableUndo :: (IsTextBuffer o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “enable-undo
” property. This is rarely needed directly, but it is used by new
.
getTextBufferEnableUndo :: (MonadIO m, IsTextBuffer o) => o -> m Bool Source #
Get the value of the “enable-undo
” property.
When overloading is enabled, this is equivalent to
get
textBuffer #enableUndo
setTextBufferEnableUndo :: (MonadIO m, IsTextBuffer o) => o -> Bool -> m () Source #
Set the value of the “enable-undo
” property.
When overloading is enabled, this is equivalent to
set
textBuffer [ #enableUndo:=
value ]
hasSelection
Whether the buffer has some text currently selected.
getTextBufferHasSelection :: (MonadIO m, IsTextBuffer o) => o -> m Bool Source #
Get the value of the “has-selection
” property.
When overloading is enabled, this is equivalent to
get
textBuffer #hasSelection
pasteTargetList
The list of targets this buffer supports for clipboard pasting and as DND destination.
getTextBufferPasteTargetList :: (MonadIO m, IsTextBuffer o) => o -> m (Maybe ContentFormats) Source #
Get the value of the “paste-target-list
” property.
When overloading is enabled, this is equivalent to
get
textBuffer #pasteTargetList
tagTable
No description available in the introspection data.
constructTextBufferTagTable :: (IsTextBuffer o, MonadIO m, IsTextTagTable a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “tag-table
” property. This is rarely needed directly, but it is used by new
.
getTextBufferTagTable :: (MonadIO m, IsTextBuffer o) => o -> m TextTagTable Source #
Get the value of the “tag-table
” property.
When overloading is enabled, this is equivalent to
get
textBuffer #tagTable
text
The text content of the buffer. Without child widgets and images,
see textBufferGetText
for more information.
clearTextBufferText :: (MonadIO m, IsTextBuffer o) => o -> m () Source #
Set the value of the “text
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#text
constructTextBufferText :: (IsTextBuffer o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “text
” property. This is rarely needed directly, but it is used by new
.
getTextBufferText :: (MonadIO m, IsTextBuffer o) => o -> m (Maybe Text) Source #
Get the value of the “text
” property.
When overloading is enabled, this is equivalent to
get
textBuffer #text
setTextBufferText :: (MonadIO m, IsTextBuffer o) => o -> Text -> m () Source #
Set the value of the “text
” property.
When overloading is enabled, this is equivalent to
set
textBuffer [ #text:=
value ]
Signals
applyTag
type C_TextBufferApplyTagCallback = Ptr () -> Ptr TextTag -> Ptr TextIter -> Ptr TextIter -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type TextBufferApplyTagCallback Source #
= TextTag |
|
-> TextIter |
|
-> TextIter |
|
-> IO () |
The applyTag signal is emitted to apply a tag to a
range of text in a TextBuffer
.
Applying actually occurs in the default handler.
Note that if your handler runs before the default handler it must not
invalidate the start
and end
iters (or has to revalidate them).
See also:
textBufferApplyTag
,
gtk_text_buffer_insert_with_tags()
,
textBufferInsertRange
.
afterTextBufferApplyTag :: (IsTextBuffer a, MonadIO m) => a -> TextBufferApplyTagCallback -> m SignalHandlerId Source #
Connect a signal handler for the applyTag signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
textBuffer #applyTag callback
genClosure_TextBufferApplyTag :: MonadIO m => TextBufferApplyTagCallback -> m (GClosure C_TextBufferApplyTagCallback) Source #
Wrap the callback into a GClosure
.
mk_TextBufferApplyTagCallback :: C_TextBufferApplyTagCallback -> IO (FunPtr C_TextBufferApplyTagCallback) Source #
Generate a function pointer callable from C code, from a C_TextBufferApplyTagCallback
.
noTextBufferApplyTagCallback :: Maybe TextBufferApplyTagCallback Source #
A convenience synonym for
.Nothing
:: Maybe
TextBufferApplyTagCallback
onTextBufferApplyTag :: (IsTextBuffer a, MonadIO m) => a -> TextBufferApplyTagCallback -> m SignalHandlerId Source #
Connect a signal handler for the applyTag signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
textBuffer #applyTag callback
wrap_TextBufferApplyTagCallback :: TextBufferApplyTagCallback -> C_TextBufferApplyTagCallback Source #
Wrap a TextBufferApplyTagCallback
into a C_TextBufferApplyTagCallback
.
beginUserAction
type C_TextBufferBeginUserActionCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type TextBufferBeginUserActionCallback = IO () Source #
The beginUserAction signal is emitted at the beginning of a single
user-visible operation on a TextBuffer
.
See also:
textBufferBeginUserAction
,
textBufferInsertInteractive
,
textBufferInsertRangeInteractive
,
textBufferDeleteInteractive
,
textBufferBackspace
,
textBufferDeleteSelection
.
afterTextBufferBeginUserAction :: (IsTextBuffer a, MonadIO m) => a -> TextBufferBeginUserActionCallback -> m SignalHandlerId Source #
Connect a signal handler for the beginUserAction signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
textBuffer #beginUserAction callback
genClosure_TextBufferBeginUserAction :: MonadIO m => TextBufferBeginUserActionCallback -> m (GClosure C_TextBufferBeginUserActionCallback) Source #
Wrap the callback into a GClosure
.
mk_TextBufferBeginUserActionCallback :: C_TextBufferBeginUserActionCallback -> IO (FunPtr C_TextBufferBeginUserActionCallback) Source #
Generate a function pointer callable from C code, from a C_TextBufferBeginUserActionCallback
.
noTextBufferBeginUserActionCallback :: Maybe TextBufferBeginUserActionCallback Source #
A convenience synonym for
.Nothing
:: Maybe
TextBufferBeginUserActionCallback
onTextBufferBeginUserAction :: (IsTextBuffer a, MonadIO m) => a -> TextBufferBeginUserActionCallback -> m SignalHandlerId Source #
Connect a signal handler for the beginUserAction signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
textBuffer #beginUserAction callback
wrap_TextBufferBeginUserActionCallback :: TextBufferBeginUserActionCallback -> C_TextBufferBeginUserActionCallback Source #
changed
type C_TextBufferChangedCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type TextBufferChangedCallback = IO () Source #
The changed signal is emitted when the content of a TextBuffer
has changed.
afterTextBufferChanged :: (IsTextBuffer a, MonadIO m) => a -> TextBufferChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the changed signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
textBuffer #changed callback
genClosure_TextBufferChanged :: MonadIO m => TextBufferChangedCallback -> m (GClosure C_TextBufferChangedCallback) Source #
Wrap the callback into a GClosure
.
mk_TextBufferChangedCallback :: C_TextBufferChangedCallback -> IO (FunPtr C_TextBufferChangedCallback) Source #
Generate a function pointer callable from C code, from a C_TextBufferChangedCallback
.
noTextBufferChangedCallback :: Maybe TextBufferChangedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
TextBufferChangedCallback
onTextBufferChanged :: (IsTextBuffer a, MonadIO m) => a -> TextBufferChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the changed signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
textBuffer #changed callback
wrap_TextBufferChangedCallback :: TextBufferChangedCallback -> C_TextBufferChangedCallback Source #
Wrap a TextBufferChangedCallback
into a C_TextBufferChangedCallback
.
deleteRange
type C_TextBufferDeleteRangeCallback = Ptr () -> Ptr TextIter -> Ptr TextIter -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type TextBufferDeleteRangeCallback Source #
= TextIter |
|
-> TextIter |
|
-> IO () |
The deleteRange signal is emitted to delete a range
from a TextBuffer
.
Note that if your handler runs before the default handler it must not
invalidate the start
and end
iters (or has to revalidate them).
The default signal handler revalidates the start
and end
iters to
both point to the location where text was deleted. Handlers
which run after the default handler (see g_signal_connect_after()
)
do not have access to the deleted text.
See also: textBufferDelete
.
afterTextBufferDeleteRange :: (IsTextBuffer a, MonadIO m) => a -> TextBufferDeleteRangeCallback -> m SignalHandlerId Source #
Connect a signal handler for the deleteRange signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
textBuffer #deleteRange callback
genClosure_TextBufferDeleteRange :: MonadIO m => TextBufferDeleteRangeCallback -> m (GClosure C_TextBufferDeleteRangeCallback) Source #
Wrap the callback into a GClosure
.
mk_TextBufferDeleteRangeCallback :: C_TextBufferDeleteRangeCallback -> IO (FunPtr C_TextBufferDeleteRangeCallback) Source #
Generate a function pointer callable from C code, from a C_TextBufferDeleteRangeCallback
.
noTextBufferDeleteRangeCallback :: Maybe TextBufferDeleteRangeCallback Source #
A convenience synonym for
.Nothing
:: Maybe
TextBufferDeleteRangeCallback
onTextBufferDeleteRange :: (IsTextBuffer a, MonadIO m) => a -> TextBufferDeleteRangeCallback -> m SignalHandlerId Source #
Connect a signal handler for the deleteRange signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
textBuffer #deleteRange callback
wrap_TextBufferDeleteRangeCallback :: TextBufferDeleteRangeCallback -> C_TextBufferDeleteRangeCallback Source #
Wrap a TextBufferDeleteRangeCallback
into a C_TextBufferDeleteRangeCallback
.
endUserAction
type C_TextBufferEndUserActionCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type TextBufferEndUserActionCallback = IO () Source #
The endUserAction signal is emitted at the end of a single
user-visible operation on the TextBuffer
.
See also:
textBufferEndUserAction
,
textBufferInsertInteractive
,
textBufferInsertRangeInteractive
,
textBufferDeleteInteractive
,
textBufferBackspace
,
textBufferDeleteSelection
,
textBufferBackspace
.
afterTextBufferEndUserAction :: (IsTextBuffer a, MonadIO m) => a -> TextBufferEndUserActionCallback -> m SignalHandlerId Source #
Connect a signal handler for the endUserAction signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
textBuffer #endUserAction callback
genClosure_TextBufferEndUserAction :: MonadIO m => TextBufferEndUserActionCallback -> m (GClosure C_TextBufferEndUserActionCallback) Source #
Wrap the callback into a GClosure
.
mk_TextBufferEndUserActionCallback :: C_TextBufferEndUserActionCallback -> IO (FunPtr C_TextBufferEndUserActionCallback) Source #
Generate a function pointer callable from C code, from a C_TextBufferEndUserActionCallback
.
noTextBufferEndUserActionCallback :: Maybe TextBufferEndUserActionCallback Source #
A convenience synonym for
.Nothing
:: Maybe
TextBufferEndUserActionCallback
onTextBufferEndUserAction :: (IsTextBuffer a, MonadIO m) => a -> TextBufferEndUserActionCallback -> m SignalHandlerId Source #
Connect a signal handler for the endUserAction signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
textBuffer #endUserAction callback
wrap_TextBufferEndUserActionCallback :: TextBufferEndUserActionCallback -> C_TextBufferEndUserActionCallback Source #
Wrap a TextBufferEndUserActionCallback
into a C_TextBufferEndUserActionCallback
.
insertChildAnchor
type C_TextBufferInsertChildAnchorCallback = Ptr () -> Ptr TextIter -> Ptr TextChildAnchor -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type TextBufferInsertChildAnchorCallback Source #
= TextIter |
|
-> TextChildAnchor |
|
-> IO () |
The insertChildAnchor signal is emitted to insert a
TextChildAnchor
in a TextBuffer
.
Insertion actually occurs in the default handler.
Note that if your handler runs before the default handler it must
not invalidate the location
iter (or has to revalidate it).
The default signal handler revalidates it to be placed after the
inserted anchor
.
See also: textBufferInsertChildAnchor
.
afterTextBufferInsertChildAnchor :: (IsTextBuffer a, MonadIO m) => a -> TextBufferInsertChildAnchorCallback -> m SignalHandlerId Source #
Connect a signal handler for the insertChildAnchor signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
textBuffer #insertChildAnchor callback
genClosure_TextBufferInsertChildAnchor :: MonadIO m => TextBufferInsertChildAnchorCallback -> m (GClosure C_TextBufferInsertChildAnchorCallback) Source #
Wrap the callback into a GClosure
.
mk_TextBufferInsertChildAnchorCallback :: C_TextBufferInsertChildAnchorCallback -> IO (FunPtr C_TextBufferInsertChildAnchorCallback) Source #
Generate a function pointer callable from C code, from a C_TextBufferInsertChildAnchorCallback
.
noTextBufferInsertChildAnchorCallback :: Maybe TextBufferInsertChildAnchorCallback Source #
A convenience synonym for
.Nothing
:: Maybe
TextBufferInsertChildAnchorCallback
onTextBufferInsertChildAnchor :: (IsTextBuffer a, MonadIO m) => a -> TextBufferInsertChildAnchorCallback -> m SignalHandlerId Source #
Connect a signal handler for the insertChildAnchor signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
textBuffer #insertChildAnchor callback
wrap_TextBufferInsertChildAnchorCallback :: TextBufferInsertChildAnchorCallback -> C_TextBufferInsertChildAnchorCallback Source #
insertPaintable
type C_TextBufferInsertPaintableCallback = Ptr () -> Ptr TextIter -> Ptr Paintable -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type TextBufferInsertPaintableCallback Source #
= TextIter |
|
-> Paintable |
|
-> IO () |
The insertPaintable signal is emitted to insert a Paintable
in a TextBuffer
. Insertion actually occurs in the default handler.
Note that if your handler runs before the default handler it must not
invalidate the location
iter (or has to revalidate it).
The default signal handler revalidates it to be placed after the
inserted paintable
.
See also: textBufferInsertPaintable
.
afterTextBufferInsertPaintable :: (IsTextBuffer a, MonadIO m) => a -> TextBufferInsertPaintableCallback -> m SignalHandlerId Source #
Connect a signal handler for the insertPaintable signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
textBuffer #insertPaintable callback
genClosure_TextBufferInsertPaintable :: MonadIO m => TextBufferInsertPaintableCallback -> m (GClosure C_TextBufferInsertPaintableCallback) Source #
Wrap the callback into a GClosure
.
mk_TextBufferInsertPaintableCallback :: C_TextBufferInsertPaintableCallback -> IO (FunPtr C_TextBufferInsertPaintableCallback) Source #
Generate a function pointer callable from C code, from a C_TextBufferInsertPaintableCallback
.
noTextBufferInsertPaintableCallback :: Maybe TextBufferInsertPaintableCallback Source #
A convenience synonym for
.Nothing
:: Maybe
TextBufferInsertPaintableCallback
onTextBufferInsertPaintable :: (IsTextBuffer a, MonadIO m) => a -> TextBufferInsertPaintableCallback -> m SignalHandlerId Source #
Connect a signal handler for the insertPaintable signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
textBuffer #insertPaintable callback
wrap_TextBufferInsertPaintableCallback :: TextBufferInsertPaintableCallback -> C_TextBufferInsertPaintableCallback Source #
insertText
type C_TextBufferInsertTextCallback = Ptr () -> Ptr TextIter -> CString -> Int32 -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type TextBufferInsertTextCallback Source #
= TextIter |
|
-> Text |
|
-> Int32 |
|
-> IO () |
The insertText signal is emitted to insert text in a TextBuffer
.
Insertion actually occurs in the default handler.
Note that if your handler runs before the default handler it must not
invalidate the location
iter (or has to revalidate it).
The default signal handler revalidates it to point to the end of the
inserted text.
See also:
textBufferInsert
,
textBufferInsertRange
.
afterTextBufferInsertText :: (IsTextBuffer a, MonadIO m) => a -> TextBufferInsertTextCallback -> m SignalHandlerId Source #
Connect a signal handler for the insertText signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
textBuffer #insertText callback
genClosure_TextBufferInsertText :: MonadIO m => TextBufferInsertTextCallback -> m (GClosure C_TextBufferInsertTextCallback) Source #
Wrap the callback into a GClosure
.
mk_TextBufferInsertTextCallback :: C_TextBufferInsertTextCallback -> IO (FunPtr C_TextBufferInsertTextCallback) Source #
Generate a function pointer callable from C code, from a C_TextBufferInsertTextCallback
.
noTextBufferInsertTextCallback :: Maybe TextBufferInsertTextCallback Source #
A convenience synonym for
.Nothing
:: Maybe
TextBufferInsertTextCallback
onTextBufferInsertText :: (IsTextBuffer a, MonadIO m) => a -> TextBufferInsertTextCallback -> m SignalHandlerId Source #
Connect a signal handler for the insertText signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
textBuffer #insertText callback
wrap_TextBufferInsertTextCallback :: TextBufferInsertTextCallback -> C_TextBufferInsertTextCallback Source #
Wrap a TextBufferInsertTextCallback
into a C_TextBufferInsertTextCallback
.
markDeleted
type C_TextBufferMarkDeletedCallback = Ptr () -> Ptr TextMark -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type TextBufferMarkDeletedCallback Source #
The markDeleted signal is emitted as notification
after a TextMark
is deleted.
See also:
textBufferDeleteMark
.
afterTextBufferMarkDeleted :: (IsTextBuffer a, MonadIO m) => a -> TextBufferMarkDeletedCallback -> m SignalHandlerId Source #
Connect a signal handler for the markDeleted signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
textBuffer #markDeleted callback
genClosure_TextBufferMarkDeleted :: MonadIO m => TextBufferMarkDeletedCallback -> m (GClosure C_TextBufferMarkDeletedCallback) Source #
Wrap the callback into a GClosure
.
mk_TextBufferMarkDeletedCallback :: C_TextBufferMarkDeletedCallback -> IO (FunPtr C_TextBufferMarkDeletedCallback) Source #
Generate a function pointer callable from C code, from a C_TextBufferMarkDeletedCallback
.
noTextBufferMarkDeletedCallback :: Maybe TextBufferMarkDeletedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
TextBufferMarkDeletedCallback
onTextBufferMarkDeleted :: (IsTextBuffer a, MonadIO m) => a -> TextBufferMarkDeletedCallback -> m SignalHandlerId Source #
Connect a signal handler for the markDeleted signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
textBuffer #markDeleted callback
wrap_TextBufferMarkDeletedCallback :: TextBufferMarkDeletedCallback -> C_TextBufferMarkDeletedCallback Source #
Wrap a TextBufferMarkDeletedCallback
into a C_TextBufferMarkDeletedCallback
.
markSet
type C_TextBufferMarkSetCallback = Ptr () -> Ptr TextIter -> Ptr TextMark -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type TextBufferMarkSetCallback Source #
The markSet signal is emitted as notification
after a TextMark
is set.
See also:
textBufferCreateMark
,
textBufferMoveMark
.
afterTextBufferMarkSet :: (IsTextBuffer a, MonadIO m) => a -> TextBufferMarkSetCallback -> m SignalHandlerId Source #
Connect a signal handler for the markSet signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
textBuffer #markSet callback
genClosure_TextBufferMarkSet :: MonadIO m => TextBufferMarkSetCallback -> m (GClosure C_TextBufferMarkSetCallback) Source #
Wrap the callback into a GClosure
.
mk_TextBufferMarkSetCallback :: C_TextBufferMarkSetCallback -> IO (FunPtr C_TextBufferMarkSetCallback) Source #
Generate a function pointer callable from C code, from a C_TextBufferMarkSetCallback
.
noTextBufferMarkSetCallback :: Maybe TextBufferMarkSetCallback Source #
A convenience synonym for
.Nothing
:: Maybe
TextBufferMarkSetCallback
onTextBufferMarkSet :: (IsTextBuffer a, MonadIO m) => a -> TextBufferMarkSetCallback -> m SignalHandlerId Source #
Connect a signal handler for the markSet signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
textBuffer #markSet callback
wrap_TextBufferMarkSetCallback :: TextBufferMarkSetCallback -> C_TextBufferMarkSetCallback Source #
Wrap a TextBufferMarkSetCallback
into a C_TextBufferMarkSetCallback
.
modifiedChanged
type C_TextBufferModifiedChangedCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type TextBufferModifiedChangedCallback = IO () Source #
The modifiedChanged signal is emitted when the modified bit of a
TextBuffer
flips.
See also:
textBufferSetModified
.
afterTextBufferModifiedChanged :: (IsTextBuffer a, MonadIO m) => a -> TextBufferModifiedChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the modifiedChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
textBuffer #modifiedChanged callback
genClosure_TextBufferModifiedChanged :: MonadIO m => TextBufferModifiedChangedCallback -> m (GClosure C_TextBufferModifiedChangedCallback) Source #
Wrap the callback into a GClosure
.
mk_TextBufferModifiedChangedCallback :: C_TextBufferModifiedChangedCallback -> IO (FunPtr C_TextBufferModifiedChangedCallback) Source #
Generate a function pointer callable from C code, from a C_TextBufferModifiedChangedCallback
.
noTextBufferModifiedChangedCallback :: Maybe TextBufferModifiedChangedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
TextBufferModifiedChangedCallback
onTextBufferModifiedChanged :: (IsTextBuffer a, MonadIO m) => a -> TextBufferModifiedChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the modifiedChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
textBuffer #modifiedChanged callback
wrap_TextBufferModifiedChangedCallback :: TextBufferModifiedChangedCallback -> C_TextBufferModifiedChangedCallback Source #
pasteDone
type C_TextBufferPasteDoneCallback = Ptr () -> Ptr Clipboard -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type TextBufferPasteDoneCallback Source #
The paste-done signal is emitted after paste operation has been completed.
This is useful to properly scroll the view to the end of the pasted text.
See textBufferPasteClipboard
for more details.
afterTextBufferPasteDone :: (IsTextBuffer a, MonadIO m) => a -> TextBufferPasteDoneCallback -> m SignalHandlerId Source #
Connect a signal handler for the pasteDone signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
textBuffer #pasteDone callback
genClosure_TextBufferPasteDone :: MonadIO m => TextBufferPasteDoneCallback -> m (GClosure C_TextBufferPasteDoneCallback) Source #
Wrap the callback into a GClosure
.
mk_TextBufferPasteDoneCallback :: C_TextBufferPasteDoneCallback -> IO (FunPtr C_TextBufferPasteDoneCallback) Source #
Generate a function pointer callable from C code, from a C_TextBufferPasteDoneCallback
.
noTextBufferPasteDoneCallback :: Maybe TextBufferPasteDoneCallback Source #
A convenience synonym for
.Nothing
:: Maybe
TextBufferPasteDoneCallback
onTextBufferPasteDone :: (IsTextBuffer a, MonadIO m) => a -> TextBufferPasteDoneCallback -> m SignalHandlerId Source #
Connect a signal handler for the pasteDone signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
textBuffer #pasteDone callback
wrap_TextBufferPasteDoneCallback :: TextBufferPasteDoneCallback -> C_TextBufferPasteDoneCallback Source #
Wrap a TextBufferPasteDoneCallback
into a C_TextBufferPasteDoneCallback
.
redo
type C_TextBufferRedoCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type TextBufferRedoCallback = IO () Source #
The "redo" signal is emitted when a request has been made to redo the previously undone operation.
afterTextBufferRedo :: (IsTextBuffer a, MonadIO m) => a -> TextBufferRedoCallback -> m SignalHandlerId Source #
Connect a signal handler for the redo signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
textBuffer #redo callback
genClosure_TextBufferRedo :: MonadIO m => TextBufferRedoCallback -> m (GClosure C_TextBufferRedoCallback) Source #
Wrap the callback into a GClosure
.
mk_TextBufferRedoCallback :: C_TextBufferRedoCallback -> IO (FunPtr C_TextBufferRedoCallback) Source #
Generate a function pointer callable from C code, from a C_TextBufferRedoCallback
.
noTextBufferRedoCallback :: Maybe TextBufferRedoCallback Source #
A convenience synonym for
.Nothing
:: Maybe
TextBufferRedoCallback
onTextBufferRedo :: (IsTextBuffer a, MonadIO m) => a -> TextBufferRedoCallback -> m SignalHandlerId Source #
Connect a signal handler for the redo signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
textBuffer #redo callback
wrap_TextBufferRedoCallback :: TextBufferRedoCallback -> C_TextBufferRedoCallback Source #
Wrap a TextBufferRedoCallback
into a C_TextBufferRedoCallback
.
removeTag
type C_TextBufferRemoveTagCallback = Ptr () -> Ptr TextTag -> Ptr TextIter -> Ptr TextIter -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type TextBufferRemoveTagCallback Source #
= TextTag |
|
-> TextIter |
|
-> TextIter |
|
-> IO () |
The removeTag signal is emitted to remove all occurrences
of tag
from a range of text in a TextBuffer
.
Removal actually occurs in the default handler.
Note that if your handler runs before the default handler it must not
invalidate the start
and end
iters (or has to revalidate them).
See also:
textBufferRemoveTag
.
afterTextBufferRemoveTag :: (IsTextBuffer a, MonadIO m) => a -> TextBufferRemoveTagCallback -> m SignalHandlerId Source #
Connect a signal handler for the removeTag signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
textBuffer #removeTag callback
genClosure_TextBufferRemoveTag :: MonadIO m => TextBufferRemoveTagCallback -> m (GClosure C_TextBufferRemoveTagCallback) Source #
Wrap the callback into a GClosure
.
mk_TextBufferRemoveTagCallback :: C_TextBufferRemoveTagCallback -> IO (FunPtr C_TextBufferRemoveTagCallback) Source #
Generate a function pointer callable from C code, from a C_TextBufferRemoveTagCallback
.
noTextBufferRemoveTagCallback :: Maybe TextBufferRemoveTagCallback Source #
A convenience synonym for
.Nothing
:: Maybe
TextBufferRemoveTagCallback
onTextBufferRemoveTag :: (IsTextBuffer a, MonadIO m) => a -> TextBufferRemoveTagCallback -> m SignalHandlerId Source #
Connect a signal handler for the removeTag signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
textBuffer #removeTag callback
wrap_TextBufferRemoveTagCallback :: TextBufferRemoveTagCallback -> C_TextBufferRemoveTagCallback Source #
Wrap a TextBufferRemoveTagCallback
into a C_TextBufferRemoveTagCallback
.
undo
type C_TextBufferUndoCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type TextBufferUndoCallback = IO () Source #
The "undo" signal is emitted when a request has been made to undo the previous operation or set of operations that have been grouped together.
afterTextBufferUndo :: (IsTextBuffer a, MonadIO m) => a -> TextBufferUndoCallback -> m SignalHandlerId Source #
Connect a signal handler for the undo signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
textBuffer #undo callback
genClosure_TextBufferUndo :: MonadIO m => TextBufferUndoCallback -> m (GClosure C_TextBufferUndoCallback) Source #
Wrap the callback into a GClosure
.
mk_TextBufferUndoCallback :: C_TextBufferUndoCallback -> IO (FunPtr C_TextBufferUndoCallback) Source #
Generate a function pointer callable from C code, from a C_TextBufferUndoCallback
.
noTextBufferUndoCallback :: Maybe TextBufferUndoCallback Source #
A convenience synonym for
.Nothing
:: Maybe
TextBufferUndoCallback
onTextBufferUndo :: (IsTextBuffer a, MonadIO m) => a -> TextBufferUndoCallback -> m SignalHandlerId Source #
Connect a signal handler for the undo signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
textBuffer #undo callback