Type Alias: GtkTextProps
GtkTextProps =
WidgetProps&object
Defined in: generated/jsx.ts:10031
Props for the GtkText widget.
Type Declaration
| Name | Type | Description | Defined in |
|---|---|---|---|
activatesDefault? | boolean | Whether to activate the default widget when Enter is pressed. | generated/jsx.ts:10033 |
attributes? | Pango.AttrList | null | A list of Pango attributes to apply to the text. This is mainly useful to change the size or weight of the text. The PangoAttribute's start_index and end_index must refer to the GtkEntryBuffer text, i.e. without the preedit string. | generated/jsx.ts:10042 |
buffer? | Gtk.EntryBuffer | The GtkEntryBuffer object which stores the text. | generated/jsx.ts:10044 |
editable? | boolean | Whether the entry contents can be edited. | generated/jsx.ts:10101 |
enableEmojiCompletion? | boolean | Whether to suggest Emoji replacements. | generated/jsx.ts:10046 |
enableUndo? | boolean | If undo/redo should be enabled for the editable. | generated/jsx.ts:10103 |
extraMenu? | Gio.MenuModel | null | A menu model whose contents will be appended to the context menu. | generated/jsx.ts:10048 |
imModule? | string | Which input method module should be used. See IMMulticontext. Setting this to a non-NULL value overrides the system-wide input method. See the Settings.gtk-im-module setting. | generated/jsx.ts:10058 |
inputHints? | Gtk.InputHints | Additional hints that allow input methods to fine-tune their behaviour. | generated/jsx.ts:10063 |
inputPurpose? | Gtk.InputPurpose | The purpose of this text field. This information can be used by on-screen keyboards and other input methods to adjust their behaviour. Note that setting the purpose to InputPurpose.password or InputPurpose.pin is independent from setting Text.visibility. | generated/jsx.ts:10074 |
invisibleChar? | number | The character to used when masking contents (in “password mode”). | generated/jsx.ts:10076 |
invisibleCharSet? | boolean | Whether the invisible char has been set. | generated/jsx.ts:10078 |
maxLength? | number | Maximum number of characters that are allowed. Zero indicates no limit. | generated/jsx.ts:10084 |
maxWidthChars? | number | The desired maximum width of the entry, in characters. | generated/jsx.ts:10105 |
onActivate()? | (self) => void | null | Emitted when the user hits the Enter key. The default bindings for this signal are all forms of the Enter key. | generated/jsx.ts:10122 |
onBackspace()? | (self) => void | null | Emitted when the user asks for it. This is a keybinding signal. The default bindings for this signal are Backspace and Shift+Backspace. | generated/jsx.ts:10131 |
onChanged()? | (self) => void | null | Emitted at the end of a single user-visible operation on the contents. E.g., a paste operation that replaces the contents of the selection will cause only one signal emission (even though it is implemented by first deleting the selection, then inserting the new content, and may cause multiple ::notify::text signals to be emitted). | generated/jsx.ts:10243 |
onCopyClipboard()? | (self) => void | null | Emitted to copy the selection to the clipboard. This is a keybinding signal. The default bindings for this signal are Ctrl+c and Ctrl+Insert. | generated/jsx.ts:10141 |
onCutClipboard()? | (self) => void | null | Emitted to cut the selection to the clipboard. This is a keybinding signal. The default bindings for this signal are Ctrl+x and Shift+Delete. | generated/jsx.ts:10151 |
onDeleteFromCursor()? | (self, type, count) => void | null | Emitted when the user initiates a text deletion. This is a keybinding signal. If the type is DeleteType.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 and Ctrl+Delete for deleting a word. | generated/jsx.ts:10165 |
onDeleteText()? | (self, startPos, endPos) => void | null | Emitted when text is deleted from the widget by the user. The default handler for this signal will normally be responsible for deleting the text, so by connecting to this signal and then stopping the signal with g_signal_stop_emission(), it is possible to modify the range of deleted text, or prevent it from being deleted entirely. The start_pos and end_pos parameters are interpreted as for Editable.delete_text. | generated/jsx.ts:10255 |
onInsertAtCursor()? | (self, string) => void | null | Emitted when the user initiates the insertion of a fixed string at the cursor. This is a keybinding signal. This signal has no default bindings. | generated/jsx.ts:10174 |
onInsertEmoji()? | (self) => void | null | Emitted to present the Emoji chooser. This is a keybinding signal. The default bindings for this signal are Ctrl+. and Ctrl+; | generated/jsx.ts:10184 |
onInsertText()? | (self, text, length, position) => void | null | Emitted when text is inserted into the widget by the user. The default handler for this signal will normally be responsible for inserting the text, so by connecting to this signal and then stopping the signal with g_signal_stop_emission(), it is possible to modify the inserted text, or prevent it from being inserted entirely. | generated/jsx.ts:10264 |
onMoveCursor()? | (self, step, count, extend) => void | null | Emitted when the user initiates a cursor movement. If the cursor is not visible in self, this signal causes the viewport to be moved instead. This is a keybinding signal. Applications should not connect to it, but may emit it with GObjectsignal_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 | generated/jsx.ts:10207 |
onNotify? | (self, propName) => void | null | Called 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:10270 |
onPasteClipboard()? | (self) => void | null | Emitted to paste the contents of the clipboard. This is a keybinding signal. The default bindings for this signal are Ctrl+v and Shift+Insert. | generated/jsx.ts:10216 |
onPreeditChanged()? | (self, preedit) => void | null | Emitted when the preedit text 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. | generated/jsx.ts:10224 |
onToggleOverwrite()? | (self) => void | null | Emitted to toggle the overwrite mode. This is a keybinding signal. The default bindings for this signal is Insert. | generated/jsx.ts:10232 |
overwriteMode? | boolean | If text is overwritten when typing. | generated/jsx.ts:10086 |
placeholderText? | string | null | The text that will be displayed in the GtkText when it is empty and unfocused. | generated/jsx.ts:10091 |
propagateTextWidth? | boolean | Whether the widget should grow and shrink with the content. | generated/jsx.ts:10093 |
ref? | Ref<Gtk.Text> | - | generated/jsx.ts:10299 |
tabs? | Pango.TabArray | null | Custom tabs for this text widget. | generated/jsx.ts:10095 |
text? | string | The contents of the entry. | generated/jsx.ts:10107 |
truncateMultiline? | boolean | When true, pasted multi-line text is truncated to the first line. | generated/jsx.ts:10097 |
visibility? | boolean | If false, the text is masked with the “invisible char”. | generated/jsx.ts:10099 |
widthChars? | number | Number of characters to leave space for in the entry. | generated/jsx.ts:10109 |
xalign? | number | The horizontal alignment, from 0 (left) to 1 (right). Reversed for RTL layouts. | generated/jsx.ts:10115 |