Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
- Exported types
- Methods
- addMark
- addSelectionClipboard
- applyTag
- applyTagByName
- backspace
- beginUserAction
- copyClipboard
- createChildAnchor
- createMark
- cutClipboard
- delete
- deleteInteractive
- deleteMark
- deleteMarkByName
- deleteSelection
- deserialize
- deserializeGetCanCreateTags
- deserializeSetCanCreateTags
- endUserAction
- getBounds
- getCharCount
- getCopyTargetList
- getDeserializeFormats
- getEndIter
- getHasSelection
- getInsert
- getIterAtChildAnchor
- getIterAtLine
- getIterAtLineIndex
- getIterAtLineOffset
- getIterAtMark
- getIterAtOffset
- getLineCount
- getMark
- getModified
- getPasteTargetList
- getSelectionBound
- getSelectionBounds
- getSerializeFormats
- getSlice
- getStartIter
- getTagTable
- getText
- insert
- insertAtCursor
- insertChildAnchor
- insertInteractive
- insertInteractiveAtCursor
- insertMarkup
- insertPixbuf
- insertRange
- insertRangeInteractive
- moveMark
- moveMarkByName
- new
- pasteClipboard
- placeCursor
- registerDeserializeFormat
- registerDeserializeTagset
- registerSerializeFormat
- registerSerializeTagset
- removeAllTags
- removeSelectionClipboard
- removeTag
- removeTagByName
- selectRange
- serialize
- setModified
- setText
- unregisterDeserializeFormat
- unregisterSerializeFormat
- 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
- 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
- textBufferDeserialize :: (HasCallStack, MonadIO m, IsTextBuffer a, IsTextBuffer b) => a -> b -> Atom -> TextIter -> ByteString -> m ()
- textBufferDeserializeGetCanCreateTags :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Atom -> m Bool
- textBufferDeserializeSetCanCreateTags :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Atom -> Bool -> m ()
- textBufferEndUserAction :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m ()
- textBufferGetBounds :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m (TextIter, TextIter)
- textBufferGetCharCount :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m Int32
- textBufferGetCopyTargetList :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m TargetList
- textBufferGetDeserializeFormats :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m [Atom]
- 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)
- textBufferGetModified :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m Bool
- textBufferGetPasteTargetList :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m TargetList
- textBufferGetSelectionBound :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m TextMark
- textBufferGetSelectionBounds :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m (Bool, TextIter, TextIter)
- textBufferGetSerializeFormats :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> m [Atom]
- 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 ()
- textBufferInsertPixbuf :: (HasCallStack, MonadIO m, IsTextBuffer a, IsPixbuf 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 ()
- textBufferRegisterDeserializeFormat :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Text -> FunPtr C_TextBufferDeserializeFunc -> m Atom
- textBufferRegisterDeserializeTagset :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Maybe Text -> m Atom
- textBufferRegisterSerializeFormat :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Text -> TextBufferSerializeFunc -> m Atom
- textBufferRegisterSerializeTagset :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Maybe Text -> m Atom
- 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 ()
- textBufferSerialize :: (HasCallStack, MonadIO m, IsTextBuffer a, IsTextBuffer b) => a -> b -> Atom -> TextIter -> TextIter -> m ByteString
- textBufferSetModified :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Bool -> m ()
- textBufferSetText :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Text -> Int32 -> m ()
- textBufferUnregisterDeserializeFormat :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Atom -> m ()
- textBufferUnregisterSerializeFormat :: (HasCallStack, MonadIO m, IsTextBuffer a) => a -> Atom -> m ()
- getTextBufferCopyTargetList :: (MonadIO m, IsTextBuffer o) => o -> m TargetList
- getTextBufferCursorPosition :: (MonadIO m, IsTextBuffer o) => o -> m Int32
- getTextBufferHasSelection :: (MonadIO m, IsTextBuffer o) => o -> m Bool
- getTextBufferPasteTargetList :: (MonadIO m, IsTextBuffer o) => o -> m TargetList
- 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_TextBufferInsertPixbufCallback = Ptr () -> Ptr TextIter -> Ptr Pixbuf -> Ptr () -> IO ()
- type TextBufferInsertPixbufCallback = TextIter -> Pixbuf -> IO ()
- afterTextBufferInsertPixbuf :: (IsTextBuffer a, MonadIO m) => a -> TextBufferInsertPixbufCallback -> m SignalHandlerId
- genClosure_TextBufferInsertPixbuf :: MonadIO m => TextBufferInsertPixbufCallback -> m (GClosure C_TextBufferInsertPixbufCallback)
- mk_TextBufferInsertPixbufCallback :: C_TextBufferInsertPixbufCallback -> IO (FunPtr C_TextBufferInsertPixbufCallback)
- noTextBufferInsertPixbufCallback :: Maybe TextBufferInsertPixbufCallback
- onTextBufferInsertPixbuf :: (IsTextBuffer a, MonadIO m) => a -> TextBufferInsertPixbufCallback -> m SignalHandlerId
- wrap_TextBufferInsertPixbufCallback :: TextBufferInsertPixbufCallback -> C_TextBufferInsertPixbufCallback
- 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_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
Exported types
newtype TextBuffer Source #
Memory-managed wrapper type.
TextBuffer (ManagedPtr TextBuffer) |
Instances
Eq TextBuffer Source # | |
Defined in GI.Gtk.Objects.TextBuffer (==) :: TextBuffer -> TextBuffer -> Bool # (/=) :: TextBuffer -> TextBuffer -> Bool # | |
GObject TextBuffer Source # | |
Defined in GI.Gtk.Objects.TextBuffer | |
ManagedPtrNewtype TextBuffer Source # | |
Defined in GI.Gtk.Objects.TextBuffer toManagedPtr :: TextBuffer -> ManagedPtr TextBuffer | |
TypedObject TextBuffer Source # | |
Defined in GI.Gtk.Objects.TextBuffer | |
HasParentTypes TextBuffer Source # | |
Defined in GI.Gtk.Objects.TextBuffer | |
IsGValue (Maybe TextBuffer) Source # | Convert |
Defined in GI.Gtk.Objects.TextBuffer gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe TextBuffer -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe 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
Click to display all available methods, including inherited ones
Methods
addMark, addSelectionClipboard, applyTag, applyTagByName, backspace, beginUserAction, bindProperty, bindPropertyFull, copyClipboard, createChildAnchor, createMark, cutClipboard, delete, deleteInteractive, deleteMark, deleteMarkByName, deleteSelection, deserialize, deserializeGetCanCreateTags, deserializeSetCanCreateTags, endUserAction, forceFloating, freezeNotify, getv, insert, insertAtCursor, insertChildAnchor, insertInteractive, insertInteractiveAtCursor, insertMarkup, insertPixbuf, insertRange, insertRangeInteractive, isFloating, moveMark, moveMarkByName, notify, notifyByPspec, pasteClipboard, placeCursor, ref, refSink, registerDeserializeFormat, registerDeserializeTagset, registerSerializeFormat, registerSerializeTagset, removeAllTags, removeSelectionClipboard, removeTag, removeTagByName, runDispose, selectRange, serialize, stealData, stealQdata, thawNotify, unref, unregisterDeserializeFormat, unregisterSerializeFormat, watchClosure.
Getters
getBounds, getCharCount, getCopyTargetList, getData, getDeserializeFormats, getEndIter, getHasSelection, getInsert, getIterAtChildAnchor, getIterAtLine, getIterAtLineIndex, getIterAtLineOffset, getIterAtMark, getIterAtOffset, getLineCount, getMark, getModified, getPasteTargetList, getProperty, getQdata, getSelectionBound, getSelectionBounds, getSerializeFormats, getSlice, getStartIter, getTagTable, getText.
Setters
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
of type GDK_SELECTION_PRIMARY
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.
Since: 2.6
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).
deserialize
textBufferDeserialize Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a, IsTextBuffer b) | |
=> a |
|
-> b |
|
-> Atom |
|
-> TextIter |
|
-> ByteString |
|
-> m () | (Can throw |
This function deserializes rich text in format format
and inserts
it at iter
.
formats
to be used must be registered using
textBufferRegisterDeserializeFormat
or
textBufferRegisterDeserializeTagset
beforehand.
Since: 2.10
deserializeGetCanCreateTags
textBufferDeserializeGetCanCreateTags Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Atom |
|
-> m Bool | Returns: whether deserializing this format may create tags |
This functions returns the value set with
textBufferDeserializeSetCanCreateTags
Since: 2.10
deserializeSetCanCreateTags
textBufferDeserializeSetCanCreateTags Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Atom |
|
-> Bool |
|
-> m () |
Use this function to allow a rich text deserialization function to create new tags in the receiving buffer. Note that using this function is almost always a bad idea, because the rich text functions you register should know how to map the rich text format they handler to your text buffers set of tags.
The ability of creating new (arbitrary!) tags in the receiving buffer
is meant for special rich text formats like the internal one that
is registered using textBufferRegisterDeserializeTagset
,
because that format is essentially a dump of the internal structure
of the source buffer, including its tag names.
You should allow creation of tags only if you know what you are doing, e.g. if you defined a tagset name for your application suite’s text buffers and you know that it’s fine to receive new tags from these buffers, because you know that your application can handle the newly created tags.
Since: 2.10
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
).
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.
getCopyTargetList
textBufferGetCopyTargetList Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m TargetList | Returns: the |
This function returns the list of targets this text buffer can
provide for copying and as DND source. The targets in the list are
added with info
values from the TextBufferTargetInfo
enum,
using targetListAddRichTextTargets
and
targetListAddTextTargets
.
Since: 2.10
getDeserializeFormats
textBufferGetDeserializeFormats Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m [Atom] | Returns: an array of
|
This function returns the rich text deserialize formats registered
with buffer
using textBufferRegisterDeserializeFormat
or
textBufferRegisterDeserializeTagset
Since: 2.10
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.
Since: 2.10
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.
Before the 3.20 version, it was not allowed to pass an invalid location.
Since the 3.20 version, 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.
Since the 3.20 version, 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.
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.
getPasteTargetList
textBufferGetPasteTargetList Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m TargetList | Returns: the |
This function returns the list of targets this text buffer supports
for pasting and as DND destination. The targets in the list are
added with info
values from the TextBufferTargetInfo
enum,
using targetListAddRichTextTargets
and
targetListAddTextTargets
.
Since: 2.10
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.
getSerializeFormats
textBufferGetSerializeFormats Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> m [Atom] | Returns: an array of
|
This function returns the rich text serialize formats registered
with buffer
using textBufferRegisterSerializeFormat
or
textBufferRegisterSerializeTagset
Since: 2.10
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 pixbuf 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.
Since: 3.16
insertPixbuf
textBufferInsertPixbuf Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a, IsPixbuf 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 pixbufs, 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 pixbufs 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.
registerDeserializeFormat
textBufferRegisterDeserializeFormat Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Text |
|
-> FunPtr C_TextBufferDeserializeFunc |
|
-> m Atom | Returns: the |
This function registers a rich text deserialization function
along with
its mimeType
with the passed buffer
.
Since: 2.10
registerDeserializeTagset
textBufferRegisterDeserializeTagset Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Maybe Text |
|
-> m Atom | Returns: the |
This function registers GTK+’s internal rich text serialization
format with the passed buffer
. See
textBufferRegisterSerializeTagset
for details.
Since: 2.10
registerSerializeFormat
textBufferRegisterSerializeFormat Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Text |
|
-> TextBufferSerializeFunc |
|
-> m Atom | Returns: the |
This function registers a rich text serialization function
along with
its mimeType
with the passed buffer
.
Since: 2.10
registerSerializeTagset
textBufferRegisterSerializeTagset Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Maybe Text |
|
-> m Atom | Returns: the |
This function registers GTK+’s internal rich text serialization
format with the passed buffer
. The internal format does not comply
to any standard rich text format and only works between TextBuffer
instances. It is capable of serializing all of a text buffer’s tags
and embedded pixbufs.
This function is just a wrapper around
textBufferRegisterSerializeFormat
. The mime type used
for registering is “application/x-gtk-text-buffer-rich-text”, or
“application/x-gtk-text-buffer-rich-text;format=tagsetName
” if a
tagsetName
was passed.
The tagsetName
can be used to restrict the transfer of rich text
to buffers with compatible sets of tags, in order to avoid unknown
tags from being pasted. It is probably the common case to pass an
identifier != Nothing
here, since the Nothing
tagset requires the
receiving buffer to deal with with pasting of arbitrary tags.
Since: 2.10
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.
Since: 2.4
serialize
:: (HasCallStack, MonadIO m, IsTextBuffer a, IsTextBuffer b) | |
=> a |
|
-> b |
|
-> Atom |
|
-> TextIter |
|
-> TextIter |
|
-> m ByteString | Returns: the serialized
data, encoded as |
This function serializes the portion of text between start
and end
in the rich text format represented by format
.
formats
to be used must be registered using
textBufferRegisterSerializeFormat
or
textBufferRegisterSerializeTagset
beforehand.
Since: 2.10
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.
unregisterDeserializeFormat
textBufferUnregisterDeserializeFormat Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Atom |
|
-> m () |
This function unregisters a rich text format that was previously
registered using textBufferRegisterDeserializeFormat
or
textBufferRegisterDeserializeTagset
.
Since: 2.10
unregisterSerializeFormat
textBufferUnregisterSerializeFormat Source #
:: (HasCallStack, MonadIO m, IsTextBuffer a) | |
=> a |
|
-> Atom |
|
-> m () |
This function unregisters a rich text format that was previously
registered using textBufferRegisterSerializeFormat
or
textBufferRegisterSerializeTagset
Since: 2.10
Properties
copyTargetList
The list of targets this buffer supports for clipboard copying and as DND source.
Since: 2.10
getTextBufferCopyTargetList :: (MonadIO m, IsTextBuffer o) => o -> m TargetList 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.
Since: 2.10
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
hasSelection
Whether the buffer has some text currently selected.
Since: 2.10
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.
Since: 2.10
getTextBufferPasteTargetList :: (MonadIO m, IsTextBuffer o) => o -> m TargetList 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.
Since: 2.8
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 #
insertPixbuf
type C_TextBufferInsertPixbufCallback = Ptr () -> Ptr TextIter -> Ptr Pixbuf -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type TextBufferInsertPixbufCallback Source #
= TextIter |
|
-> Pixbuf |
|
-> IO () |
The insertPixbuf signal is emitted to insert a Pixbuf
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 pixbuf
.
See also: textBufferInsertPixbuf
.
afterTextBufferInsertPixbuf :: (IsTextBuffer a, MonadIO m) => a -> TextBufferInsertPixbufCallback -> m SignalHandlerId Source #
Connect a signal handler for the insertPixbuf signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
textBuffer #insertPixbuf callback
genClosure_TextBufferInsertPixbuf :: MonadIO m => TextBufferInsertPixbufCallback -> m (GClosure C_TextBufferInsertPixbufCallback) Source #
Wrap the callback into a GClosure
.
mk_TextBufferInsertPixbufCallback :: C_TextBufferInsertPixbufCallback -> IO (FunPtr C_TextBufferInsertPixbufCallback) Source #
Generate a function pointer callable from C code, from a C_TextBufferInsertPixbufCallback
.
noTextBufferInsertPixbufCallback :: Maybe TextBufferInsertPixbufCallback Source #
A convenience synonym for
.Nothing
:: Maybe
TextBufferInsertPixbufCallback
onTextBufferInsertPixbuf :: (IsTextBuffer a, MonadIO m) => a -> TextBufferInsertPixbufCallback -> m SignalHandlerId Source #
Connect a signal handler for the insertPixbuf signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
textBuffer #insertPixbuf callback
wrap_TextBufferInsertPixbufCallback :: TextBufferInsertPixbufCallback -> C_TextBufferInsertPixbufCallback Source #
Wrap a TextBufferInsertPixbufCallback
into a C_TextBufferInsertPixbufCallback
.
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.
Since: 2.16
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
.
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