Package org.gnome.gtksourceview
Class Buffer.Builder<B extends Buffer.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gtk.TextBuffer.Builder<B>
org.gnome.gtksourceview.Buffer.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
Buffer
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theBuffer
object.iter
is set to a valid iterator pointing to the matching bracket ifstate
isBracketMatchType.FOUND
.onCursorMoved
(Buffer.CursorMovedCallback handler) The "cursor-moved" signal is emitted when then insertion mark has moved.The ::highlight-updated signal is emitted when the syntax highlighting and context classes are updated in a certain region of thebuffer
.The ::source-mark-updated signal is emitted each time a mark is added to, moved or removed from thebuffer
.setHighlightMatchingBrackets
(boolean highlightMatchingBrackets) Whether to highlight matching brackets in the buffer.setHighlightSyntax
(boolean highlightSyntax) Whether to highlight syntax in the buffer.setImplicitTrailingNewline
(boolean implicitTrailingNewline) Whether the buffer has an implicit trailing newline.setLanguage
(Language language) setStyleScheme
(StyleScheme styleScheme) Style scheme.Methods inherited from class org.gnome.gtk.TextBuffer.Builder
onApplyTag, onBeginUserAction, onChanged, onDeleteRange, onEndUserAction, onInsertChildAnchor, onInsertPaintable, onInsertText, onMarkDeleted, onMarkSet, onModifiedChanged, onPasteDone, onRedo, onRemoveTag, onUndo, setEnableUndo, setTagTable, setText
Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theBuffer
object. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])
to create a new GObject instance, which is then cast toBuffer
.- Overrides:
build
in classTextBuffer.Builder<B extends Buffer.Builder<B>>
- Returns:
- a new instance of
Buffer
with the properties that were set in the Builder object.
-
setHighlightMatchingBrackets
Whether to highlight matching brackets in the buffer.- Parameters:
highlightMatchingBrackets
- the value for thehighlight-matching-brackets
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setHighlightSyntax
Whether to highlight syntax in the buffer.- Parameters:
highlightSyntax
- the value for thehighlight-syntax
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setImplicitTrailingNewline
Whether the buffer has an implicit trailing newline. SeeBuffer.setImplicitTrailingNewline(boolean)
.- Parameters:
implicitTrailingNewline
- the value for theimplicit-trailing-newline
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setLanguage
-
setStyleScheme
Style scheme. It contains styles for syntax highlighting, optionally foreground, background, cursor color, current line color, and matching brackets style.- Parameters:
styleScheme
- the value for thestyle-scheme
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onBracketMatched
iter
is set to a valid iterator pointing to the matching bracket ifstate
isBracketMatchType.FOUND
. Otherwiseiter
is meaningless.The signal is emitted only when the
state
changes, typically when the cursor moves.A use-case for this signal is to show messages in a
Statusbar
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onCursorMoved
The "cursor-moved" signal is emitted when then insertion mark has moved.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onHighlightUpdated
The ::highlight-updated signal is emitted when the syntax highlighting and context classes are updated in a certain region of thebuffer
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onSourceMarkUpdated
The ::source-mark-updated signal is emitted each time a mark is added to, moved or removed from thebuffer
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-