Skip to main content

Type Alias: GtkSourceViewProps

GtkSourceViewProps = GtkTextViewProps & object

Defined in: generated/jsx.ts:8968

Props for the GtkSourceView widget.

Type Declaration

NameTypeDescriptionDefined in
autoIndent?boolean-generated/jsx.ts:8969
backgroundPattern?GtkSource.BackgroundPatternTypeDraw a specific background pattern on the view.generated/jsx.ts:8971
children?ReactNode-generated/jsx.ts:9099
enableSnippets?booleanThe property denotes if snippets should be expanded when the user presses Tab after having typed a word matching the snippets found in GtkSourceSnippetManager. 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.generated/jsx.ts:8981
enableUndo?booleanWhether to enable undo/redogenerated/jsx.ts:9074
highlightCurrentLine?boolean-generated/jsx.ts:8982
highlightMatchingBrackets?booleanWhether to highlight matching brackets when cursor is on a bracket. Defaults to true.generated/jsx.ts:9092
highlightSyntax?booleanWhether to enable syntax highlighting. Defaults to true when language is set.generated/jsx.ts:9090
implicitTrailingNewline?booleanWhether the buffer has an implicit trailing newline.generated/jsx.ts:9094
indenter?GtkSource.Indenter | nullThe property is a GtkSourceIndenter to use to indent as the user types into the GtkSourceView.generated/jsx.ts:8990
indentOnTab?boolean-generated/jsx.ts:8983
indentWidth?numberWidth of an indentation step expressed in number of spaces.generated/jsx.ts:8985
insertSpacesInsteadOfTabs?boolean-generated/jsx.ts:8991
language?string | GtkSource.LanguageLanguage for syntax highlighting. Can be a language ID string (e.g., "typescript", "python") or a GtkSource.Language object.generated/jsx.ts:9086
onBufferChanged?(buffer) => void | nullCallback when the buffer content changes. Use buffer.getText() to extract text.generated/jsx.ts:9076
onCanRedoChanged?(canRedo) => void | nullCallback when can-redo state changesgenerated/jsx.ts:9084
onCanUndoChanged?(canUndo) => void | nullCallback when can-undo state changesgenerated/jsx.ts:9082
onChangeCase?(caseType, self) => void | nullKeybinding signal to change case of the text at the current cursor position.generated/jsx.ts:9007
onChangeNumber?(count, self) => void | nullKeybinding signal to edit a number at the current cursor position.generated/jsx.ts:9009
onCursorMoved?() => void | nullCallback when the cursor position changesgenerated/jsx.ts:9096
onHighlightUpdated?(start, end) => void | nullCallback when syntax highlighting is updated for a regiongenerated/jsx.ts:9098
onJoinLines?(self) => void | nullKeybinding signal to join the lines currently selected.generated/jsx.ts:9011
onLineMarkActivated?(iter, button, state, nPresses, self) => void | nullEmitted 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.generated/jsx.ts:9018
onMoveLines?(down, self) => void | nullThe 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.generated/jsx.ts:9033
onMoveToMatchingBracket?(extendSelection, self) => void | nullKeybinding signal to move the cursor to the matching bracket.generated/jsx.ts:9035
onMoveWords?(count, self) => void | nullThe 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.generated/jsx.ts:9042
onPushSnippet?(snippet, location, self) => void | nullThe 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.generated/jsx.ts:9050
onShowCompletion?(self) => void | nullThe signal is a key binding signal which gets emitted when the user requests a completion, by pressing Controlspace. This will create a GtkSourceCompletionContext with the activation type as %GTK_SOURCE_COMPLETION_ACTIVATION_USER_REQUESTED. Applications should not connect to it, but may emit it with GObjectsignal_emit_by_name if they need to activate the completion by another means, for example with another key binding or a menu entry.generated/jsx.ts:9063
onSmartHomeEnd?(iter, count, self) => void | nullEmitted 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 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.generated/jsx.ts:9072
onTextDeleted?(buffer, startOffset, endOffset) => void | nullCallback when text is deleted from the buffergenerated/jsx.ts:9080
onTextInserted?(buffer, offset, text) => void | nullCallback when text is inserted into the buffergenerated/jsx.ts:9078
ref?Ref<GtkSource.View>-generated/jsx.ts:9100
rightMarginPosition?numberPosition of the right margin.generated/jsx.ts:8993
showLineMarks?booleanWhether to display line mark pixbufsgenerated/jsx.ts:8995
showLineNumbers?booleanWhether to display line numbersgenerated/jsx.ts:8997
showRightMargin?booleanWhether to display the right margin.generated/jsx.ts:8999
smartBackspace?booleanWhether smart Backspace should be used.generated/jsx.ts:9001
smartHomeEnd?GtkSource.SmartHomeEndTypeSet the behavior of the HOME and END keys.generated/jsx.ts:9003
styleScheme?string | GtkSource.StyleSchemeStyle scheme for syntax highlighting colors. Can be a scheme ID string (e.g., "Adwaita-dark") or a GtkSource.StyleScheme object.generated/jsx.ts:9088
tabWidth?numberWidth of a tab character expressed in number of spaces.generated/jsx.ts:9005