Interface: TextViewProps
Defined in: react/src/generated/jsx.ts:5776
Props for the TextView widget.
Extends
Properties
acceptsTab?
optionalacceptsTab:boolean
Defined in: react/src/generated/jsx.ts:5778
Whether Tab will result in a tab character being entered.
bottomMargin?
optionalbottomMargin:number
Defined in: react/src/generated/jsx.ts:5788
The 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 [property@Gtk.Widget:margin-bottom].
buffer?
optionalbuffer:TextBuffer
Defined in: react/src/generated/jsx.ts:5790
The buffer which is displayed.
canFocus?
optionalcanFocus:boolean
Defined in: react/src/generated/jsx.ts:412
Whether the widget or any of its descendents can accept the input focus.
This property is meant to be set by widget implementations, typically in their instance init function.
Inherited from
canTarget?
optionalcanTarget:boolean
Defined in: react/src/generated/jsx.ts:414
Whether the widget can receive pointer events.
Inherited from
children?
optionalchildren:ReactNode
Defined in: react/src/generated/jsx.ts:688
Inherited from
cssClasses?
optionalcssClasses:string[]
Defined in: react/src/generated/jsx.ts:416
A list of css classes applied to this widget.
Inherited from
cssName?
optionalcssName:string
Defined in: react/src/generated/jsx.ts:423
The name of this widget in the CSS tree.
This property is meant to be set by widget implementations, typically in their instance init function.
Inherited from
cursor?
optionalcursor:number
Defined in: react/src/generated/jsx.ts:425
The cursor used by @widget.
Inherited from
cursorVisible?
optionalcursorVisible:boolean
Defined in: react/src/generated/jsx.ts:5792
If the insertion cursor is shown.
editable?
optionaleditable:boolean
Defined in: react/src/generated/jsx.ts:5794
Whether the text can be modified by the user.
extraMenu?
optionalextraMenu:number
Defined in: react/src/generated/jsx.ts:5796
A menu model whose contents will be appended to the context menu.
focusable?
optionalfocusable:boolean
Defined in: react/src/generated/jsx.ts:433
Whether this widget itself will accept the input focus.
Inherited from
focusOnClick?
optionalfocusOnClick:boolean
Defined in: react/src/generated/jsx.ts:431
Whether the widget should grab focus when it is clicked with the mouse.
This property is only relevant for widgets that can take focus.
Inherited from
hadjustment?
optionalhadjustment:Adjustment
Defined in: react/src/generated/jsx.ts:5882
Horizontal GtkAdjustment of the scrollable widget.
This adjustment is shared between the scrollable widget and its parent.
halign?
optionalhalign:Align
Defined in: react/src/generated/jsx.ts:435
How to distribute horizontal space if widget gets extra space.
Inherited from
hasDefault?
optionalhasDefault:boolean
Defined in: react/src/generated/jsx.ts:437
Whether the widget is the default widget.
Inherited from
hasFocus?
optionalhasFocus:boolean
Defined in: react/src/generated/jsx.ts:439
Whether the widget has the input focus.
Inherited from
hasTooltip?
optionalhasTooltip:boolean
Defined in: react/src/generated/jsx.ts:448
Enables or disables the emission of the [signal@Gtk.Widget::query-tooltip] signal on @widget.
A true value indicates that widget can have a tooltip, in this case
the widget will be queried using [signal@Gtk.Widget::query-tooltip] to
determine whether it will provide a tooltip or not.
Inherited from
heightRequest?
optionalheightRequest:number
Defined in: react/src/generated/jsx.ts:454
Overrides for height request of the widget.
If this is -1, the natural request will be used.
Inherited from
hexpand?
optionalhexpand:boolean
Defined in: react/src/generated/jsx.ts:456
Whether to expand horizontally.
Inherited from
hexpandSet?
optionalhexpandSet:boolean
Defined in: react/src/generated/jsx.ts:458
Whether to use the hexpand property.
Inherited from
hscrollPolicy?
optionalhscrollPolicy:ScrollablePolicy
Defined in: react/src/generated/jsx.ts:5884
Determines when horizontal scrolling should start.
imModule?
optionalimModule:string
Defined in: react/src/generated/jsx.ts:5805
Which IM (input method) module should be used for this text_view.
See [class@Gtk.IMMulticontext].
Setting this to a non-%NULL value overrides the system-wide IM module setting. See the GtkSettings [property@Gtk.Settings:gtk-im-module] property.
indent?
optionalindent:number
Defined in: react/src/generated/jsx.ts:5813
Amount 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.
inputHints?
optionalinputHints:InputHints
Defined in: react/src/generated/jsx.ts:5818
Additional hints (beyond [property@Gtk.TextView:input-purpose]) that allow input methods to fine-tune their behaviour.
inputPurpose?
optionalinputPurpose:InputPurpose
Defined in: react/src/generated/jsx.ts:5825
The purpose of this text field.
This property can be used by on-screen keyboards and other input methods to adjust their behaviour.
justification?
optionaljustification:Justification
Defined in: react/src/generated/jsx.ts:5827
Left, right, or center justification.
layoutManager?
optionallayoutManager:LayoutManager
Defined in: react/src/generated/jsx.ts:466
The [class@Gtk.LayoutManager] instance to use to compute the preferred size of the widget, and allocate its children.
This property is meant to be set by widget implementations, typically in their instance init function.
Inherited from
leftMargin?
optionalleftMargin:number
Defined in: react/src/generated/jsx.ts:5837
The 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.
limitEvents?
optionallimitEvents:boolean
Defined in: react/src/generated/jsx.ts:475
Makes this widget act like a modal dialog, with respect to event delivery.
Global event controllers will not handle events with targets inside the widget, unless they are set up to ignore propagation limits. See [method@Gtk.EventController.set_propagation_limit].
Inherited from
marginBottom?
optionalmarginBottom:number
Defined in: react/src/generated/jsx.ts:483
Margin on bottom side of widget.
This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from [method@Gtk.Widget.set_size_request] for example.
Inherited from
marginEnd?
optionalmarginEnd:number
Defined in: react/src/generated/jsx.ts:494
Margin on end of widget, horizontally.
This property supports left-to-right and right-to-left text directions.
This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from [method@Gtk.Widget.set_size_request] for example.
Inherited from
marginStart?
optionalmarginStart:number
Defined in: react/src/generated/jsx.ts:505
Margin on start of widget, horizontally.
This property supports left-to-right and right-to-left text directions.
This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from [method@Gtk.Widget.set_size_request] for example.
Inherited from
marginTop?
optionalmarginTop:number
Defined in: react/src/generated/jsx.ts:513
Margin on top side of widget.
This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from [method@Gtk.Widget.set_size_request] for example.
Inherited from
monospace?
optionalmonospace:boolean
Defined in: react/src/generated/jsx.ts:5844
Whether 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.
name?
optionalname:string
Defined in: react/src/generated/jsx.ts:515
The name of the widget.
Inherited from
onBackspace()?
optionalonBackspace: (self) =>void
Defined in: react/src/generated/jsx.ts:5902
Gets 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.
Parameters
| Parameter | Type |
|---|---|
self | TextView |
Returns
void
onCopyClipboard()?
optionalonCopyClipboard: (self) =>void
Defined in: react/src/generated/jsx.ts:5912
Gets 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.
Parameters
| Parameter | Type |
|---|---|
self | TextView |
Returns
void
onCutClipboard()?
optionalonCutClipboard: (self) =>void
Defined in: react/src/generated/jsx.ts:5922
Gets 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.
Parameters
| Parameter | Type |
|---|---|
self | TextView |
Returns
void
onDeleteFromCursor()?
optionalonDeleteFromCursor: (self,type,count) =>void
Defined in: react/src/generated/jsx.ts:5937
Gets 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.
Parameters
| Parameter | Type |
|---|---|
self | TextView |
type | DeleteType |
count | number |
Returns
void
onDestroy()?
optionalonDestroy: (self) =>void
Defined in: react/src/generated/jsx.ts:593
Signals that all holders of a reference to the widget should release the reference that they hold.
May result in finalization of the widget if all references are released.
This signal is not suitable for saving widget state.
Parameters
| Parameter | Type |
|---|---|
self | Widget |
Returns
void
Inherited from
onDirectionChanged()?
optionalonDirectionChanged: (self,previousDirection) =>void
Defined in: react/src/generated/jsx.ts:595
Emitted when the text direction of a widget changes.
Parameters
| Parameter | Type |
|---|---|
self | Widget |
previousDirection | TextDirection |
Returns
void
Inherited from
WidgetProps.onDirectionChanged
onExtendSelection()?
optionalonExtendSelection: (self,granularity,location,start,end) =>boolean
Defined in: react/src/generated/jsx.ts:5943
Emitted when the selection needs to be extended at @location.
Parameters
| Parameter | Type |
|---|---|
self | TextView |
granularity | TextExtendSelection |
location | TextIter |
start | TextIter |
end | TextIter |
Returns
boolean
onHide()?
optionalonHide: (self) =>void
Defined in: react/src/generated/jsx.ts:600
Emitted when widget is hidden.
Parameters
| Parameter | Type |
|---|---|
self | Widget |
Returns
void
Inherited from
onInsertAtCursor()?
optionalonInsertAtCursor: (self,string) =>void
Defined in: react/src/generated/jsx.ts:5958
Gets 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.
Parameters
| Parameter | Type |
|---|---|
self | TextView |
string | string |
Returns
void
onInsertEmoji()?
optionalonInsertEmoji: (self) =>void
Defined in: react/src/generated/jsx.ts:5968
Gets 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+;
Parameters
| Parameter | Type |
|---|---|
self | TextView |
Returns
void
onKeynavFailed()?
optionalonKeynavFailed: (self,direction) =>boolean
Defined in: react/src/generated/jsx.ts:606
Emitted if keyboard navigation fails.
See [method@Gtk.Widget.keynav_failed] for details.
Parameters
| Parameter | Type |
|---|---|
self | Widget |
direction | DirectionType |
Returns
boolean
Inherited from
onMap()?
optionalonMap: (self) =>void
Defined in: react/src/generated/jsx.ts:618
Emitted when widget is going to be mapped.
A widget is mapped when the widget is visible (which is controlled with [property@Gtk.Widget:visible]) and all its parents up to the toplevel widget are also visible.
The ::map signal can be used to determine whether a widget will be drawn,
for instance it can resume an animation that was stopped during the
emission of [signal@Gtk.Widget::unmap].
Parameters
| Parameter | Type |
|---|---|
self | Widget |
Returns
void
Inherited from
onMnemonicActivate()?
optionalonMnemonicActivate: (self,groupCycling) =>boolean
Defined in: react/src/generated/jsx.ts:624
Emitted when a widget is activated via a mnemonic.
The default handler for this signal activates widget if group_cycling is false, or just makes widget grab focus if group_cycling is true.
Parameters
| Parameter | Type |
|---|---|
self | Widget |
groupCycling | boolean |
Returns
boolean
Inherited from
WidgetProps.onMnemonicActivate
onMoveCursor()?
optionalonMoveCursor: (self,step,count,extendSelection) =>void
Defined in: react/src/generated/jsx.ts:5994
Gets 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/linesCtrl+←, etc. move by words/paragraphsHomeandEndmove to the ends of the bufferPgUpandPgDnmove vertically by pagesCtrl+PgUpandCtrl+PgDnmove horizontally by pages
Parameters
| Parameter | Type |
|---|---|
self | TextView |
step | MovementStep |
count | number |
extendSelection | boolean |
Returns
void
onMoveFocus()?
optionalonMoveFocus: (self,direction) =>void
Defined in: react/src/generated/jsx.ts:633
Emitted when the focus is moved.
The ::move-focus signal is a keybinding signal.
The default bindings for this signal are Tab to move forward,
and Shift+Tab to move backward.
Parameters
| Parameter | Type |
|---|---|
self | Widget |
direction | DirectionType |
Returns
void
Inherited from
onMoveViewport()?
optionalonMoveViewport: (self,step,count) =>void
Defined in: react/src/generated/jsx.ts:6010
Gets 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.
Parameters
| Parameter | Type |
|---|---|
self | TextView |
step | ScrollStep |
count | number |
Returns
void
onPasteClipboard()?
optionalonPasteClipboard: (self) =>void
Defined in: react/src/generated/jsx.ts:6025
Gets 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.
Parameters
| Parameter | Type |
|---|---|
self | TextView |
Returns
void
onPreeditChanged()?
optionalonPreeditChanged: (self,preedit) =>void
Defined in: react/src/generated/jsx.ts:6036
Emitted 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.
Parameters
| Parameter | Type |
|---|---|
self | TextView |
preedit | string |
Returns
void
onQueryTooltip()?
optionalonQueryTooltip: (self,x,y,keyboardMode,tooltip) =>boolean
Defined in: react/src/generated/jsx.ts:648
Emitted when the widget’s tooltip is about to be shown.
This happens when the [property@Gtk.Widget:has-tooltip] property
is true and the hover timeout has expired with the cursor hovering
above @widget; or emitted when widget got focus in keyboard mode.
Using the given coordinates, the signal handler should determine
whether a tooltip should be shown for @widget. If this is the case
true should be returned, false otherwise. Note that if keyboard_mode is true, the values of x and y are undefined and should not be used.
The signal handler is free to manipulate tooltip with the therefore
destined function calls.
Parameters
| Parameter | Type |
|---|---|
self | Widget |
x | number |
y | number |
keyboardMode | boolean |
tooltip | Tooltip |
Returns
boolean
Inherited from
onRealize()?
optionalonRealize: (self) =>void
Defined in: react/src/generated/jsx.ts:661
Emitted when widget is associated with a GdkSurface.
This means that [method@Gtk.Widget.realize] has been called or the widget has been mapped (that is, it is going to be drawn).
Parameters
| Parameter | Type |
|---|---|
self | Widget |
Returns
void
Inherited from
onSelectAll()?
optionalonSelectAll: (self,select) =>void
Defined in: react/src/generated/jsx.ts:6048
Gets 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.
Parameters
| Parameter | Type |
|---|---|
self | TextView |
select | boolean |
Returns
void
onSetAnchor()?
optionalonSetAnchor: (self) =>void
Defined in: react/src/generated/jsx.ts:6059
Gets 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.
Parameters
| Parameter | Type |
|---|---|
self | TextView |
Returns
void
onShow()?
optionalonShow: (self) =>void
Defined in: react/src/generated/jsx.ts:663
Emitted when widget is shown.
Parameters
| Parameter | Type |
|---|---|
self | Widget |
Returns
void
Inherited from
onStateFlagsChanged()?
optionalonStateFlagsChanged: (self,flags) =>void
Defined in: react/src/generated/jsx.ts:669
Emitted when the widget state changes.
See [method@Gtk.Widget.get_state_flags].
Parameters
| Parameter | Type |
|---|---|
self | Widget |
flags | StateFlags |
Returns
void
Inherited from
WidgetProps.onStateFlagsChanged
onToggleCursorVisible()?
optionalonToggleCursorVisible: (self) =>void
Defined in: react/src/generated/jsx.ts:6068
Gets emitted to toggle the cursor-visible property.
The ::toggle-cursor-visible signal is a keybinding signal.
The default binding for this signal is F7.
Parameters
| Parameter | Type |
|---|---|
self | TextView |
Returns
void
onToggleOverwrite()?
optionalonToggleOverwrite: (self) =>void
Defined in: react/src/generated/jsx.ts:6076
Gets 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.
Parameters
| Parameter | Type |
|---|---|
self | TextView |
Returns
void
onUnmap()?
optionalonUnmap: (self) =>void
Defined in: react/src/generated/jsx.ts:679
Emitted when widget is going to be unmapped.
A widget is unmapped when either it or any of its parents up to the toplevel widget have been set as hidden.
As ::unmap indicates that a widget will not be shown any longer,
it can be used to, for example, stop an animation on the widget.
Parameters
| Parameter | Type |
|---|---|
self | Widget |
Returns
void
Inherited from
onUnrealize()?
optionalonUnrealize: (self) =>void
Defined in: react/src/generated/jsx.ts:686
Emitted when the GdkSurface associated with widget is destroyed.
This means that [method@Gtk.Widget.unrealize] has been called or the widget has been unmapped (that is, it is going to be hidden).
Parameters
| Parameter | Type |
|---|---|
self | Widget |
Returns
void
Inherited from
opacity?
optionalopacity:number
Defined in: react/src/generated/jsx.ts:517
The requested opacity of the widget.
Inherited from
overflow?
optionaloverflow:Overflow
Defined in: react/src/generated/jsx.ts:524
How content outside the widget's content area is treated.
This property is meant to be set by widget implementations, typically in their instance init function.
Inherited from
overwrite?
optionaloverwrite:boolean
Defined in: react/src/generated/jsx.ts:5846
Whether entered text overwrites existing contents.
parent?
optionalparent:Widget
Defined in: react/src/generated/jsx.ts:526
The parent widget of this widget.
Inherited from
pixelsAboveLines?
optionalpixelsAboveLines:number
Defined in: react/src/generated/jsx.ts:5848
Pixels of blank space above paragraphs.
pixelsBelowLines?
optionalpixelsBelowLines:number
Defined in: react/src/generated/jsx.ts:5850
Pixels of blank space below paragraphs.
pixelsInsideWrap?
optionalpixelsInsideWrap:number
Defined in: react/src/generated/jsx.ts:5852
Pixels of blank space between wrapped lines in a paragraph.
receivesDefault?
optionalreceivesDefault:boolean
Defined in: react/src/generated/jsx.ts:528
Whether the widget will receive the default action when it is focused.
Inherited from
ref?
optionalref:Ref<TextView>
Defined in: react/src/generated/jsx.ts:6078
rightMargin?
optionalrightMargin:number
Defined in: react/src/generated/jsx.ts:5862
The 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.
root?
optionalroot:Root
Defined in: react/src/generated/jsx.ts:534
The GtkRoot widget of the widget tree containing this widget.
This will be NULL if the widget is not contained in a root widget.
Inherited from
scaleFactor?
optionalscaleFactor:number
Defined in: react/src/generated/jsx.ts:536
The scale factor of the widget.
Inherited from
sensitive?
optionalsensitive:boolean
Defined in: react/src/generated/jsx.ts:538
Whether the widget responds to input.
Inherited from
tabs?
optionaltabs:number
Defined in: react/src/generated/jsx.ts:5864
Custom tabs for this text.
tooltipMarkup?
optionaltooltipMarkup:string
Defined in: react/src/generated/jsx.ts:554
Sets the text of tooltip to be the given string, which is marked up with Pango markup.
Also see [method@Gtk.Tooltip.set_markup].
This is a convenience property which will take care of getting the
tooltip shown if the given string is not NULL:
[property@Gtk.Widget:has-tooltip] will automatically be set to true
and there will be taken care of [signal@Gtk.Widget::query-tooltip] in
the default signal handler.
Note that if both [property@Gtk.Widget:tooltip-text] and [property@Gtk.Widget:tooltip-markup] are set, the last one wins.
Inherited from
tooltipText?
optionaltooltipText:string
Defined in: react/src/generated/jsx.ts:569
Sets the text of tooltip to be the given string.
Also see [method@Gtk.Tooltip.set_text].
This is a convenience property which will take care of getting the
tooltip shown if the given string is not NULL:
[property@Gtk.Widget:has-tooltip] will automatically be set to true
and there will be taken care of [signal@Gtk.Widget::query-tooltip] in
the default signal handler.
Note that if both [property@Gtk.Widget:tooltip-text] and [property@Gtk.Widget:tooltip-markup] are set, the last one wins.
Inherited from
topMargin?
optionaltopMargin:number
Defined in: react/src/generated/jsx.ts:5874
The 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 [property@Gtk.Widget:margin-top].
vadjustment?
optionalvadjustment:Adjustment
Defined in: react/src/generated/jsx.ts:5890
Vertical GtkAdjustment of the scrollable widget.
This adjustment is shared between the scrollable widget and its parent.
valign?
optionalvalign:Align
Defined in: react/src/generated/jsx.ts:571
How to distribute vertical space if widget gets extra space.
Inherited from
vexpand?
optionalvexpand:boolean
Defined in: react/src/generated/jsx.ts:573
Whether to expand vertically.
Inherited from
vexpandSet?
optionalvexpandSet:boolean
Defined in: react/src/generated/jsx.ts:575
Whether to use the vexpand property.
Inherited from
visible?
optionalvisible:boolean
Defined in: react/src/generated/jsx.ts:577
Whether the widget is visible.
Inherited from
vscrollPolicy?
optionalvscrollPolicy:ScrollablePolicy
Defined in: react/src/generated/jsx.ts:5892
Determines when vertical scrolling should start.
widthRequest?
optionalwidthRequest:number
Defined in: react/src/generated/jsx.ts:583
Overrides for width request of the widget.
If this is -1, the natural request will be used.
Inherited from
wrapMode?
optionalwrapMode:WrapMode
Defined in: react/src/generated/jsx.ts:5876
Whether to wrap lines never, at word boundaries, or at character boundaries.