Class View.Builder<B extends View.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,Accessible.Builder<B>
,Scrollable.Builder<B>
- Direct Known Subclasses:
Map.Builder
- Enclosing class:
View
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theView
object.onChangeCase
(View.ChangeCaseCallback handler) Keybinding signal to change case of the text at the current cursor position.onChangeNumber
(View.ChangeNumberCallback handler) Keybinding signal to edit a number at the current cursor position.onJoinLines
(View.JoinLinesCallback handler) Keybinding signal to join the lines currently selected.Emitted when a line mark has been activated (for instance when there was a button press in the line marks gutter).onMoveLines
(View.MoveLinesCallback handler) The signal is a keybinding which gets emitted when the user initiates moving a line.Keybinding signal to move the cursor to the matching bracket.onMoveWords
(View.MoveWordsCallback handler) The signal is a keybinding which gets emitted when the user initiates moving a word.onPushSnippet
(View.PushSnippetCallback handler) The signal is emitted to insert a new snippet into the view.The signal is a key binding signal which gets emitted when the user requests a completion, by pressing <keycombo><keycap>Control</keycap><keycap>space</keycap></keycombo>.onSmartHomeEnd
(View.SmartHomeEndCallback handler) Emitted when a the cursor was moved according to the smart home end setting.setAutoIndent
(boolean autoIndent) setBackgroundPattern
(BackgroundPatternType backgroundPattern) Draw a specific background pattern on the view.setEnableSnippets
(boolean enableSnippets) The property denotes if snippets should be expanded when the user presses Tab after having typed a word matching the snippets found inSnippetManager
.setHighlightCurrentLine
(boolean highlightCurrentLine) setIndenter
(Indenter indenter) setIndentOnTab
(boolean indentOnTab) setIndentWidth
(int indentWidth) Width of an indentation step expressed in number of spaces.setInsertSpacesInsteadOfTabs
(boolean insertSpacesInsteadOfTabs) setRightMarginPosition
(int rightMarginPosition) Position of the right margin.setShowLineMarks
(boolean showLineMarks) Whether to display line mark pixbufssetShowLineNumbers
(boolean showLineNumbers) Whether to display line numberssetShowRightMargin
(boolean showRightMargin) Whether to display the right margin.setSmartBackspace
(boolean smartBackspace) Whether smart Backspace should be used.setSmartHomeEnd
(SmartHomeEndType smartHomeEnd) Set the behavior of the HOME and END keys.setTabWidth
(int tabWidth) Width of a tab character expressed in number of spaces.Methods inherited from class org.gnome.gtk.TextView.Builder
onBackspace, onCopyClipboard, onCutClipboard, onDeleteFromCursor, onExtendSelection, onInsertAtCursor, onInsertEmoji, onMoveCursor, onMoveViewport, onPasteClipboard, onPreeditChanged, onSelectAll, onSetAnchor, onToggleCursorVisible, onToggleOverwrite, setAcceptsTab, setBottomMargin, setBuffer, setCursorVisible, setEditable, setExtraMenu, setImModule, setIndent, setInputHints, setInputHints, setInputPurpose, setJustification, setLeftMargin, setMonospace, setOverwrite, setPixelsAboveLines, setPixelsBelowLines, setPixelsInsideWrap, setRightMargin, setTabs, setTopMargin, setWrapMode
Methods inherited from class org.gnome.gtk.Widget.Builder
onDestroy, onDirectionChanged, onHide, onKeynavFailed, onMap, onMnemonicActivate, onMoveFocus, onQueryTooltip, onRealize, onShow, onStateFlagsChanged, onUnmap, onUnrealize, setCanFocus, setCanTarget, setCssClasses, setCssName, setCursor, setFocusable, setFocusOnClick, setHalign, setHasTooltip, setHeightRequest, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setReceivesDefault, setSensitive, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible, setWidthRequest
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.gnome.gtk.Accessible.Builder
setAccessibleRole
Methods inherited from interface io.github.jwharm.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArena
Methods inherited from interface org.gnome.gtk.Scrollable.Builder
setHadjustment, setHscrollPolicy, setVadjustment, setVscrollPolicy
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theView
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 toView
.- Overrides:
build
in classTextView.Builder<B extends View.Builder<B>>
- Returns:
- a new instance of
View
with the properties that were set in the Builder object.
-
setAutoIndent
-
setBackgroundPattern
Draw a specific background pattern on the view.- Parameters:
backgroundPattern
- the value for thebackground-pattern
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setEnableSnippets
The property denotes if snippets should be expanded when the user presses Tab after having typed a word matching the snippets found inSnippetManager
.The user may tab through focus-positions of the snippet if any are available by pressing Tab repeatedly until the desired focus position is selected.
- Parameters:
enableSnippets
- the value for theenable-snippets
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setHighlightCurrentLine
-
setIndentOnTab
-
setIndentWidth
Width of an indentation step expressed in number of spaces.- Parameters:
indentWidth
- the value for theindent-width
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setIndenter
-
setInsertSpacesInsteadOfTabs
-
setRightMarginPosition
Position of the right margin.- Parameters:
rightMarginPosition
- the value for theright-margin-position
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setShowLineMarks
Whether to display line mark pixbufs- Parameters:
showLineMarks
- the value for theshow-line-marks
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setShowLineNumbers
Whether to display line numbers- Parameters:
showLineNumbers
- the value for theshow-line-numbers
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setShowRightMargin
Whether to display the right margin.- Parameters:
showRightMargin
- the value for theshow-right-margin
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSmartBackspace
Whether smart Backspace should be used.- Parameters:
smartBackspace
- the value for thesmart-backspace
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSmartHomeEnd
Set the behavior of the HOME and END keys.- Parameters:
smartHomeEnd
- the value for thesmart-home-end
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTabWidth
Width of a tab character expressed in number of spaces.- Parameters:
tabWidth
- the value for thetab-width
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onChangeCase
Keybinding signal to change case of the text at the current cursor position.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onChangeNumber
Keybinding signal to edit a number at the current cursor position.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onJoinLines
Keybinding signal to join the lines currently selected.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onLineMarkActivated
Emitted when a line mark has been activated (for instance when there was a button press in the line marks gutter).You can use
iter
to determine on which line the activation took place.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onMoveLines
The signal is a keybinding which gets emitted when the user initiates moving a line.The default binding key is Alt+Up/Down arrow. And moves the currently selected lines, or the current line up or down by one line.
- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onMoveToMatchingBracket
Keybinding signal to move the cursor to the matching bracket.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onMoveWords
The signal is a keybinding which gets emitted when the user initiates moving a word.The default binding key is Alt+Left/Right Arrow and moves the current selection, or the current word by one word.
- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onPushSnippet
The signal is emitted to insert a new snippet into the view.If another snippet was active, it will be paused until all focus positions of
snippet
have been exhausted.location
will be updated to point at the end of the snippet.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onShowCompletion
The signal is a key binding signal which gets emitted when the user requests a completion, by pressing <keycombo><keycap>Control</keycap><keycap>space</keycap></keycombo>.This will create a
CompletionContext
with the activation type asCompletionActivation.USER_REQUESTED
.Applications should not connect to it, but may emit it with
GObjects.signalEmitByName(org.gnome.gobject.GObject, java.lang.String, java.lang.Object...)
if they need to activate the completion by another means, for example with another key binding or a menu entry.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onSmartHomeEnd
Emitted when a the cursor was moved according to the smart home end setting.The signal is emitted after the cursor is moved, but during the
Gtk.TextView::move-cursor
action. This can be used to find out whether the cursor was moved by a normal home/end or by a smart home/end.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-