Skip to main content

Type Alias: GtkTextViewProps

GtkTextViewProps = WidgetProps & object

Defined in: generated/jsx.ts:10302

Props for the GtkTextView widget.

Type Declaration

NameTypeDescriptionDefined in
acceptsTab?booleanWhether Tab will result in a tab character being entered.generated/jsx.ts:10304
bottomMargin?numberThe bottom margin for text in the text view. Note that this property is confusingly named. In CSS terms, the value set here is padding, and it is applied in addition to the padding from the theme. Don't confuse this property with Widget.margin-bottom.generated/jsx.ts:10314
children?ReactNode-generated/jsx.ts:10586
cursorVisible?booleanIf the insertion cursor is shown.generated/jsx.ts:10316
editable?booleanWhether the text can be modified by the user.generated/jsx.ts:10318
extraMenu?Gio.MenuModelA menu model whose contents will be appended to the context menu.generated/jsx.ts:10320
hadjustment?Gtk.AdjustmentHorizontal GtkAdjustment of the scrollable widget. This adjustment is shared between the scrollable widget and its parent.generated/jsx.ts:10406
hscrollPolicy?Gtk.ScrollablePolicyDetermines when horizontal scrolling should start.generated/jsx.ts:10408
imModule?stringWhich IM (input method) module should be used for this text_view. See IMMulticontext. Setting this to a non-%NULL value overrides the system-wide IM module setting. See the GtkSettings Settings.gtk-im-module property.generated/jsx.ts:10329
indent?numberAmount to indent the paragraph, in pixels. A negative value of indent will produce a hanging indentation. That is, the first line will have the full width, and subsequent lines will be indented by the absolute value of indent.generated/jsx.ts:10337
inputHints?Gtk.InputHintsAdditional hints (beyond TextView.input-purpose) that allow input methods to fine-tune their behaviour.generated/jsx.ts:10342
inputPurpose?Gtk.InputPurposeThe purpose of this text field. This property can be used by on-screen keyboards and other input methods to adjust their behaviour.generated/jsx.ts:10349
justification?Gtk.JustificationLeft, right, or center justification.generated/jsx.ts:10351
leftMargin?numberThe default left margin for text in the text view. Tags in the buffer may override the default. Note that this property is confusingly named. In CSS terms, the value set here is padding, and it is applied in addition to the padding from the theme.generated/jsx.ts:10361
monospace?booleanWhether text should be displayed in a monospace font. If %TRUE, set the .monospace style class on the text view to indicate that a monospace font is desired.generated/jsx.ts:10368
onBackspace()?(self) => void | nullGets emitted when the user asks for it. The ::backspace signal is a keybinding signal. The default bindings for this signal are Backspace and Shift+Backspace.generated/jsx.ts:10425
onCopyClipboard()?(self) => void | nullGets emitted to copy the selection to the clipboard. The ::copy-clipboard signal is a keybinding signal. The default bindings for this signal are Ctrl+c and Ctrl+Insert.generated/jsx.ts:10435
onCutClipboard()?(self) => void | nullGets emitted to cut the selection to the clipboard. The ::cut-clipboard signal is a keybinding signal. The default bindings for this signal are Ctrl+x and Shift+Delete.generated/jsx.ts:10445
onDeleteFromCursor()?(self, type, count) => void | nullGets emitted when the user initiates a text deletion. The ::delete-from-cursor signal is a keybinding signal. If the type is %GTK_DELETE_CHARS, GTK deletes the selection if there is one, otherwise it deletes the requested number of characters. The default bindings for this signal are Delete for deleting a character, Ctrl+Delete for deleting a word and Ctrl+Backspace for deleting a word backwards.generated/jsx.ts:10460
onExtendSelection()?(self, granularity, location, start, end) => boolean | nullEmitted when the selection needs to be extended at location.generated/jsx.ts:10462
onInsertAtCursor()?(self, string) => void | nullGets emitted when the user initiates the insertion of a fixed string at the cursor. The ::insert-at-cursor signal is a keybinding signal. This signal has no default bindings.generated/jsx.ts:10477
onInsertEmoji()?(self) => void | nullGets emitted to present the Emoji chooser for the text_view. The ::insert-emoji signal is a keybinding signal. The default bindings for this signal are Ctrl+. and Ctrl+;generated/jsx.ts:10487
onMoveCursor()?(self, step, count, extendSelection) => void | nullGets emitted when the user initiates a cursor movement. The ::move-cursor signal is a keybinding signal. If the cursor is not visible in text_view, this signal causes the viewport to be moved instead. Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control the cursor programmatically. The default bindings for this signal come in two variants, the variant with the Shift modifier extends the selection, the variant without it does not. There are too many key combinations to list them all here. - , , , move by individual characters/lines - Ctrl+, etc. move by words/paragraphs - Home and End move to the ends of the buffer - PgUp and PgDn move vertically by pages - Ctrl+PgUp and Ctrl+PgDn move horizontally by pagesgenerated/jsx.ts:10512
onMoveViewport()?(self, step, count) => void | nullGets emitted to move the viewport. The ::move-viewport signal is a keybinding signal, which can be bound to key combinations to allow the user to move the viewport, i.e. change what part of the text view is visible in a containing scrolled window. There are no default bindings for this signal.generated/jsx.ts:10523
onNotify?(self, propName) => void | nullCalled when any property on this widget changes. Param The widget that emitted the notification Param The name of the property that changed (in kebab-case)generated/jsx.ts:10592
onPasteClipboard()?(self) => void | nullGets emitted to paste the contents of the clipboard into the text view. The ::paste-clipboard signal is a keybinding signal. The default bindings for this signal are Ctrl+v and Shift+Insert.generated/jsx.ts:10534
onPreeditChanged()?(self, preedit) => void | nullEmitted when preedit text of the active IM changes. If an input method is used, the typed text will not immediately be committed to the buffer. So if you are interested in the text, connect to this signal. This signal is only emitted if the text at the given position is actually editable.generated/jsx.ts:10545
onSelectAll()?(self, select) => void | nullGets emitted to select or unselect the complete contents of the text view. The ::select-all signal is a keybinding signal. The default bindings for this signal are Ctrl+a and Ctrl+/ for selecting and Shift+Ctrl+a and Ctrl+`` for unselecting.generated/jsx.ts:10557
onSetAnchor()?(self) => void | nullGets emitted when the user initiates settings the "anchor" mark. The ::set-anchor signal is a keybinding signal which gets emitted when the user initiates setting the "anchor" mark. The "anchor" mark gets placed at the same position as the "insert" mark. This signal has no default bindings.generated/jsx.ts:10568
onToggleCursorVisible()?(self) => void | nullGets emitted to toggle the cursor-visible property. The ::toggle-cursor-visible signal is a keybinding signal. The default binding for this signal is F7.generated/jsx.ts:10577
onToggleOverwrite()?(self) => void | nullGets emitted to toggle the overwrite mode of the text view. The ::toggle-overwrite signal is a keybinding signal. The default binding for this signal is Insert.generated/jsx.ts:10585
overwrite?booleanWhether entered text overwrites existing contents.generated/jsx.ts:10370
pixelsAboveLines?numberPixels of blank space above paragraphs.generated/jsx.ts:10372
pixelsBelowLines?numberPixels of blank space below paragraphs.generated/jsx.ts:10374
pixelsInsideWrap?numberPixels of blank space between wrapped lines in a paragraph.generated/jsx.ts:10376
ref?Ref<Gtk.TextView>-generated/jsx.ts:10623
rightMargin?numberThe default right margin for text in the text view. Tags in the buffer may override the default. Note that this property is confusingly named. In CSS terms, the value set here is padding, and it is applied in addition to the padding from the theme.generated/jsx.ts:10386
tabs?Pango.TabArray | nullCustom tabs for this text.generated/jsx.ts:10388
topMargin?numberThe top margin for text in the text view. Note that this property is confusingly named. In CSS terms, the value set here is padding, and it is applied in addition to the padding from the theme. Don't confuse this property with Widget.margin-top.generated/jsx.ts:10398
vadjustment?Gtk.AdjustmentVertical GtkAdjustment of the scrollable widget. This adjustment is shared between the scrollable widget and its parent.generated/jsx.ts:10414
vscrollPolicy?Gtk.ScrollablePolicyDetermines when vertical scrolling should start.generated/jsx.ts:10416
wrapMode?Gtk.WrapModeWhether to wrap lines never, at word boundaries, or at character boundaries.generated/jsx.ts:10400