[2086:7] extends: object
Generated low-level callback wrapper for GIR callback insert-emoji.
TextViewInsertemojiCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[2439:7] extends: object
Generated low-level callback wrapper for GIR callback select-all.
TextViewSelectallCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, select, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[2651:7] extends: object
Generated low-level callback wrapper for GIR callback toggle-overwrite.
TextViewToggleoverwriteCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[2299:7] extends: object
Generated low-level callback wrapper for GIR callback paste-clipboard.
TextViewPasteclipboardCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[1664:7] extends: object
Generated low-level callback wrapper for GIR callback backspace.
TextViewBackspaceCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[1874:7] extends: object
Generated low-level callback wrapper for GIR callback delete-from-cursor.
TextViewDeletefromcursorCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, type, count, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[2369:7] extends: object
Generated low-level callback wrapper for GIR callback preedit-changed.
TextViewPreeditchangedCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, preedit, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[1734:7] extends: object
Generated low-level callback wrapper for GIR callback copy-clipboard.
TextViewCopyclipboardCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[1804:7] extends: object
Generated low-level callback wrapper for GIR callback cut-clipboard.
TextViewCutclipboardCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[2228:7] extends: object
Generated low-level callback wrapper for GIR callback move-viewport.
TextViewMoveviewportCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, step, count, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[2510:7] extends: object
Generated low-level callback wrapper for GIR callback set-anchor.
TextViewSetanchorCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[59:7] extends: object
Displays the contents of a [class@Gtk.TextBuffer].
GtkTextView
supports the following keyboard shortcuts: - Shift+F10
or Menu opens the context menu. - Ctrl+Z
undoes the last modification. - Ctrl+Y or
Ctrl+Shift+Z redoes the last undone
modification. - Clear clears the content. Additionally, the
following signals have default keybindings: -
[signal@Gtk.TextView::backspace] - [signal@Gtk.TextView::copy-clipboard] -
[signal@Gtk.TextView::cut-clipboard] -
[signal@Gtk.TextView::delete-from-cursor] -
[signal@Gtk.TextView::insert-emoji] - [signal@Gtk.TextView::move-cursor] -
[signal@Gtk.TextView::paste-clipboard] - [signal@Gtk.TextView::select-all] -
[signal@Gtk.TextView::toggle-cursor-visible] -
[signal@Gtk.TextView::toggle-overwrite] ## Actions GtkTextView 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. - 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 clears the content. ## CSS nodes textview.view ├── border.top ├── border.left ├── text │ ├── [preedit[.whole][.selection][.prediction][.prefix/.suffix][.spelling-error][.compose-error]] │ ╰── [selection] ├── border.right ├── border.bottom ╰── [window.popup]
GtkTextView has a main css node with name textview and style class .view,
and subnodes for each of the border windows, and the main text area, with
names border and text, respectively. The border nodes each get one of the
style classes .left, .right, .top or .bottom. A node representing the
selection will appear below the text node. If a context menu is opened, the
window node will appear as a subnode of the main node. If using an input
method with a pre-edit buffer, this string will be styled with a preedit
subnode of the text 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 GtkTextView uses the
[enum@Gtk.AccessibleRole.text_box] role.TextView (buffer = null)
Creates a new
GtkTextView. If you don’t call [method@Gtk.TextView.set_buffer] before using the text view, an empty default buffer will be created for you. Get the buffer with [method@Gtk.TextView.get_buffer]. If you want to specify your own buffer, consider [ctor@Gtk.TextView.new_with_buffer].
buffer is a GtkTextBuffer.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asWidget ()
Wraps this handle as
Widget.
A Widget object.asAccessible ()
Wraps this handle as
Accessible.
A Accessible object.asAccessibleText ()
Wraps this handle as
AccessibleText.
A AccessibleText object.asBuildable ()
Wraps this handle as
Buildable.
A Buildable object.asConstraintTarget ()
Wraps this handle as
ConstraintTarget.
A ConstraintTarget object.asScrollable ()
Wraps this handle as
Scrollable.
A Scrollable object.connectSignal (string Name, CallbackObj)
Connects one generated callback wrapper to a named signal.
Name is the signal name.CallbackObj is the generated callback wrapper to connect.The connected handler id.disconnectSignalHandler (int HandlerId)
Disconnects one retained signal handler id.
HandlerId is the signal handler id to disconnect.None.setOnBackspace (callback Fn, UserData = null)
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.
Fn is the Aussom callback.Fn is called with (TextView Self).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnCopyclipboard (callback Fn, UserData = null)
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.
Fn is the Aussom callback.Fn is called with (TextView Self).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnCutclipboard (callback Fn, UserData = null)
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.
Fn is the Aussom callback.Fn is called with (TextView Self).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnDeletefromcursor (callback Fn, UserData = null)
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.
Fn is the Aussom callback.Fn is called with (TextView Self, string Type, int Count).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnExtendselection (callback Fn, UserData = null)
Emitted when the selection needs to be extended at @location.
Fn is the Aussom callback.Fn is called with (TextView Self, string Granularity, object Location, object Start, object End).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnInsertatcursor (callback Fn, UserData = null)
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.
Fn is the Aussom callback.Fn is called with (TextView Self, string ArgString).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnInsertemoji (callback Fn, UserData = null)
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+;
Fn is the Aussom callback.Fn is called with (TextView Self).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnMovecursor (callback Fn, UserData = null)
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/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 pages
Fn is the Aussom callback.Fn is called with (TextView Self, string Step, int Count, bool Extend_selection).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnMoveviewport (callback Fn, UserData = null)
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.
Fn is the Aussom callback.Fn is called with (TextView Self, string Step, int Count).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnPasteclipboard (callback Fn, UserData = null)
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.
Fn is the Aussom callback.Fn is called with (TextView Self).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnPreeditchanged (callback Fn, UserData = null)
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.
Fn is the Aussom callback.Fn is called with (TextView Self, string Preedit).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnSelectall (callback Fn, UserData = null)
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+</kbd> for unselecting.
Fn is the Aussom callback.Fn is called with (TextView Self, bool Select).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnSetanchor (callback Fn, UserData = null)
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.
Fn is the Aussom callback.Fn is called with (TextView Self).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnTogglecursorvisible (callback Fn, UserData = null)
Gets emitted to toggle the
cursor-visibleproperty. The ::toggle-cursor-visible signal is a keybinding signal. The default binding for this signal is F7.
Fn is the Aussom callback.Fn is called with (TextView Self).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.setOnToggleoverwrite (callback Fn, UserData = null)
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.
Fn is the Aussom callback.Fn is called with (TextView Self).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.getProperty (string Name)
Reads one generated property by name.
setProperty (string Name, Value)
Writes one generated property by name.
setAcceptstab (bool Value)
Whether Tab will result in a tab character being entered.
Value is the new property value.None.setBottommargin (int Value)
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].
Value is the new property value.None.setBuffer (object Value)
The buffer which is displayed.
Value is the new property value.None.setCursorvisible (bool Value)
If the insertion cursor is shown.
Value is the new property value.None.setEditable (bool Value)
Whether the text can be modified by the user.
Value is the new property value.None.setExtramenu (object Value)
A menu model whose contents will be appended to the context menu.
Value is the new property value.None.setImmodule (string Value)
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.
Value is the new property value.None.setIndent (int Value)
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.
Value is the new property value.None.setInputhints (string Value)
Additional hints (beyond [property@Gtk.TextView:input-purpose]) that allow input methods to fine-tune their behaviour.
Value is the new property value.None.setInputpurpose (string Value)
The purpose of this text field. This property can be used by on-screen keyboards and other input methods to adjust their behaviour.
Value is the new property value.None.setJustification (string Value)
Left, right, or center justification.
Value is the new property value.None.setLeftmargin (int Value)
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.
Value is the new property value.None.setMonospace (bool Value)
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.
Value is the new property value.None.setOverwrite (bool Value)
Whether entered text overwrites existing contents.
Value is the new property value.None.setPixelsabovelines (int Value)
Pixels of blank space above paragraphs.
Value is the new property value.None.setPixelsbelowlines (int Value)
Pixels of blank space below paragraphs.
Value is the new property value.None.setPixelsinsidewrap (int Value)
Pixels of blank space between wrapped lines in a paragraph.
Value is the new property value.None.setRightmargin (int Value)
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.
Value is the new property value.None.setTabs (object Value)
Custom tabs for this text.
Value is the new property value.None.setTopmargin (int Value)
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].
Value is the new property value.None.setWrapmode (string Value)
Whether to wrap lines never, at word boundaries, or at character boundaries.
Value is the new property value.None.add_child_at_anchor (object child, object anchor)
Adds a child widget in the text buffer, at the given @anchor.
child is a GtkWidget.anchor is a GtkTextChildAnchor in the GtkTextBuffer forNone.add_overlay (object child, int xpos, int ypos)
Adds @child at a fixed coordinate in the
GtkTextView's text window. The
and @ypos must be in buffer coordinates (see [method@Gtk.TextView.get_iter_location] to convert to buffer coordinates). @child will scroll with the text view. If instead you want a widget that will not move with the GtkTextView contents see GtkOverlay.child is a GtkWidget.xpos is X position of child in window coordinates.ypos is Y position of child in window coordinates.None.backward_display_line (iter)
Moves the given @iter backward by one display (wrapped) line. A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view’s width; paragraphs are the same in all views, since they depend on the contents of the
GtkTextBuffer.
iter is a GtkTextIter.backward_display_line_start (iter)
Moves the given @iter backward to the next display line start. A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view’s width; paragraphs are the same in all views, since they depend on the contents of the
GtkTextBuffer.
iter is a GtkTextIter.forward_display_line (iter)
Moves the given @iter forward by one display (wrapped) line. A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view’s width; paragraphs are the same in all views, since they depend on the contents of the
GtkTextBuffer.
iter is a GtkTextIter.forward_display_line_end (iter)
Moves the given @iter forward to the next display line end. A display line is different from a paragraph. Paragraphs are separated by newlines or other paragraph separator characters. Display lines are created by line-wrapping a paragraph. If wrapping is turned off, display lines and paragraphs will be the same. Display lines are divided differently for each view, since they depend on the view’s width; paragraphs are the same in all views, since they depend on the contents of the
GtkTextBuffer.
iter is a GtkTextIter.get_accepts_tab ()
Returns whether pressing the Tab key inserts a tab characters. See [method@Gtk.TextView.set_accepts_tab].
get_bottom_margin ()
Gets the bottom margin for text in the @text_view.
get_buffer ()
Returns the
GtkTextBufferbeing displayed by this text view. The reference count on the buffer is not incremented; the caller of this function won’t own a new reference.
get_cursor_visible ()
Find out whether the cursor should be displayed.
get_editable ()
Returns the default editability of the
GtkTextView. Tags in the buffer may override this setting for some ranges of text.
get_extra_menu ()
Gets the menu model that gets added to the context menu or %NULL if none has been set.
get_gutter (string win)
Gets a
GtkWidgetthat has previously been set as gutter. See [method@Gtk.TextView.set_gutter]. @win must be one of %GTK_TEXT_WINDOW_LEFT, %GTK_TEXT_WINDOW_RIGHT, %GTK_TEXT_WINDOW_TOP, or %GTK_TEXT_WINDOW_BOTTOM.
win is a GtkTextWindowType.get_indent ()
Gets the default indentation of paragraphs in @text_view. Tags in the view’s buffer may override the default. The indentation may be negative.
get_input_hints ()
Gets the
input-hintsof theGtkTextView.
get_input_purpose ()
Gets the
input-purposeof theGtkTextView.
get_justification ()
Gets the default justification of paragraphs in @text_view. Tags in the buffer may override the default.
get_left_margin ()
Gets the default left margin size of paragraphs in the @text_view. Tags in the buffer may override the default.
get_ltr_context ()
Gets the
PangoContextthat is used for rendering LTR directed text layouts. The context may be replaced when CSS changes occur.
get_monospace ()
Gets whether the
GtkTextViewuses monospace styling.
get_overwrite ()
Returns whether the
GtkTextViewis in overwrite mode or not.
get_pixels_above_lines ()
Gets the default number of pixels to put above paragraphs. Adding this function with [method@Gtk.TextView.get_pixels_below_lines] is equal to the line space between each paragraph.
get_pixels_below_lines ()
Gets the default number of pixels to put below paragraphs. The line space is the sum of the value returned by this function and the value returned by [method@Gtk.TextView.get_pixels_above_lines].
get_pixels_inside_wrap ()
Gets the default number of pixels to put between wrapped lines inside a paragraph.
get_right_margin ()
Gets the default right margin for text in @text_view. Tags in the buffer may override the default.
get_rtl_context ()
Gets the
PangoContextthat is used for rendering RTL directed text layouts. The context may be replaced when CSS changes occur.
get_tabs ()
Gets the default tabs for @text_view. Tags in the buffer may override the defaults. The returned array will be %NULL if “standard” (8-space) tabs are used. Free the return value with [method@Pango.TabArray.free].
get_top_margin ()
Gets the top margin for text in the @text_view.
get_wrap_mode ()
Gets the line wrapping for the view.
im_context_filter_keypress (object event)
Allow the
GtkTextViewinput method to internally handle key press and release events. If this function returns %TRUE, then no further processing should be done for this key event. See [method@Gtk.IMContext.filter_keypress]. Note that you are expected to call this function from your handler when overriding key event handling. This is needed in the case when you need to insert your own key handling between the input method and the default key event handling of theGtkTextView.c static gboolean gtk_foo_bar_key_press_event (GtkWidget *widget, GdkEvent *event) { guint keyval; gdk_event_get_keyval ((GdkEvent*)event, &keyval); if (keyval == GDK_KEY_Return || keyval == GDK_KEY_KP_Enter) { if (gtk_text_view_im_context_filter_keypress (GTK_TEXT_VIEW (widget), event)) return TRUE; } // Do some stuff return GTK_WIDGET_CLASS (gtk_foo_bar_parent_class)->key_press_event (widget, event); }
event is the key event.move_mark_onscreen (object mark)
Moves a mark within the buffer so that it's located within the currently-visible text area.
mark is a GtkTextMark.move_overlay (object child, int xpos, int ypos)
Updates the position of a child. See [method@Gtk.TextView.add_overlay].
child is a widget already added with [method@Gtk.TextView.add_overlay].xpos is new X position in buffer coordinates.ypos is new Y position in buffer coordinates.None.move_visually (iter, int count)
Move the iterator a given number of characters visually, treating it as the strong cursor position. If @count is positive, then the new strong cursor position will be @count positions to the right of the old cursor position. If @count is negative then the new strong cursor position will be @count positions to the left of the old cursor position. In the presence of bi-directional text, the correspondence between logical and visual order will depend on the direction of the current run, and there may be jumps when the cursor is moved off of the end of a run.
iter is a GtkTextIter.count is number of characters to move (negative moves left, positive moves right).place_cursor_onscreen ()
Moves the cursor to the currently visible region of the buffer.
remove (object child)
Removes a child widget from @text_view.
child is the child to remove.None.reset_cursor_blink ()
Ensures that the cursor is shown. This also resets the time that it will stay blinking (or visible, in case blinking is disabled). This function should be called in response to user input (e.g. from derived classes that override the textview's event handlers).
None.reset_im_context ()
Reset the input method context of the text view if needed. This can be necessary in the case where modifying the buffer would confuse on-going input method behavior.
None.scroll_mark_onscreen (object mark)
Scrolls @text_view the minimum distance such that @mark is contained within the visible area of the widget.
mark is a mark in the buffer for @text_view.None.scroll_to_iter (iter, double within_margin, bool use_align, double xalign, double yalign)
Scrolls @text_view so that @iter is on the screen in the position indicated by @xalign and @yalign. An alignment of 0.0 indicates left or top, 1.0 indicates right or bottom, 0.5 means center. If @use_align is %FALSE, the text scrolls the minimal distance to get the mark onscreen, possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size @within_margin. Note that this function uses the currently-computed height of the lines in the text buffer. Line heights are computed in an idle handler; so this function may not have the desired effect if it’s called before the height computations. To avoid oddness, consider using [method@Gtk.TextView.scroll_to_mark] which saves a point to be scrolled to after line validation.
iter is a GtkTextIter.within_margin is margin as a [0.0,0.5) fraction of screen size.use_align is whether to use alignment arguments (if %FALSE, just get the mark onscreen).xalign is horizontal alignment of mark within visible area.yalign is vertical alignment of mark within visible area.scroll_to_mark (object mark, double within_margin, bool use_align, double xalign, double yalign)
Scrolls @text_view so that @mark is on the screen in the position indicated by @xalign and @yalign. An alignment of 0.0 indicates left or top, 1.0 indicates right or bottom, 0.5 means center. If @use_align is %FALSE, the text scrolls the minimal distance to get the mark onscreen, possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size @within_margin.
mark is a GtkTextMark.within_margin is margin as a [0.0,0.5) fraction of screen size.use_align is whether to use alignment arguments (if %FALSE, just get the mark onscreen).xalign is horizontal alignment of mark within visible area.yalign is vertical alignment of mark within visible area.None.set_accepts_tab (bool accepts_tab)
Sets the behavior of the text widget when the Tab key is pressed. If @accepts_tab is %TRUE, a tab character is inserted. If
is %FALSE the keyboard focus is moved to the next widget in the focus chain. Focus can always be moved using Ctrl+Tab.accepts_tab is %TRUE if pressing the Tab key should insert a tab character, %FALSE, if pressing the Tab key should move the keyboard focus..None.set_bottom_margin (int bottom_margin)
Sets the bottom margin for text in @text_view. Note that this function is confusingly named. In CSS terms, the value set here is padding.
bottom_margin is bottom margin in pixels.None.set_buffer (object buffer)
Sets @buffer as the buffer being displayed by @text_view. The previous buffer displayed by the text view is unreferenced, and a reference is added to @buffer. If you owned a reference to @buffer before passing it to this function, you must remove that reference yourself;
GtkTextViewwill not “adopt” it.
buffer is a GtkTextBuffer.None.set_cursor_visible (bool setting)
Toggles whether the insertion point should be displayed. A buffer with no editable text probably shouldn’t have a visible cursor, so you may want to turn the cursor off. Note that this property may be overridden by the [property@Gtk.Settings:gtk-keynav-use-caret] setting.
setting is whether to show the insertion cursor.None.set_editable (bool setting)
Sets the default editability of the
GtkTextView. You can override this default setting with tags in the buffer, using the “editable” attribute of tags.
setting is whether it’s editable.None.set_extra_menu (object model)
Sets a menu model to add when constructing the context menu for
You can pass %NULL to remove a previously set extra menu.model is a GMenuModel.None.set_gutter (string win, object widget)
Places @widget into the gutter specified by @win. @win must be one of %GTK_TEXT_WINDOW_LEFT, %GTK_TEXT_WINDOW_RIGHT, %GTK_TEXT_WINDOW_TOP, or %GTK_TEXT_WINDOW_BOTTOM.
win is a GtkTextWindowType.widget is a GtkWidget.None.set_indent (int indent)
Sets the default indentation for paragraphs in @text_view. Tags in the buffer may override the default.
indent is indentation in pixels.None.set_input_hints (string hints)
Sets the
input-hintsof theGtkTextView. Theinput-hintsallow input methods to fine-tune their behaviour.
hints is the hints.None.set_input_purpose (string purpose)
Sets the
input-purposeof theGtkTextView. Theinput-purposecan be used by on-screen keyboards and other input methods to adjust their behaviour.
purpose is the purpose.None.set_justification (string justification)
Sets the default justification of text in @text_view. Tags in the view’s buffer may override the default.
justification is justification.None.set_left_margin (int left_margin)
Sets the default left margin for text in @text_view. Tags in the buffer may override the default. Note that this function is confusingly named. In CSS terms, the value set here is padding.
left_margin is left margin in pixels.None.set_monospace (bool monospace)
Sets whether the
GtkTextViewshould display text in monospace styling.
monospace is %TRUE to request monospace styling.None.set_overwrite (bool overwrite)
Changes the
GtkTextViewoverwrite mode.
overwrite is %TRUE to turn on overwrite mode, %FALSE to turn it off.None.set_pixels_above_lines (int pixels_above_lines)
Sets the default number of blank pixels above paragraphs in @text_view. Tags in the buffer for @text_view may override the defaults.
pixels_above_lines is pixels above paragraphs.None.set_pixels_below_lines (int pixels_below_lines)
Sets the default number of pixels of blank space to put below paragraphs in @text_view. May be overridden by tags applied to @text_view’s buffer.
pixels_below_lines is pixels below paragraphs.None.set_pixels_inside_wrap (int pixels_inside_wrap)
Sets the default number of pixels of blank space to leave between display/wrapped lines within a paragraph. May be overridden by tags in
buffer.pixels_inside_wrap is default number of pixels between wrapped lines.None.set_right_margin (int right_margin)
Sets the default right margin for text in the text view. Tags in the buffer may override the default. Note that this function is confusingly named. In CSS terms, the value set here is padding.
right_margin is right margin in pixels.None.set_tabs (object tabs)
Sets the default tab stops for paragraphs in @text_view. Tags in the buffer may override the default.
tabs is tabs as a PangoTabArray.None.set_top_margin (int top_margin)
Sets the top margin for text in @text_view. Note that this function is confusingly named. In CSS terms, the value set here is padding.
top_margin is top margin in pixels.None.set_wrap_mode (string wrap_mode)
Sets the line wrapping for the view.
wrap_mode is a GtkWrapMode.None.starts_display_line (iter)
Determines whether @iter is at the start of a display line. See [method@Gtk.TextView.forward_display_line] for an explanation of display lines vs. paragraphs.
iter is a GtkTextIter.[2721:14] static extends: object
Generated metadata helpers for TextView class surfaces.
properties ()
Returns property metadata for
TextView.
A list.signals ()
Returns signal metadata for
TextView.
A list.[2016:7] extends: object
Generated low-level callback wrapper for GIR callback insert-at-cursor.
TextViewInsertatcursorCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, arg0String, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[1945:7] extends: object
Generated low-level callback wrapper for GIR callback extend-selection.
TextViewExtendselectionCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, granularity, location, start, end, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[2156:7] extends: object
Generated low-level callback wrapper for GIR callback move-cursor.
TextViewMovecursorCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, step, count, extend_selection, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.
[2581:7] extends: object
Generated low-level callback wrapper for GIR callback
toggle-cursor-visible.
TextViewTogglecursorvisibleCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.