file: text.aus

class: TextDeletefromcursorCallback

[1368:7] extends: object

Generated low-level callback wrapper for GIR callback delete-from-cursor.

Members

Methods

class: TextCutclipboardCallback

[1298:7] extends: object

Generated low-level callback wrapper for GIR callback cut-clipboard.

Members

Methods

class: Text

[83:7] extends: object

A single-line text entry. GtkText is the common implementation of single-line text editing that is shared between [class@Gtk.Entry], [class@Gtk.PasswordEntry], [class@Gtk.SpinButton], and other widgets. In all of these, a GtkText instance is used as the delegate for the [iface@Gtk.Editable] implementation. A large number of key bindings s supported by default. If the entered text is longer than the allocation of the widget, the widget will scroll so that the cursor position is visible. When using an entry for passwords and other sensitive information, it can be put into “password mode” using [method@Gtk.Text.set_visibility]. In this mode, entered text is displayed using an “invisible” character. By default, GTK picks the best invisible character that is available in the current font, but it can be changed with [method@Gtk.Text.set_invisible_char]. If you want to add icons or progress display in an entry, look at [class@Gtk.Entry]. There are other alternatives for more specialized use cases, such as [class@Gtk.SearchEntry]. If you need multi-line editable text, use [class@Gtk.TextView]. # Shortcuts and Gestures GtkText supports the following keyboard shortcuts: - Shift+F10 or Menu opens the context menu. - Ctrl+A or Ctrl+/ selects all the text. - Ctrl+Shift+A or Ctrl+\ unselects all. - Ctrl+Z undoes the last modification. - Ctrl+Y or Ctrl+Shift+Z redoes the last undone modification. - Ctrl+Shift+T toggles the text direction. - Clear clears the content. Additionally, the following signals have default keybindings: - [signal@Gtk.Text::activate] - [signal@Gtk.Text::backspace] - [signal@Gtk.Text::copy-clipboard] - [signal@Gtk.Text::cut-clipboard] - [signal@Gtk.Text::delete-from-cursor] - [signal@Gtk.Text::insert-emoji] - [signal@Gtk.Text::move-cursor] - [signal@Gtk.Text::paste-clipboard] - [signal@Gtk.Text::toggle-overwrite] # Actions GtkText defines a set of built-in actions: - clipboard.copy copies the contents to the clipboard. - clipboard.cut copies the contents to the clipboard and deletes it from the widget. - clipboard.paste inserts the contents of the clipboard into the widget. - menu.popup opens the context menu. - misc.insert-emoji opens the Emoji chooser. - misc.toggle-visibility toggles the GtkText:visibility property. - misc.toggle-direction toggles the text direction. - selection.delete deletes the current selection. - selection.select-all selects all of the widgets content. - text.redo redoes the last change to the contents. - text.undo undoes the last change to the contents. - text.clear removes all content. # CSS nodes text[.read-only] ├── placeholder ├── undershoot.left ├── undershoot.right ├── [selection] ├── [block-cursor] ├── [cursor-handle[.top/.bottom][.insertion-cursor]] ├── [preedit[.whole][.selection][.prediction][.prefix/.suffix][.spelling-error][.compose-error]] ╰── [window.popup] GtkText has a main node with the name text. Depending on the properties of the widget, the .read-only style class may appear. When the entry has a selection, it adds a subnode with the name selection. When the entry is in overwrite mode, it adds a subnode with the name block-cursor that determines how the block cursor is drawn. The CSS node for a context menu is added as a subnode with the name popup. The undershoot nodes are used to draw the underflow indication when content is scrolled out of view. These nodes get the .left or .right style class added depending on where the indication is drawn. When touch is used and touch selection handles are shown, they are using CSS nodes with name cursor-handle. They get the .top or .bottom style class depending on where they are shown in relation to the selection. If there is just a single handle for the text cursor, it gets the style class .insertion-cursor. If using an input method with a pre-edit buffer, this string will be styled with the preedit CSS node, the different style classes express the possible roles of a piece of text in the pre-edit buffer: - .whole denotes the parts of the pre-edit buffer without a special role - .selection, .prefix and .suffix style classes will be used to highlight the specific portions of the pre-edit buffer being edited and its surroundings - .prediction will be used for parts of the pre-edit buffer not typed by the user (e.g. autocompletion) - .spelling-error and .compose-error will be respectively used to indicate errors in spelling or character composition (e.g. non-existent transliterations). # Accessibility GtkText uses the [enum@Gtk.AccessibleRole.none] role, which causes it to be skipped for accessibility. This is because GtkText is expected to be used as a delegate for a GtkEditable implementation that will be represented to accessibility.

Members

Methods

class: TextPreeditchangedCallback

[1721:7] extends: object

Generated low-level callback wrapper for GIR callback preedit-changed.

Members

Methods

class: TextInsertatcursorCallback

[1439:7] extends: object

Generated low-level callback wrapper for GIR callback insert-at-cursor.

Members

Methods

class: TextPasteclipboardCallback

[1651:7] extends: object

Generated low-level callback wrapper for GIR callback paste-clipboard.

Members

Methods

class: TextBackspaceCallback

[1158:7] extends: object

Generated low-level callback wrapper for GIR callback backspace.

Members

Methods

class: TextActivateCallback

[1088:7] extends: object

Generated low-level callback wrapper for GIR callback activate.

Members

Methods

class: TextInsertemojiCallback

[1509:7] extends: object

Generated low-level callback wrapper for GIR callback insert-emoji.

Members

Methods

class: TextMeta

[1861:14] static extends: object

Generated metadata helpers for Text class surfaces.

Methods

class: TextCopyclipboardCallback

[1228:7] extends: object

Generated low-level callback wrapper for GIR callback copy-clipboard.

Members

Methods

class: TextMovecursorCallback

[1579:7] extends: object

Generated low-level callback wrapper for GIR callback move-cursor.

Members

Methods

class: TextToggleoverwriteCallback

[1791:7] extends: object

Generated low-level callback wrapper for GIR callback toggle-overwrite.

Members

Methods