| Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.GtkSource.Objects.Buffer
Contents
- Exported types
- Methods
- backwardIterToSourceMark
- beginNotUndoableAction
- canRedo
- canUndo
- changeCase
- createSourceMark
- endNotUndoableAction
- ensureHighlight
- forwardIterToSourceMark
- getContextClassesAtIter
- getHighlightMatchingBrackets
- getHighlightSyntax
- getImplicitTrailingNewline
- getLanguage
- getMaxUndoLevels
- getSourceMarksAtIter
- getSourceMarksAtLine
- getStyleScheme
- getUndoManager
- iterBackwardToContextClassToggle
- iterForwardToContextClassToggle
- iterHasContextClass
- joinLines
- new
- newWithLanguage
- redo
- removeSourceMarks
- setHighlightMatchingBrackets
- setHighlightSyntax
- setImplicitTrailingNewline
- setLanguage
- setMaxUndoLevels
- setStyleScheme
- setUndoManager
- sortLines
- undo
- Properties
- Signals
Description
- newtype Buffer = Buffer (ManagedPtr Buffer)
- class GObject o => IsBuffer o
- toBuffer :: IsBuffer o => o -> IO Buffer
- noBuffer :: Maybe Buffer
- data BufferBackwardIterToSourceMarkMethodInfo
- bufferBackwardIterToSourceMark :: (MonadIO m, IsBuffer a) => a -> TextIter -> Maybe Text -> m Bool
- data BufferBeginNotUndoableActionMethodInfo
- bufferBeginNotUndoableAction :: (MonadIO m, IsBuffer a) => a -> m ()
- data BufferCanRedoMethodInfo
- bufferCanRedo :: (MonadIO m, IsBuffer a) => a -> m Bool
- data BufferCanUndoMethodInfo
- bufferCanUndo :: (MonadIO m, IsBuffer a) => a -> m Bool
- data BufferChangeCaseMethodInfo
- bufferChangeCase :: (MonadIO m, IsBuffer a) => a -> ChangeCaseType -> TextIter -> TextIter -> m ()
- data BufferCreateSourceMarkMethodInfo
- bufferCreateSourceMark :: (MonadIO m, IsBuffer a) => a -> Maybe Text -> Text -> TextIter -> m Mark
- data BufferEndNotUndoableActionMethodInfo
- bufferEndNotUndoableAction :: (MonadIO m, IsBuffer a) => a -> m ()
- data BufferEnsureHighlightMethodInfo
- bufferEnsureHighlight :: (MonadIO m, IsBuffer a) => a -> TextIter -> TextIter -> m ()
- data BufferForwardIterToSourceMarkMethodInfo
- bufferForwardIterToSourceMark :: (MonadIO m, IsBuffer a) => a -> TextIter -> Maybe Text -> m Bool
- data BufferGetContextClassesAtIterMethodInfo
- bufferGetContextClassesAtIter :: (MonadIO m, IsBuffer a) => a -> TextIter -> m [Text]
- data BufferGetHighlightMatchingBracketsMethodInfo
- bufferGetHighlightMatchingBrackets :: (MonadIO m, IsBuffer a) => a -> m Bool
- data BufferGetHighlightSyntaxMethodInfo
- bufferGetHighlightSyntax :: (MonadIO m, IsBuffer a) => a -> m Bool
- data BufferGetImplicitTrailingNewlineMethodInfo
- bufferGetImplicitTrailingNewline :: (MonadIO m, IsBuffer a) => a -> m Bool
- data BufferGetLanguageMethodInfo
- bufferGetLanguage :: (MonadIO m, IsBuffer a) => a -> m (Maybe Language)
- data BufferGetMaxUndoLevelsMethodInfo
- bufferGetMaxUndoLevels :: (MonadIO m, IsBuffer a) => a -> m Int32
- data BufferGetSourceMarksAtIterMethodInfo
- bufferGetSourceMarksAtIter :: (MonadIO m, IsBuffer a) => a -> TextIter -> Maybe Text -> m [Mark]
- data BufferGetSourceMarksAtLineMethodInfo
- bufferGetSourceMarksAtLine :: (MonadIO m, IsBuffer a) => a -> Int32 -> Maybe Text -> m [Mark]
- data BufferGetStyleSchemeMethodInfo
- bufferGetStyleScheme :: (MonadIO m, IsBuffer a) => a -> m (Maybe StyleScheme)
- data BufferGetUndoManagerMethodInfo
- bufferGetUndoManager :: (MonadIO m, IsBuffer a) => a -> m (Maybe UndoManager)
- data BufferIterBackwardToContextClassToggleMethodInfo
- bufferIterBackwardToContextClassToggle :: (MonadIO m, IsBuffer a) => a -> TextIter -> Text -> m Bool
- data BufferIterForwardToContextClassToggleMethodInfo
- bufferIterForwardToContextClassToggle :: (MonadIO m, IsBuffer a) => a -> TextIter -> Text -> m Bool
- data BufferIterHasContextClassMethodInfo
- bufferIterHasContextClass :: (MonadIO m, IsBuffer a) => a -> TextIter -> Text -> m Bool
- data BufferJoinLinesMethodInfo
- bufferJoinLines :: (MonadIO m, IsBuffer a) => a -> TextIter -> TextIter -> m ()
- bufferNew :: (MonadIO m, IsTextTagTable a) => Maybe a -> m Buffer
- bufferNewWithLanguage :: (MonadIO m, IsLanguage a) => a -> m Buffer
- data BufferRedoMethodInfo
- bufferRedo :: (MonadIO m, IsBuffer a) => a -> m ()
- data BufferRemoveSourceMarksMethodInfo
- bufferRemoveSourceMarks :: (MonadIO m, IsBuffer a) => a -> TextIter -> TextIter -> Maybe Text -> m ()
- data BufferSetHighlightMatchingBracketsMethodInfo
- bufferSetHighlightMatchingBrackets :: (MonadIO m, IsBuffer a) => a -> Bool -> m ()
- data BufferSetHighlightSyntaxMethodInfo
- bufferSetHighlightSyntax :: (MonadIO m, IsBuffer a) => a -> Bool -> m ()
- data BufferSetImplicitTrailingNewlineMethodInfo
- bufferSetImplicitTrailingNewline :: (MonadIO m, IsBuffer a) => a -> Bool -> m ()
- data BufferSetLanguageMethodInfo
- bufferSetLanguage :: (MonadIO m, IsBuffer a, IsLanguage b) => a -> Maybe b -> m ()
- data BufferSetMaxUndoLevelsMethodInfo
- bufferSetMaxUndoLevels :: (MonadIO m, IsBuffer a) => a -> Int32 -> m ()
- data BufferSetStyleSchemeMethodInfo
- bufferSetStyleScheme :: (MonadIO m, IsBuffer a, IsStyleScheme b) => a -> Maybe b -> m ()
- data BufferSetUndoManagerMethodInfo
- bufferSetUndoManager :: (MonadIO m, IsBuffer a, IsUndoManager b) => a -> Maybe b -> m ()
- data BufferSortLinesMethodInfo
- bufferSortLines :: (MonadIO m, IsBuffer a) => a -> TextIter -> TextIter -> [SortFlags] -> Int32 -> m ()
- data BufferUndoMethodInfo
- bufferUndo :: (MonadIO m, IsBuffer a) => a -> m ()
- data BufferCanRedoPropertyInfo
- getBufferCanRedo :: (MonadIO m, IsBuffer o) => o -> m Bool
- data BufferCanUndoPropertyInfo
- getBufferCanUndo :: (MonadIO m, IsBuffer o) => o -> m Bool
- data BufferHighlightMatchingBracketsPropertyInfo
- bufferHighlightMatchingBrackets :: AttrLabelProxy "highlightMatchingBrackets"
- constructBufferHighlightMatchingBrackets :: IsBuffer o => Bool -> IO (GValueConstruct o)
- getBufferHighlightMatchingBrackets :: (MonadIO m, IsBuffer o) => o -> m Bool
- setBufferHighlightMatchingBrackets :: (MonadIO m, IsBuffer o) => o -> Bool -> m ()
- data BufferHighlightSyntaxPropertyInfo
- bufferHighlightSyntax :: AttrLabelProxy "highlightSyntax"
- constructBufferHighlightSyntax :: IsBuffer o => Bool -> IO (GValueConstruct o)
- getBufferHighlightSyntax :: (MonadIO m, IsBuffer o) => o -> m Bool
- setBufferHighlightSyntax :: (MonadIO m, IsBuffer o) => o -> Bool -> m ()
- data BufferImplicitTrailingNewlinePropertyInfo
- bufferImplicitTrailingNewline :: AttrLabelProxy "implicitTrailingNewline"
- constructBufferImplicitTrailingNewline :: IsBuffer o => Bool -> IO (GValueConstruct o)
- getBufferImplicitTrailingNewline :: (MonadIO m, IsBuffer o) => o -> m Bool
- setBufferImplicitTrailingNewline :: (MonadIO m, IsBuffer o) => o -> Bool -> m ()
- data BufferLanguagePropertyInfo
- bufferLanguage :: AttrLabelProxy "language"
- clearBufferLanguage :: (MonadIO m, IsBuffer o) => o -> m ()
- constructBufferLanguage :: (IsBuffer o, IsLanguage a) => a -> IO (GValueConstruct o)
- getBufferLanguage :: (MonadIO m, IsBuffer o) => o -> m (Maybe Language)
- setBufferLanguage :: (MonadIO m, IsBuffer o, IsLanguage a) => o -> a -> m ()
- data BufferMaxUndoLevelsPropertyInfo
- bufferMaxUndoLevels :: AttrLabelProxy "maxUndoLevels"
- constructBufferMaxUndoLevels :: IsBuffer o => Int32 -> IO (GValueConstruct o)
- getBufferMaxUndoLevels :: (MonadIO m, IsBuffer o) => o -> m Int32
- setBufferMaxUndoLevels :: (MonadIO m, IsBuffer o) => o -> Int32 -> m ()
- data BufferStyleSchemePropertyInfo
- bufferStyleScheme :: AttrLabelProxy "styleScheme"
- clearBufferStyleScheme :: (MonadIO m, IsBuffer o) => o -> m ()
- constructBufferStyleScheme :: (IsBuffer o, IsStyleScheme a) => a -> IO (GValueConstruct o)
- getBufferStyleScheme :: (MonadIO m, IsBuffer o) => o -> m (Maybe StyleScheme)
- setBufferStyleScheme :: (MonadIO m, IsBuffer o, IsStyleScheme a) => o -> a -> m ()
- data BufferUndoManagerPropertyInfo
- bufferUndoManager :: AttrLabelProxy "undoManager"
- clearBufferUndoManager :: (MonadIO m, IsBuffer o) => o -> m ()
- constructBufferUndoManager :: (IsBuffer o, IsUndoManager a) => a -> IO (GValueConstruct o)
- getBufferUndoManager :: (MonadIO m, IsBuffer o) => o -> m (Maybe UndoManager)
- setBufferUndoManager :: (MonadIO m, IsBuffer o, IsUndoManager a) => o -> a -> m ()
- type BufferBracketMatchedCallback = TextIter -> BracketMatchType -> IO ()
- data BufferBracketMatchedSignalInfo
- type C_BufferBracketMatchedCallback = Ptr () -> Ptr TextIter -> CUInt -> Ptr () -> IO ()
- afterBufferBracketMatched :: (GObject a, MonadIO m) => a -> BufferBracketMatchedCallback -> m SignalHandlerId
- genClosure_BufferBracketMatched :: BufferBracketMatchedCallback -> IO Closure
- mk_BufferBracketMatchedCallback :: C_BufferBracketMatchedCallback -> IO (FunPtr C_BufferBracketMatchedCallback)
- noBufferBracketMatchedCallback :: Maybe BufferBracketMatchedCallback
- onBufferBracketMatched :: (GObject a, MonadIO m) => a -> BufferBracketMatchedCallback -> m SignalHandlerId
- wrap_BufferBracketMatchedCallback :: BufferBracketMatchedCallback -> Ptr () -> Ptr TextIter -> CUInt -> Ptr () -> IO ()
- type BufferHighlightUpdatedCallback = TextIter -> TextIter -> IO ()
- data BufferHighlightUpdatedSignalInfo
- type C_BufferHighlightUpdatedCallback = Ptr () -> Ptr TextIter -> Ptr TextIter -> Ptr () -> IO ()
- afterBufferHighlightUpdated :: (GObject a, MonadIO m) => a -> BufferHighlightUpdatedCallback -> m SignalHandlerId
- genClosure_BufferHighlightUpdated :: BufferHighlightUpdatedCallback -> IO Closure
- mk_BufferHighlightUpdatedCallback :: C_BufferHighlightUpdatedCallback -> IO (FunPtr C_BufferHighlightUpdatedCallback)
- noBufferHighlightUpdatedCallback :: Maybe BufferHighlightUpdatedCallback
- onBufferHighlightUpdated :: (GObject a, MonadIO m) => a -> BufferHighlightUpdatedCallback -> m SignalHandlerId
- wrap_BufferHighlightUpdatedCallback :: BufferHighlightUpdatedCallback -> Ptr () -> Ptr TextIter -> Ptr TextIter -> Ptr () -> IO ()
- type BufferRedoCallback = IO ()
- data BufferRedoSignalInfo
- type C_BufferRedoCallback = Ptr () -> Ptr () -> IO ()
- afterBufferRedo :: (GObject a, MonadIO m) => a -> BufferRedoCallback -> m SignalHandlerId
- genClosure_BufferRedo :: BufferRedoCallback -> IO Closure
- mk_BufferRedoCallback :: C_BufferRedoCallback -> IO (FunPtr C_BufferRedoCallback)
- noBufferRedoCallback :: Maybe BufferRedoCallback
- onBufferRedo :: (GObject a, MonadIO m) => a -> BufferRedoCallback -> m SignalHandlerId
- wrap_BufferRedoCallback :: BufferRedoCallback -> Ptr () -> Ptr () -> IO ()
- type BufferSourceMarkUpdatedCallback = TextMark -> IO ()
- data BufferSourceMarkUpdatedSignalInfo
- type C_BufferSourceMarkUpdatedCallback = Ptr () -> Ptr TextMark -> Ptr () -> IO ()
- afterBufferSourceMarkUpdated :: (GObject a, MonadIO m) => a -> BufferSourceMarkUpdatedCallback -> m SignalHandlerId
- genClosure_BufferSourceMarkUpdated :: BufferSourceMarkUpdatedCallback -> IO Closure
- mk_BufferSourceMarkUpdatedCallback :: C_BufferSourceMarkUpdatedCallback -> IO (FunPtr C_BufferSourceMarkUpdatedCallback)
- noBufferSourceMarkUpdatedCallback :: Maybe BufferSourceMarkUpdatedCallback
- onBufferSourceMarkUpdated :: (GObject a, MonadIO m) => a -> BufferSourceMarkUpdatedCallback -> m SignalHandlerId
- wrap_BufferSourceMarkUpdatedCallback :: BufferSourceMarkUpdatedCallback -> Ptr () -> Ptr TextMark -> Ptr () -> IO ()
- type BufferUndoCallback = IO ()
- data BufferUndoSignalInfo
- type C_BufferUndoCallback = Ptr () -> Ptr () -> IO ()
- afterBufferUndo :: (GObject a, MonadIO m) => a -> BufferUndoCallback -> m SignalHandlerId
- genClosure_BufferUndo :: BufferUndoCallback -> IO Closure
- mk_BufferUndoCallback :: C_BufferUndoCallback -> IO (FunPtr C_BufferUndoCallback)
- noBufferUndoCallback :: Maybe BufferUndoCallback
- onBufferUndo :: (GObject a, MonadIO m) => a -> BufferUndoCallback -> m SignalHandlerId
- wrap_BufferUndoCallback :: BufferUndoCallback -> Ptr () -> Ptr () -> IO ()
Exported types
Constructors
| Buffer (ManagedPtr Buffer) |
Instances
| GObject Buffer Source # | |
| IsObject Buffer Source # | |
| IsTextBuffer Buffer Source # | |
| IsBuffer Buffer Source # | |
| ((~) * info (ResolveBufferMethod t Buffer), MethodInfo * info Buffer p) => IsLabel t (Buffer -> p) Source # | |
| ((~) * info (ResolveBufferMethod t Buffer), MethodInfo * info Buffer p) => IsLabelProxy t (Buffer -> p) Source # | |
| HasAttributeList * Buffer Source # | |
| type AttributeList Buffer Source # | |
| type SignalList Buffer Source # | |
Methods
backwardIterToSourceMark
beginNotUndoableAction
data BufferBeginNotUndoableActionMethodInfo Source #
Instances
| ((~) * signature (m ()), MonadIO m, IsBuffer a) => MethodInfo * BufferBeginNotUndoableActionMethodInfo a signature Source # | |
bufferBeginNotUndoableAction Source #
Marks the beginning of a not undoable action on the buffer, disabling the undo manager. Typically you would call this function before initially setting the contents of the buffer (e.g. when loading a file in a text editor).
You may nest bufferBeginNotUndoableAction /
bufferEndNotUndoableAction blocks.
canRedo
data BufferCanRedoMethodInfo Source #
Instances
| ((~) * signature (m Bool), MonadIO m, IsBuffer a) => MethodInfo * BufferCanRedoMethodInfo a signature Source # | |
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> m Bool | Returns: |
Determines whether a source buffer can redo the last action (i.e. if the last operation was an undo).
canUndo
data BufferCanUndoMethodInfo Source #
Instances
| ((~) * signature (m Bool), MonadIO m, IsBuffer a) => MethodInfo * BufferCanUndoMethodInfo a signature Source # | |
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> m Bool | Returns: |
Determines whether a source buffer can undo the last action.
changeCase
data BufferChangeCaseMethodInfo Source #
Instances
| ((~) * signature (ChangeCaseType -> TextIter -> TextIter -> m ()), MonadIO m, IsBuffer a) => MethodInfo * BufferChangeCaseMethodInfo a signature Source # | |
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> ChangeCaseType |
|
| -> TextIter |
|
| -> TextIter |
|
| -> m () |
Changes the case of the text between the specified iterators.
Since: 3.12
createSourceMark
bufferCreateSourceMark Source #
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> Maybe Text |
|
| -> Text |
|
| -> TextIter |
|
| -> m Mark | Returns: a new |
Creates a source mark in the buffer of category category. A source mark is
a TextMark but organised into categories. Depending on the category
a pixbuf can be specified that will be displayed along the line of the mark.
Like a TextMark, a Mark can be anonymous if the
passed name is Nothing. Also, the buffer owns the marks so you
shouldn't unreference it.
Marks always have left gravity and are moved to the beginning of the line when the user deletes the line they were in.
Typical uses for a source mark are bookmarks, breakpoints, current executing instruction indication in a source file, etc..
Since: 2.2
endNotUndoableAction
data BufferEndNotUndoableActionMethodInfo Source #
Instances
| ((~) * signature (m ()), MonadIO m, IsBuffer a) => MethodInfo * BufferEndNotUndoableActionMethodInfo a signature Source # | |
bufferEndNotUndoableAction Source #
Marks the end of a not undoable action on the buffer. When the last not undoable block is closed through the call to this function, the list of undo actions is cleared and the undo manager is re-enabled.
ensureHighlight
data BufferEnsureHighlightMethodInfo Source #
Instances
| ((~) * signature (TextIter -> TextIter -> m ()), MonadIO m, IsBuffer a) => MethodInfo * BufferEnsureHighlightMethodInfo a signature Source # | |
bufferEnsureHighlight Source #
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> TextIter |
|
| -> TextIter |
|
| -> m () |
Forces buffer to analyze and highlight the given area synchronously.
<note> <para> This is a potentially slow operation and should be used only when you need to make sure that some text not currently visible is highlighted, for instance before printing. </para> </note>
forwardIterToSourceMark
getContextClassesAtIter
data BufferGetContextClassesAtIterMethodInfo Source #
Instances
| ((~) * signature (TextIter -> m [Text]), MonadIO m, IsBuffer a) => MethodInfo * BufferGetContextClassesAtIterMethodInfo a signature Source # | |
bufferGetContextClassesAtIter Source #
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> TextIter |
|
| -> m [Text] | Returns: a new |
Get all defined context classes at iter.
See the Buffer description for the list of default context classes.
Since: 2.10
getHighlightMatchingBrackets
data BufferGetHighlightMatchingBracketsMethodInfo Source #
Instances
| ((~) * signature (m Bool), MonadIO m, IsBuffer a) => MethodInfo * BufferGetHighlightMatchingBracketsMethodInfo a signature Source # | |
bufferGetHighlightMatchingBrackets Source #
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> m Bool | Returns: |
Determines whether bracket match highlighting is activated for the source buffer.
getHighlightSyntax
data BufferGetHighlightSyntaxMethodInfo Source #
Instances
| ((~) * signature (m Bool), MonadIO m, IsBuffer a) => MethodInfo * BufferGetHighlightSyntaxMethodInfo a signature Source # | |
bufferGetHighlightSyntax Source #
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> m Bool | Returns: |
Determines whether syntax highlighting is activated in the source buffer.
getImplicitTrailingNewline
data BufferGetImplicitTrailingNewlineMethodInfo Source #
Instances
| ((~) * signature (m Bool), MonadIO m, IsBuffer a) => MethodInfo * BufferGetImplicitTrailingNewlineMethodInfo a signature Source # | |
bufferGetImplicitTrailingNewline Source #
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> m Bool | Returns: whether the |
No description available in the introspection data.
Since: 3.14
getLanguage
data BufferGetLanguageMethodInfo Source #
Instances
| ((~) * signature (m (Maybe Language)), MonadIO m, IsBuffer a) => MethodInfo * BufferGetLanguageMethodInfo a signature Source # | |
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> m (Maybe Language) | Returns: the |
Returns the Language associated with the buffer,
see bufferSetLanguage. The returned object should not be
unreferenced by the user.
getMaxUndoLevels
data BufferGetMaxUndoLevelsMethodInfo Source #
Instances
| ((~) * signature (m Int32), MonadIO m, IsBuffer a) => MethodInfo * BufferGetMaxUndoLevelsMethodInfo a signature Source # | |
bufferGetMaxUndoLevels Source #
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> m Int32 | Returns: the maximum number of possible undo levels or -1 if no limit is set. |
Determines the number of undo levels the buffer will track for buffer edits.
getSourceMarksAtIter
bufferGetSourceMarksAtIter Source #
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> TextIter |
|
| -> Maybe Text |
|
| -> m [Mark] | Returns:
a newly allocated |
Returns the list of marks of the given category at iter. If category
is Nothing it returns all marks at iter.
Since: 2.2
getSourceMarksAtLine
bufferGetSourceMarksAtLine Source #
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> Int32 |
|
| -> Maybe Text |
|
| -> m [Mark] | Returns:
a newly allocated |
Returns the list of marks of the given category at line.
If category is Nothing, all marks at line are returned.
Since: 2.2
getStyleScheme
data BufferGetStyleSchemeMethodInfo Source #
Instances
| ((~) * signature (m (Maybe StyleScheme)), MonadIO m, IsBuffer a) => MethodInfo * BufferGetStyleSchemeMethodInfo a signature Source # | |
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> m (Maybe StyleScheme) | Returns: the |
Returns the StyleScheme associated with the buffer,
see bufferSetStyleScheme.
The returned object should not be unreferenced by the user.
getUndoManager
data BufferGetUndoManagerMethodInfo Source #
Instances
| ((~) * signature (m (Maybe UndoManager)), MonadIO m, IsBuffer a) => MethodInfo * BufferGetUndoManagerMethodInfo a signature Source # | |
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> m (Maybe UndoManager) | Returns: the |
Returns the UndoManager associated with the buffer,
see bufferSetUndoManager. The returned object should not be
unreferenced by the user.
iterBackwardToContextClassToggle
bufferIterBackwardToContextClassToggle Source #
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> TextIter |
|
| -> Text |
|
| -> m Bool | Returns: whether we found a context class toggle before |
Moves backward to the next toggle (on or off) of the context class. If no
matching context class toggles are found, returns False, otherwise True.
Does not return toggles located at iter, only toggles after iter. Sets
iter to the location of the toggle, or to the end of the buffer if no
toggle is found.
See the Buffer description for the list of default context classes.
Since: 2.10
iterForwardToContextClassToggle
bufferIterForwardToContextClassToggle Source #
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> TextIter |
|
| -> Text |
|
| -> m Bool | Returns: whether we found a context class toggle after |
Moves forward to the next toggle (on or off) of the context class. If no
matching context class toggles are found, returns False, otherwise True.
Does not return toggles located at iter, only toggles after iter. Sets
iter to the location of the toggle, or to the end of the buffer if no
toggle is found.
See the Buffer description for the list of default context classes.
Since: 2.10
iterHasContextClass
bufferIterHasContextClass Source #
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> TextIter |
|
| -> Text |
|
| -> m Bool | Returns: whether |
Check if the class contextClass is set on iter.
See the Buffer description for the list of default context classes.
Since: 2.10
joinLines
data BufferJoinLinesMethodInfo Source #
Instances
| ((~) * signature (TextIter -> TextIter -> m ()), MonadIO m, IsBuffer a) => MethodInfo * BufferJoinLinesMethodInfo a signature Source # | |
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> TextIter |
|
| -> TextIter |
|
| -> m () |
Joins the lines of text between the specified iterators.
Since: 3.16
new
Arguments
| :: (MonadIO m, IsTextTagTable a) | |
| => Maybe a |
|
| -> m Buffer | Returns: a new source buffer. |
Creates a new source buffer.
newWithLanguage
bufferNewWithLanguage Source #
Arguments
| :: (MonadIO m, IsLanguage a) | |
| => a |
|
| -> m Buffer | Returns: a new source buffer which will highlight text
according to the highlighting patterns in |
Creates a new source buffer using the highlighting patterns in
language. This is equivalent to creating a new source buffer with
a new tag table and then calling bufferSetLanguage.
redo
data BufferRedoMethodInfo Source #
Instances
| ((~) * signature (m ()), MonadIO m, IsBuffer a) => MethodInfo * BufferRedoMethodInfo a signature Source # | |
Redoes the last undo operation. Use bufferCanRedo
to check whether a call to this function will have any effect.
This function emits the GI.GtkSource.Objects.Buffer.Buffer::redo signal.
removeSourceMarks
bufferRemoveSourceMarks Source #
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> TextIter |
|
| -> TextIter |
|
| -> Maybe Text |
|
| -> m () |
Remove all marks of category between start and end from the buffer.
If category is NULL, all marks in the range will be removed.
Since: 2.2
setHighlightMatchingBrackets
data BufferSetHighlightMatchingBracketsMethodInfo Source #
Instances
| ((~) * signature (Bool -> m ()), MonadIO m, IsBuffer a) => MethodInfo * BufferSetHighlightMatchingBracketsMethodInfo a signature Source # | |
bufferSetHighlightMatchingBrackets Source #
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Controls the bracket match highlighting function in the buffer. If activated, when you position your cursor over a bracket character (a parenthesis, a square bracket, etc.) the matching opening or closing bracket character will be highlighted.
setHighlightSyntax
data BufferSetHighlightSyntaxMethodInfo Source #
Instances
| ((~) * signature (Bool -> m ()), MonadIO m, IsBuffer a) => MethodInfo * BufferSetHighlightSyntaxMethodInfo a signature Source # | |
bufferSetHighlightSyntax Source #
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Controls whether syntax is highlighted in the buffer. If highlight
is True, the text will be highlighted according to the syntax
patterns specified in the language set with
bufferSetLanguage. If highlight is False, syntax highlighting
is disabled and all the GtkTextTag objects that have been added by the
syntax highlighting engine are removed from the buffer.
setImplicitTrailingNewline
data BufferSetImplicitTrailingNewlineMethodInfo Source #
Instances
| ((~) * signature (Bool -> m ()), MonadIO m, IsBuffer a) => MethodInfo * BufferSetImplicitTrailingNewlineMethodInfo a signature Source # | |
bufferSetImplicitTrailingNewline Source #
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> Bool |
|
| -> m () |
Sets whether the buffer has an implicit trailing newline.
If an explicit trailing newline is present in a TextBuffer, TextView
shows it as an empty line. This is generally not what the user expects.
If implicitTrailingNewline is True (the default value):
- when a FileLoader loads the content of a file into the buffer,
the trailing newline (if present in the file) is not inserted into the
buffer.
- when a FileSaver saves the content of the buffer into a file, a
trailing newline is added to the file.
On the other hand, if implicitTrailingNewline is False, the file's
content is not modified when loaded into the buffer, and the buffer's
content is not modified when saved into a file.
Since: 3.14
setLanguage
data BufferSetLanguageMethodInfo Source #
Instances
| ((~) * signature (Maybe b -> m ()), MonadIO m, IsBuffer a, IsLanguage b) => MethodInfo * BufferSetLanguageMethodInfo a signature Source # | |
Arguments
| :: (MonadIO m, IsBuffer a, IsLanguage b) | |
| => a |
|
| -> Maybe b | |
| -> m () |
Associate a Language with the buffer. If language is
not-Nothing and syntax highlighting is enabled (see bufferSetHighlightSyntax),
the syntax patterns defined in language will be used to highlight the text
contained in the buffer. If language is Nothing, the text contained in the
buffer is not highlighted.
The buffer holds a reference to language.
setMaxUndoLevels
data BufferSetMaxUndoLevelsMethodInfo Source #
Instances
| ((~) * signature (Int32 -> m ()), MonadIO m, IsBuffer a) => MethodInfo * BufferSetMaxUndoLevelsMethodInfo a signature Source # | |
bufferSetMaxUndoLevels Source #
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> Int32 |
|
| -> m () |
Sets the number of undo levels for user actions the buffer will track. If the number of user actions exceeds the limit set by this function, older actions will be discarded.
If maxUndoLevels is -1, the undo/redo is unlimited.
If maxUndoLevels is 0, the undo/redo is disabled.
setStyleScheme
data BufferSetStyleSchemeMethodInfo Source #
Instances
| ((~) * signature (Maybe b -> m ()), MonadIO m, IsBuffer a, IsStyleScheme b) => MethodInfo * BufferSetStyleSchemeMethodInfo a signature Source # | |
Arguments
| :: (MonadIO m, IsBuffer a, IsStyleScheme b) | |
| => a |
|
| -> Maybe b |
|
| -> m () |
Sets style scheme used by the buffer. If scheme is Nothing no
style scheme is used.
setUndoManager
data BufferSetUndoManagerMethodInfo Source #
Instances
| ((~) * signature (Maybe b -> m ()), MonadIO m, IsBuffer a, IsUndoManager b) => MethodInfo * BufferSetUndoManagerMethodInfo a signature Source # | |
Arguments
| :: (MonadIO m, IsBuffer a, IsUndoManager b) | |
| => a |
|
| -> Maybe b |
|
| -> m () |
Set the buffer undo manager. If manager is Nothing the default undo manager
will be set.
sortLines
Arguments
| :: (MonadIO m, IsBuffer a) | |
| => a |
|
| -> TextIter |
|
| -> TextIter |
|
| -> [SortFlags] |
|
| -> Int32 |
|
| -> m () |
Sort the lines of text between the specified iterators.
Since: 3.18
undo
data BufferUndoMethodInfo Source #
Instances
| ((~) * signature (m ()), MonadIO m, IsBuffer a) => MethodInfo * BufferUndoMethodInfo a signature Source # | |
Undoes the last user action which modified the buffer. Use
bufferCanUndo to check whether a call to this
function will have any effect.
This function emits the GI.GtkSource.Objects.Buffer.Buffer::undo signal.
Properties
canRedo
data BufferCanRedoPropertyInfo Source #
Instances
canUndo
data BufferCanUndoPropertyInfo Source #
Instances
highlightMatchingBrackets
data BufferHighlightMatchingBracketsPropertyInfo Source #
Instances
bufferHighlightMatchingBrackets :: AttrLabelProxy "highlightMatchingBrackets" Source #
constructBufferHighlightMatchingBrackets :: IsBuffer o => Bool -> IO (GValueConstruct o) Source #
highlightSyntax
data BufferHighlightSyntaxPropertyInfo Source #
Instances
bufferHighlightSyntax :: AttrLabelProxy "highlightSyntax" Source #
constructBufferHighlightSyntax :: IsBuffer o => Bool -> IO (GValueConstruct o) Source #
implicitTrailingNewline
data BufferImplicitTrailingNewlinePropertyInfo Source #
Instances
bufferImplicitTrailingNewline :: AttrLabelProxy "implicitTrailingNewline" Source #
constructBufferImplicitTrailingNewline :: IsBuffer o => Bool -> IO (GValueConstruct o) Source #
language
data BufferLanguagePropertyInfo Source #
Instances
bufferLanguage :: AttrLabelProxy "language" Source #
clearBufferLanguage :: (MonadIO m, IsBuffer o) => o -> m () Source #
constructBufferLanguage :: (IsBuffer o, IsLanguage a) => a -> IO (GValueConstruct o) Source #
setBufferLanguage :: (MonadIO m, IsBuffer o, IsLanguage a) => o -> a -> m () Source #
maxUndoLevels
data BufferMaxUndoLevelsPropertyInfo Source #
Instances
bufferMaxUndoLevels :: AttrLabelProxy "maxUndoLevels" Source #
constructBufferMaxUndoLevels :: IsBuffer o => Int32 -> IO (GValueConstruct o) Source #
styleScheme
data BufferStyleSchemePropertyInfo Source #
Instances
bufferStyleScheme :: AttrLabelProxy "styleScheme" Source #
clearBufferStyleScheme :: (MonadIO m, IsBuffer o) => o -> m () Source #
constructBufferStyleScheme :: (IsBuffer o, IsStyleScheme a) => a -> IO (GValueConstruct o) Source #
getBufferStyleScheme :: (MonadIO m, IsBuffer o) => o -> m (Maybe StyleScheme) Source #
setBufferStyleScheme :: (MonadIO m, IsBuffer o, IsStyleScheme a) => o -> a -> m () Source #
undoManager
data BufferUndoManagerPropertyInfo Source #
Instances
bufferUndoManager :: AttrLabelProxy "undoManager" Source #
clearBufferUndoManager :: (MonadIO m, IsBuffer o) => o -> m () Source #
constructBufferUndoManager :: (IsBuffer o, IsUndoManager a) => a -> IO (GValueConstruct o) Source #
getBufferUndoManager :: (MonadIO m, IsBuffer o) => o -> m (Maybe UndoManager) Source #
setBufferUndoManager :: (MonadIO m, IsBuffer o, IsUndoManager a) => o -> a -> m () Source #
Signals
bracketMatched
type BufferBracketMatchedCallback = TextIter -> BracketMatchType -> IO () Source #
afterBufferBracketMatched :: (GObject a, MonadIO m) => a -> BufferBracketMatchedCallback -> m SignalHandlerId Source #
mk_BufferBracketMatchedCallback :: C_BufferBracketMatchedCallback -> IO (FunPtr C_BufferBracketMatchedCallback) Source #
onBufferBracketMatched :: (GObject a, MonadIO m) => a -> BufferBracketMatchedCallback -> m SignalHandlerId Source #
wrap_BufferBracketMatchedCallback :: BufferBracketMatchedCallback -> Ptr () -> Ptr TextIter -> CUInt -> Ptr () -> IO () Source #
highlightUpdated
type C_BufferHighlightUpdatedCallback = Ptr () -> Ptr TextIter -> Ptr TextIter -> Ptr () -> IO () Source #
afterBufferHighlightUpdated :: (GObject a, MonadIO m) => a -> BufferHighlightUpdatedCallback -> m SignalHandlerId Source #
mk_BufferHighlightUpdatedCallback :: C_BufferHighlightUpdatedCallback -> IO (FunPtr C_BufferHighlightUpdatedCallback) Source #
onBufferHighlightUpdated :: (GObject a, MonadIO m) => a -> BufferHighlightUpdatedCallback -> m SignalHandlerId Source #
wrap_BufferHighlightUpdatedCallback :: BufferHighlightUpdatedCallback -> Ptr () -> Ptr TextIter -> Ptr TextIter -> Ptr () -> IO () Source #
redo
type BufferRedoCallback = IO () Source #
data BufferRedoSignalInfo Source #
Instances
afterBufferRedo :: (GObject a, MonadIO m) => a -> BufferRedoCallback -> m SignalHandlerId Source #
onBufferRedo :: (GObject a, MonadIO m) => a -> BufferRedoCallback -> m SignalHandlerId Source #
wrap_BufferRedoCallback :: BufferRedoCallback -> Ptr () -> Ptr () -> IO () Source #
sourceMarkUpdated
type BufferSourceMarkUpdatedCallback = TextMark -> IO () Source #
afterBufferSourceMarkUpdated :: (GObject a, MonadIO m) => a -> BufferSourceMarkUpdatedCallback -> m SignalHandlerId Source #
mk_BufferSourceMarkUpdatedCallback :: C_BufferSourceMarkUpdatedCallback -> IO (FunPtr C_BufferSourceMarkUpdatedCallback) Source #
onBufferSourceMarkUpdated :: (GObject a, MonadIO m) => a -> BufferSourceMarkUpdatedCallback -> m SignalHandlerId Source #
wrap_BufferSourceMarkUpdatedCallback :: BufferSourceMarkUpdatedCallback -> Ptr () -> Ptr TextMark -> Ptr () -> IO () Source #
undo
type BufferUndoCallback = IO () Source #
data BufferUndoSignalInfo Source #
Instances
afterBufferUndo :: (GObject a, MonadIO m) => a -> BufferUndoCallback -> m SignalHandlerId Source #
onBufferUndo :: (GObject a, MonadIO m) => a -> BufferUndoCallback -> m SignalHandlerId Source #
wrap_BufferUndoCallback :: BufferUndoCallback -> Ptr () -> Ptr () -> IO () Source #