1.203 <GtkTextView>

Class: <GtkTextView>

It derives from <GtkWidget>.

Displays the contents of a <GtkTextBuffer>.

You may wish to begin by reading the conceptual overview, which gives an overview of all the objects and data types related to the text widget and how they work together.

Shortcuts and Gestures

<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:

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
│   ╰── [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.

Accessibility

<GtkTextView> uses the Gtk.AccessibleRole.text_box role.

Fields

parent-instance

Properties

Property: text-view:accepts-tab self

Whether Tab will result in a tab character being entered.

Its value is a boolean.

Set it with (set! (text-view:accepts-tab self) value).

Property: text-view:bottom-margin self

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 widget:margin-bottom.

Its value is a 32-bit integer.

Set it with (set! (text-view:bottom-margin self) value).

Property: text-view:buffer self

The buffer which is displayed.

Its value is a <GtkTextBuffer>, or #f.

Set it with (set! (text-view:buffer self) value).

Property: text-view:cursor-visible self

If the insertion cursor is shown.

Its value is a boolean.

Set it with (set! (text-view:cursor-visible self) value).

Property: text-view:editable self

Whether the text can be modified by the user.

Its value is a boolean.

Set it with (set! (text-view:editable self) value).

Property: text-view:extra-menu self

A menu model whose contents will be appended to the context menu.

Its value is a <GMenuModel>, or #f.

Set it with (set! (text-view:extra-menu self) value).

Property: text-view:im-module self

Which IM (input method) module should be used for this text_view.

See <GtkIMMulticontext>.

Setting this to a non-#f value overrides the system-wide IM module setting. See the GtkSettings settings:gtk-im-module property.

Its value is a string, or #f.

Set it with (set! (text-view:im-module self) value).

Property: text-view:indent self

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.

Its value is a 32-bit integer.

Set it with (set! (text-view:indent self) value).

Property: text-view:input-hints self

Additional hints (beyond text-view:input-purpose) that allow input methods to fine-tune their behaviour.

Its value is a <GtkInputHints> (or, to set it, a list of its symbols, or one of them).

Set it with (set! (text-view:input-hints self) value).

Property: text-view:input-purpose self

The purpose of this text field.

This property can be used by on-screen keyboards and other input methods to adjust their behaviour.

Its value is a <GtkInputPurpose> (or, to set it, one of its symbols).

Set it with (set! (text-view:input-purpose self) value).

Property: text-view:justification self

Left, right, or center justification.

Its value is a <GtkJustification> (or, to set it, one of its symbols).

Set it with (set! (text-view:justification self) value).

Property: text-view:left-margin self

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.

Its value is a 32-bit integer.

Set it with (set! (text-view:left-margin self) value).

Property: text-view:monospace self

Whether text should be displayed in a monospace font.

If #t, set the .monospace style class on the text view to indicate that a monospace font is desired.

Its value is a boolean.

Set it with (set! (text-view:monospace self) value).

Property: text-view:overwrite self

Whether entered text overwrites existing contents.

Its value is a boolean.

Set it with (set! (text-view:overwrite self) value).

Property: text-view:pixels-above-lines self

Pixels of blank space above paragraphs.

Its value is a 32-bit integer.

Set it with (set! (text-view:pixels-above-lines self) value).

Property: text-view:pixels-below-lines self

Pixels of blank space below paragraphs.

Its value is a 32-bit integer.

Set it with (set! (text-view:pixels-below-lines self) value).

Property: text-view:pixels-inside-wrap self

Pixels of blank space between wrapped lines in a paragraph.

Its value is a 32-bit integer.

Set it with (set! (text-view:pixels-inside-wrap self) value).

Property: text-view:right-margin self

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.

Its value is a 32-bit integer.

Set it with (set! (text-view:right-margin self) value).

Property: text-view:tabs self

Custom tabs for this text.

Its value is a <PangoTabArray>, or #f.

Set it with (set! (text-view:tabs self) value).

Property: text-view:top-margin self

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 widget:margin-top.

Its value is a 32-bit integer.

Set it with (set! (text-view:top-margin self) value).

Property: text-view:wrap-mode self

Whether to wrap lines never, at word boundaries, or at character boundaries.

Its value is a <GtkWrapMode> (or, to set it, one of its symbols).

Set it with (set! (text-view:wrap-mode self) value).

Procedures

Method: text-view:add-child-at-anchor self child anchor
Method: add-child-at-anchor self child anchor

Adds a child widget in the text buffer, at the given anchor.

self

Passed: a <GtkTextView>.

a <GtkTextView>

child

Passed: a <GtkWidget>.

a <GtkWidget>

anchor

Passed: a <GtkTextChildAnchor>.

a <GtkTextChildAnchor> in the <GtkTextBuffer> for self

Method: text-view:add-overlay self child xpos ypos
Method: add-overlay self child xpos ypos

Adds child at a fixed coordinate in the <GtkTextView>’s text window.

The xpos and ypos must be in buffer coordinates (see text-view: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>.

self

Passed: a <GtkTextView>.

a <GtkTextView>

child

Passed: a <GtkWidget>.

a <GtkWidget>

xpos

Passed: a 32-bit integer.

X position of child in window coordinates

ypos

Passed: a 32-bit integer.

Y position of child in window coordinates

Method: text-view:backward-display-line-start? self iter ⇒ %return
Method: backward-display-line-start? self iter ⇒ %return

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>.

self

Passed: a <GtkTextView>.

a <GtkTextView>

iter

Passed: a <GtkTextIter>.

a <GtkTextIter>

%return

Returned: a boolean.

#t if iter was moved and is not on the end iterator

Method: text-view:backward-display-line? self iter ⇒ %return
Method: backward-display-line? self iter ⇒ %return

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>.

self

Passed: a <GtkTextView>.

a <GtkTextView>

iter

Passed: a <GtkTextIter>.

a <GtkTextIter>

%return

Returned: a boolean.

#t if iter was moved and is not on the end iterator

Method: text-view:buffer-to-window-coords self win buffer-x buffer-y ⇒ window-x window-y
Method: buffer-to-window-coords self win buffer-x buffer-y ⇒ window-x window-y

Converts buffer coordinates to window coordinates.

self

Passed: a <GtkTextView>.

a <GtkTextView>

win

Passed: a <GtkTextWindowType>, or one of its symbols.

a <GtkTextWindowType>

buffer-x

Passed: a 32-bit integer.

buffer x coordinate

buffer-y

Passed: a 32-bit integer.

buffer y coordinate

window-x

Returned: a 32-bit integer.

window x coordinate return location

window-y

Returned: a 32-bit integer.

window y coordinate return location

Method: text-view:forward-display-line-end? self iter ⇒ %return
Method: forward-display-line-end? self iter ⇒ %return

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>.

self

Passed: a <GtkTextView>.

a <GtkTextView>

iter

Passed: a <GtkTextIter>.

a <GtkTextIter>

%return

Returned: a boolean.

#t if iter was moved and is not on the end iterator

Method: text-view:forward-display-line? self iter ⇒ %return
Method: forward-display-line? self iter ⇒ %return

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>.

self

Passed: a <GtkTextView>.

a <GtkTextView>

iter

Passed: a <GtkTextIter>.

a <GtkTextIter>

%return

Returned: a boolean.

#t if iter was moved and is not on the end iterator

Method: text-view:get-accepts-tab? self ⇒ %return
Method: get-accepts-tab? self ⇒ %return

Returns whether pressing the Tab key inserts a tab characters.

See text-view:set-accepts-tab.

self

Passed: a <GtkTextView>.

A <GtkTextView>

%return

Returned: a boolean.

#t if pressing the Tab key inserts a tab character, #f if pressing the Tab key moves the keyboard focus.

Method: text-view:get-bottom-margin self ⇒ %return
Method: get-bottom-margin self ⇒ %return

Gets the bottom margin for text in the self.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a 32-bit integer.

bottom margin in pixels

Method: text-view:get-buffer self ⇒ %return
Method: get-buffer self ⇒ %return

Returns the <GtkTextBuffer> being 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.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a <GtkTextBuffer>.

a <GtkTextBuffer>

Method: text-view:get-cursor-locations! self iter strong weak ⇒ strong weak
Method: get-cursor-locations! self iter strong weak ⇒ strong weak

Determine the positions of the strong and weak cursors if the insertion point is at iter.

The position of each cursor is stored as a zero-width rectangle. The strong cursor location is the location where characters of the directionality equal to the base direction of the paragraph are inserted. The weak cursor location is the location where characters of the directionality opposite to the base direction of the paragraph are inserted.

If iter is #f, the actual cursor position is used.

Note that if iter happens to be the actual cursor position, and there is currently an IM preedit sequence being entered, the returned locations will be adjusted to account for the preedit cursor’s offset within the preedit sequence.

The rectangle position is in buffer coordinates; use text-view:buffer-to-window-coords to convert these coordinates to coordinates for one of the windows in the text view.

self

Passed: a <GtkTextView>.

a <GtkTextView>

iter

Passed: a <GtkTextIter>, or #f.

a <GtkTextIter>

strong

Passed, filled in, and returned: a <GdkRectangle>.

location to store the strong cursor position

weak

Passed, filled in, and returned: a <GdkRectangle>.

location to store the weak cursor position

Method: text-view:get-cursor-visible? self ⇒ %return
Method: get-cursor-visible? self ⇒ %return

Find out whether the cursor should be displayed.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a boolean.

whether the insertion mark is visible

Method: text-view:get-editable? self ⇒ %return
Method: get-editable? self ⇒ %return

Returns the default editability of the <GtkTextView>.

Tags in the buffer may override this setting for some ranges of text.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a boolean.

whether text is editable by default

Method: text-view:get-extra-menu self ⇒ %return
Method: get-extra-menu self ⇒ %return

Gets the menu model that gets added to the context menu or #f if none has been set.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a <GMenuModel>, or #f.

the menu model

Method: text-view:get-gutter self win ⇒ %return
Method: get-gutter self win ⇒ %return

Gets a <GtkWidget> that has previously been set as gutter.

See text-view:set-gutter.

win must be one of left, right, top, or bottom.

self

Passed: a <GtkTextView>.

a <GtkTextView>

win

Passed: a <GtkTextWindowType>, or one of its symbols.

a <GtkTextWindowType>

%return

Returned: a <GtkWidget>, or #f.

a <GtkWidget>

Method: text-view:get-indent self ⇒ %return
Method: get-indent self ⇒ %return

Gets the default indentation of paragraphs in self.

Tags in the view’s buffer may override the default. The indentation may be negative.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a 32-bit integer.

number of pixels of indentation

Method: text-view:get-input-hints self ⇒ %return
Method: get-input-hints self ⇒ %return

Gets the input-hints of the <GtkTextView>.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a <GtkInputHints>.

the input hints

Method: text-view:get-input-purpose self ⇒ %return
Method: get-input-purpose self ⇒ %return

Gets the input-purpose of the <GtkTextView>.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a <GtkInputPurpose>.

the input purpose

Method: text-view:get-iter-at-location! self iter x y ⇒ %return iter
Method: get-iter-at-location! self iter x y ⇒ %return iter

Retrieves the iterator at buffer coordinates x and y.

Buffer coordinates are coordinates for the entire buffer, not just the currently-displayed portion. If you have coordinates from an event, you have to convert those to buffer coordinates with text-view:window-to-buffer-coords.

self

Passed: a <GtkTextView>.

a <GtkTextView>

iter

Passed, filled in, and returned: a <GtkTextIter>.

a <GtkTextIter>

x

Passed: a 32-bit integer.

x position, in buffer coordinates

y

Passed: a 32-bit integer.

y position, in buffer coordinates

%return

Returned: a boolean.

#t if the position is over text

Method: text-view:get-iter-at-position! self iter x y ⇒ %return iter trailing
Method: get-iter-at-position! self iter x y ⇒ %return iter trailing

Retrieves the iterator pointing to the character at buffer coordinates x and y.

Buffer coordinates are coordinates for the entire buffer, not just the currently-displayed portion. If you have coordinates from an event, you have to convert those to buffer coordinates with text-view:window-to-buffer-coords.

Note that this is different from text-view:get-iter-at-location!, which returns cursor locations, i.e. positions between characters.

self

Passed: a <GtkTextView>.

a <GtkTextView>

iter

Passed, filled in, and returned: a <GtkTextIter>.

a <GtkTextIter>

x

Passed: a 32-bit integer.

x position, in buffer coordinates

y

Passed: a 32-bit integer.

y position, in buffer coordinates

%return

Returned: a boolean.

#t if the position is over text

trailing

Returned: a 32-bit integer.

if non-#f, location to store an integer indicating where in the grapheme the user clicked. It will either be zero, or the number of characters in the grapheme. 0 represents the trailing edge of the grapheme.

Method: text-view:get-iter-location! self iter location ⇒ location
Method: get-iter-location! self iter location ⇒ location

Gets a rectangle which roughly contains the character at iter.

The rectangle position is in buffer coordinates; use text-view:buffer-to-window-coords to convert these coordinates to coordinates for one of the windows in the text view.

self

Passed: a <GtkTextView>.

a <GtkTextView>

iter

Passed: a <GtkTextIter>.

a <GtkTextIter>

location

Passed, filled in, and returned: a <GdkRectangle>.

bounds of the character at iter

Method: text-view:get-justification self ⇒ %return
Method: get-justification self ⇒ %return

Gets the default justification of paragraphs in self.

Tags in the buffer may override the default.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a <GtkJustification>.

default justification

Method: text-view:get-left-margin self ⇒ %return
Method: get-left-margin self ⇒ %return

Gets the default left margin size of paragraphs in the self.

Tags in the buffer may override the default.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a 32-bit integer.

left margin in pixels

Method: text-view:get-line-at-y! self target-iter y ⇒ target-iter line-top
Method: get-line-at-y! self target-iter y ⇒ target-iter line-top

Gets the <GtkTextIter> at the start of the line containing the coordinate y.

y is in buffer coordinates, convert from window coordinates with text-view:window-to-buffer-coords. If non-#f, line-top will be filled with the coordinate of the top edge of the line.

self

Passed: a <GtkTextView>.

a <GtkTextView>

target-iter

Passed, filled in, and returned: a <GtkTextIter>.

a <GtkTextIter>

y

Passed: a 32-bit integer.

a y coordinate

line-top

Returned: a 32-bit integer.

return location for top coordinate of the line

Method: text-view:get-line-yrange self iter ⇒ y height
Method: get-line-yrange self iter ⇒ y height

Gets the y coordinate of the top of the line containing iter, and the height of the line.

The coordinate is a buffer coordinate; convert to window coordinates with text-view:buffer-to-window-coords.

self

Passed: a <GtkTextView>.

a <GtkTextView>

iter

Passed: a <GtkTextIter>.

a <GtkTextIter>

y

Returned: a 32-bit integer.

return location for a y coordinate

height

Returned: a 32-bit integer.

return location for a height

Method: text-view:get-ltr-context self ⇒ %return
Method: get-ltr-context self ⇒ %return

Gets the <PangoContext> that is used for rendering LTR directed text layouts.

The context may be replaced when CSS changes occur.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a <PangoContext>.

a <PangoContext>

Method: text-view:get-monospace? self ⇒ %return
Method: get-monospace? self ⇒ %return

Gets whether the <GtkTextView> uses monospace styling.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a boolean.

#t if monospace fonts are desired

Method: text-view:get-overwrite? self ⇒ %return
Method: get-overwrite? self ⇒ %return

Returns whether the <GtkTextView> is in overwrite mode or not.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a boolean.

whether self is in overwrite mode or not.

Method: text-view:get-pixels-above-lines self ⇒ %return
Method: get-pixels-above-lines self ⇒ %return

Gets the default number of pixels to put above paragraphs.

Adding this function with text-view:get-pixels-below-lines is equal to the line space between each paragraph.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a 32-bit integer.

default number of pixels above paragraphs

Method: text-view:get-pixels-below-lines self ⇒ %return
Method: get-pixels-below-lines self ⇒ %return

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 text-view:get-pixels-above-lines.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a 32-bit integer.

default number of blank pixels below paragraphs

Method: text-view:get-pixels-inside-wrap self ⇒ %return
Method: get-pixels-inside-wrap self ⇒ %return

Gets the default number of pixels to put between wrapped lines inside a paragraph.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a 32-bit integer.

default number of pixels of blank space between wrapped lines

Method: text-view:get-right-margin self ⇒ %return
Method: get-right-margin self ⇒ %return

Gets the default right margin for text in self.

Tags in the buffer may override the default.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a 32-bit integer.

right margin in pixels

Method: text-view:get-rtl-context self ⇒ %return
Method: get-rtl-context self ⇒ %return

Gets the <PangoContext> that is used for rendering RTL directed text layouts.

The context may be replaced when CSS changes occur.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a <PangoContext>.

a <PangoContext>

Method: text-view:get-tabs self ⇒ %return
Method: get-tabs self ⇒ %return

Gets the default tabs for self.

Tags in the buffer may override the defaults. The returned array will be #f if “standard” (8-space) tabs are used. Free the return value with tab-array:free.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a <PangoTabArray>, or #f.

copy of default tab array, or #f if standard tabs are used; must be freed with tab-array:free.

Method: text-view:get-top-margin self ⇒ %return
Method: get-top-margin self ⇒ %return

Gets the top margin for text in the self.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a 32-bit integer.

top margin in pixels

Method: text-view:get-visible-offset self ⇒ x-offset y-offset
Method: get-visible-offset self ⇒ x-offset y-offset

Gets the X,Y offset in buffer coordinates of the top-left corner of the textview’s text contents.

This allows for more-precise positioning than what is provided by text-view:get-visible-rect! as you can discover what device pixel is being quantized for text positioning.

You might want this when making ulterior widgets align with quantized device pixels of the textview contents such as line numbers.

self

Passed: a <GtkTextView>.

a <GtkTextView>

x-offset

Returned: a real number.

a location for the X offset

y-offset

Returned: a real number.

a location for the Y offset

Method: text-view:get-visible-rect! self visible-rect ⇒ visible-rect
Method: get-visible-rect! self visible-rect ⇒ visible-rect

Fills visible-rect with the currently-visible region of the buffer, in buffer coordinates.

Convert to window coordinates with text-view:buffer-to-window-coords.

self

Passed: a <GtkTextView>.

a <GtkTextView>

visible-rect

Passed, filled in, and returned: a <GdkRectangle>.

rectangle to fill

Method: text-view:get-wrap-mode self ⇒ %return
Method: get-wrap-mode self ⇒ %return

Gets the line wrapping for the view.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a <GtkWrapMode>.

the line wrap setting

Method: text-view:im-context-filter-keypress? self event ⇒ %return
Method: im-context-filter-keypress? self event ⇒ %return

Allow the <GtkTextView> input method to internally handle key press and release events.

If this function returns #t, then no further processing should be done for this key event. See 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 the <GtkTextView>.

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);
}
self

Passed: a <GtkTextView>.

a <GtkTextView>

event

Passed: a <GdkEvent>.

the key event

%return

Returned: a boolean.

#t if the input method handled the key event.

Method: text-view:move-mark-onscreen? self mark ⇒ %return
Method: move-mark-onscreen? self mark ⇒ %return

Moves a mark within the buffer so that it’s located within the currently-visible text area.

self

Passed: a <GtkTextView>.

a <GtkTextView>

mark

Passed: a <GtkTextMark>.

a <GtkTextMark>

%return

Returned: a boolean.

#t if the mark moved (wasn’t already onscreen)

Method: text-view:move-overlay self child xpos ypos
Method: move-overlay self child xpos ypos

Updates the position of a child.

See text-view:add-overlay.

self

Passed: a <GtkTextView>.

a <GtkTextView>

child

Passed: a <GtkWidget>.

a widget already added with text-view:add-overlay

xpos

Passed: a 32-bit integer.

new X position in buffer coordinates

ypos

Passed: a 32-bit integer.

new Y position in buffer coordinates

Method: text-view:move-visually? self iter count ⇒ %return
Method: move-visually? self iter count ⇒ %return

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.

self

Passed: a <GtkTextView>.

a <GtkTextView>

iter

Passed: a <GtkTextIter>.

a <GtkTextIter>

count

Passed: a 32-bit integer.

number of characters to move (negative moves left, positive moves right)

%return

Returned: a boolean.

#t if iter moved and is not on the end iterator

Procedure: text-view:new ⇒ %return

Creates a new <GtkTextView>.

If you don’t call text-view:set-buffer before using the text view, an empty default buffer will be created for you. Get the buffer with text-view:get-buffer. If you want to specify your own buffer, consider text-view:new-with-buffer.

%return

Returned: a <GtkWidget>.

a new <GtkTextView>

Procedure: text-view:new-with-buffer buffer ⇒ %return

Creates a new <GtkTextView> widget displaying the buffer buffer.

One buffer can be shared among many widgets. buffer may be #f to create a default buffer, in which case this function is equivalent to text-view:new. The text view adds its own reference count to the buffer; it does not take over an existing reference.

buffer

Passed: a <GtkTextBuffer>.

a <GtkTextBuffer>

%return

Returned: a <GtkWidget>.

a new <GtkTextView>.

Method: text-view:place-cursor-onscreen? self ⇒ %return
Method: place-cursor-onscreen? self ⇒ %return

Moves the cursor to the currently visible region of the buffer.

self

Passed: a <GtkTextView>.

a <GtkTextView>

%return

Returned: a boolean.

#t if the cursor had to be moved.

Method: text-view:remove self child
Method: remove self child

Removes a child widget from self.

self

Passed: a <GtkTextView>.

a <GtkTextView>

child

Passed: a <GtkWidget>.

the child to remove

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).

self

Passed: a <GtkTextView>.

a <GtkTextView>

Method: text-view:reset-im-context self
Method: reset-im-context self

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.

self

Passed: a <GtkTextView>.

a <GtkTextView>

Method: text-view:scroll-mark-onscreen self mark
Method: scroll-mark-onscreen self mark

Scrolls self the minimum distance such that mark is contained within the visible area of the widget.

self

Passed: a <GtkTextView>.

a <GtkTextView>

mark

Passed: a <GtkTextMark>.

a mark in the buffer for self

Method: text-view:scroll-to-iter? self iter within-margin use-align xalign yalign ⇒ %return
Method: scroll-to-iter? self iter within-margin use-align xalign yalign ⇒ %return

Scrolls self 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 #f, 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 text-view:scroll-to-mark which saves a point to be scrolled to after line validation.

self

Passed: a <GtkTextView>.

a <GtkTextView>

iter

Passed: a <GtkTextIter>.

a <GtkTextIter>

within-margin

Passed: a real number.

margin as a [0.0,0.5) fraction of screen size

use-align

Passed: a boolean.

whether to use alignment arguments (if #f, just get the mark onscreen)

xalign

Passed: a real number.

horizontal alignment of mark within visible area

yalign

Passed: a real number.

vertical alignment of mark within visible area

%return

Returned: a boolean.

#t if scrolling occurred

Method: text-view:scroll-to-mark self mark within-margin use-align xalign yalign
Method: scroll-to-mark self mark within-margin use-align xalign yalign

Scrolls self 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 #f, 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.

self

Passed: a <GtkTextView>.

a <GtkTextView>

mark

Passed: a <GtkTextMark>.

a <GtkTextMark>

within-margin

Passed: a real number.

margin as a [0.0,0.5) fraction of screen size

use-align

Passed: a boolean.

whether to use alignment arguments (if #f, just get the mark onscreen)

xalign

Passed: a real number.

horizontal alignment of mark within visible area

yalign

Passed: a real number.

vertical alignment of mark within visible area

Method: text-view:set-accepts-tab self accepts-tab
Method: set-accepts-tab self accepts-tab

Sets the behavior of the text widget when the Tab key is pressed.

If accepts-tab is #t, a tab character is inserted. If accepts-tab is #f the keyboard focus is moved to the next widget in the focus chain.

Focus can always be moved using Ctrl+Tab.

self

Passed: a <GtkTextView>.

A <GtkTextView>

accepts-tab

Passed: a boolean.

#t if pressing the Tab key should insert a tab character, #f, if pressing the Tab key should move the keyboard focus.

Method: text-view:set-bottom-margin self bottom-margin
Method: set-bottom-margin self bottom-margin

Sets the bottom margin for text in self.

Note that this function is confusingly named. In CSS terms, the value set here is padding.

self

Passed: a <GtkTextView>.

a <GtkTextView>

bottom-margin

Passed: a 32-bit integer.

bottom margin in pixels

Method: text-view:set-buffer self [buffer]
Method: set-buffer self [buffer]

Sets buffer as the buffer being displayed by self.

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; <GtkTextView> will not “adopt” it.

self

Passed: a <GtkTextView>.

a <GtkTextView>

buffer

Passed, or left out: a <GtkTextBuffer>, or #f.

a <GtkTextBuffer>

Method: text-view:set-cursor-visible self setting
Method: set-cursor-visible self 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 settings:gtk-keynav-use-caret setting.

self

Passed: a <GtkTextView>.

a <GtkTextView>

setting

Passed: a boolean.

whether to show the insertion cursor

Method: text-view:set-editable self setting
Method: set-editable self 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.

self

Passed: a <GtkTextView>.

a <GtkTextView>

setting

Passed: a boolean.

whether it’s editable

Method: text-view:set-extra-menu self [model]
Method: set-extra-menu self [model]

Sets a menu model to add when constructing the context menu for self.

You can pass #f to remove a previously set extra menu.

self

Passed: a <GtkTextView>.

a <GtkTextView>

model

Passed, or left out: a <GMenuModel>, or #f.

a <GMenuModel>

Method: text-view:set-gutter self win [widget]
Method: set-gutter self win [widget]

Places widget into the gutter specified by win.

win must be one of left, right, top, or bottom.

self

Passed: a <GtkTextView>.

a <GtkTextView>

win

Passed: a <GtkTextWindowType>, or one of its symbols.

a <GtkTextWindowType>

widget

Passed, or left out: a <GtkWidget>, or #f.

a <GtkWidget>

Method: text-view:set-indent self indent
Method: set-indent self indent

Sets the default indentation for paragraphs in self.

Tags in the buffer may override the default.

self

Passed: a <GtkTextView>.

a <GtkTextView>

indent

Passed: a 32-bit integer.

indentation in pixels

Method: text-view:set-input-hints self hints
Method: set-input-hints self hints

Sets the input-hints of the <GtkTextView>.

The input-hints allow input methods to fine-tune their behaviour.

self

Passed: a <GtkTextView>.

a <GtkTextView>

hints

Passed: a <GtkInputHints>, or a list of its symbols, or one of them.

the hints

Method: text-view:set-input-purpose self purpose
Method: set-input-purpose self purpose

Sets the input-purpose of the <GtkTextView>.

The input-purpose can be used by on-screen keyboards and other input methods to adjust their behaviour.

self

Passed: a <GtkTextView>.

a <GtkTextView>

purpose

Passed: a <GtkInputPurpose>, or one of its symbols.

the purpose

Method: text-view:set-justification self justification
Method: set-justification self justification

Sets the default justification of text in self.

Tags in the view’s buffer may override the default.

self

Passed: a <GtkTextView>.

a <GtkTextView>

justification

Passed: a <GtkJustification>, or one of its symbols.

justification

Method: text-view:set-left-margin self left-margin
Method: set-left-margin self left-margin

Sets the default left margin for text in self.

Tags in the buffer may override the default.

Note that this function is confusingly named. In CSS terms, the value set here is padding.

self

Passed: a <GtkTextView>.

a <GtkTextView>

left-margin

Passed: a 32-bit integer.

left margin in pixels

Method: text-view:set-monospace self monospace
Method: set-monospace self monospace

Sets whether the <GtkTextView> should display text in monospace styling.

self

Passed: a <GtkTextView>.

a <GtkTextView>

monospace

Passed: a boolean.

#t to request monospace styling

Method: text-view:set-overwrite self overwrite
Method: set-overwrite self overwrite

Changes the <GtkTextView> overwrite mode.

self

Passed: a <GtkTextView>.

a <GtkTextView>

overwrite

Passed: a boolean.

#t to turn on overwrite mode, #f to turn it off

Method: text-view:set-pixels-above-lines self pixels-above-lines
Method: set-pixels-above-lines self pixels-above-lines

Sets the default number of blank pixels above paragraphs in self.

Tags in the buffer for self may override the defaults.

self

Passed: a <GtkTextView>.

a <GtkTextView>

pixels-above-lines

Passed: a 32-bit integer.

pixels above paragraphs

Method: text-view:set-pixels-below-lines self pixels-below-lines
Method: set-pixels-below-lines self pixels-below-lines

Sets the default number of pixels of blank space to put below paragraphs in self.

May be overridden by tags applied to self’s buffer.

self

Passed: a <GtkTextView>.

a <GtkTextView>

pixels-below-lines

Passed: a 32-bit integer.

pixels below paragraphs

Method: text-view:set-pixels-inside-wrap self pixels-inside-wrap
Method: set-pixels-inside-wrap self 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 self’s buffer.

self

Passed: a <GtkTextView>.

a <GtkTextView>

pixels-inside-wrap

Passed: a 32-bit integer.

default number of pixels between wrapped lines

Method: text-view:set-right-margin self right-margin
Method: set-right-margin self 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.

self

Passed: a <GtkTextView>.

a <GtkTextView>

right-margin

Passed: a 32-bit integer.

right margin in pixels

Method: text-view:set-tabs self tabs
Method: set-tabs self tabs

Sets the default tab stops for paragraphs in self.

Tags in the buffer may override the default.

self

Passed: a <GtkTextView>.

a <GtkTextView>

tabs

Passed: a <PangoTabArray>.

tabs as a <PangoTabArray>

Method: text-view:set-top-margin self top-margin
Method: set-top-margin self top-margin

Sets the top margin for text in self.

Note that this function is confusingly named. In CSS terms, the value set here is padding.

self

Passed: a <GtkTextView>.

a <GtkTextView>

top-margin

Passed: a 32-bit integer.

top margin in pixels

Method: text-view:set-wrap-mode self wrap-mode
Method: set-wrap-mode self wrap-mode

Sets the line wrapping for the view.

self

Passed: a <GtkTextView>.

a <GtkTextView>

wrap-mode

Passed: a <GtkWrapMode>, or one of its symbols.

a <GtkWrapMode>

Method: text-view:starts-display-line? self iter ⇒ %return
Method: starts-display-line? self iter ⇒ %return

Determines whether iter is at the start of a display line.

See text-view:forward-display-line? for an explanation of display lines vs. paragraphs.

self

Passed: a <GtkTextView>.

a <GtkTextView>

iter

Passed: a <GtkTextIter>.

a <GtkTextIter>

%return

Returned: a boolean.

#t if iter begins a wrapped line

Method: text-view:window-to-buffer-coords self win window-x window-y ⇒ buffer-x buffer-y
Method: window-to-buffer-coords self win window-x window-y ⇒ buffer-x buffer-y

Converts coordinates on the window identified by win to buffer coordinates.

self

Passed: a <GtkTextView>.

a <GtkTextView>

win

Passed: a <GtkTextWindowType>, or one of its symbols.

a <GtkTextWindowType>

window-x

Passed: a 32-bit integer.

window x coordinate

window-y

Passed: a 32-bit integer.

window y coordinate

buffer-x

Returned: a 32-bit integer.

buffer x coordinate return location

buffer-y

Returned: a 32-bit integer.

buffer y coordinate return location

Signals

Signal: text-view:backspace

Connect a handler with (connect object text-view:backspace handler). It is called as (handler self).

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.

self

Passed: a <GtkTextView>.

Signal: text-view:copy-clipboard

Connect a handler with (connect object text-view:copy-clipboard handler). It is called as (handler self).

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.

self

Passed: a <GtkTextView>.

Signal: text-view:cut-clipboard

Connect a handler with (connect object text-view:cut-clipboard handler). It is called as (handler self).

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.

self

Passed: a <GtkTextView>.

Signal: text-view:delete-from-cursor

Connect a handler with (connect object text-view:delete-from-cursor handler). It is called as (handler self type count).

Gets emitted when the user initiates a text deletion.

The ::delete-from-cursor signal is a keybinding signal.

If the type is 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.

self

Passed: a <GtkTextView>.

type

Passed: a <GtkDeleteType>.

the granularity of the deletion, as a <GtkDeleteType>

count

Passed: a 32-bit integer.

the number of type units to delete

Signal: text-view:extend-selection

Connect a handler with (connect object text-view:extend-selection handler). It is called as (handler self granularity location start end) ⇒ %return.

Emitted when the selection needs to be extended at location.

self

Passed: a <GtkTextView>.

granularity

Passed: a <GtkTextExtendSelection>.

the granularity type

location

Passed: a <GtkTextIter>.

the location where to extend the selection

start

Passed: a <GtkTextIter>.

where the selection should start

end

Passed: a <GtkTextIter>.

where the selection should end

%return

Returned: a boolean.

GDK_EVENT_STOP to stop other handlers from being invoked for the event. GDK_EVENT_PROPAGATE to propagate the event further.

Signal: text-view:insert-at-cursor

Connect a handler with (connect object text-view:insert-at-cursor handler). It is called as (handler self string).

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.

self

Passed: a <GtkTextView>.

string

Passed: a string.

the string to insert

Signal: text-view:insert-emoji

Connect a handler with (connect object text-view:insert-emoji handler). It is called as (handler self).

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+;

self

Passed: a <GtkTextView>.

Signal: text-view:move-cursor

Connect a handler with (connect object text-view:move-cursor handler). It is called as (handler self step count extend-selection).

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
self

Passed: a <GtkTextView>.

step

Passed: a <GtkMovementStep>.

the granularity of the move, as a <GtkMovementStep>

count

Passed: a 32-bit integer.

the number of step units to move

extend-selection

Passed: a boolean.

#t if the move should extend the selection

Signal: text-view:move-viewport

Connect a handler with (connect object text-view:move-viewport handler). It is called as (handler self step count).

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.

self

Passed: a <GtkTextView>.

step

Passed: a <GtkScrollStep>.

the granularity of the movement, as a <GtkScrollStep>

count

Passed: a 32-bit integer.

the number of step units to move

Signal: text-view:paste-clipboard

Connect a handler with (connect object text-view:paste-clipboard handler). It is called as (handler self).

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.

self

Passed: a <GtkTextView>.

Signal: text-view:preedit-changed

Connect a handler with (connect object text-view:preedit-changed handler). It is called as (handler self preedit).

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.

self

Passed: a <GtkTextView>.

preedit

Passed: a string.

the current preedit string

Signal: text-view:select-all

Connect a handler with (connect object text-view:select-all handler). It is called as (handler self select).

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.

self

Passed: a <GtkTextView>.

select

Passed: a boolean.

#t to select, #f to unselect

Signal: text-view:set-anchor

Connect a handler with (connect object text-view:set-anchor handler). It is called as (handler self).

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.

self

Passed: a <GtkTextView>.

Signal: text-view:toggle-cursor-visible

Connect a handler with (connect object text-view:toggle-cursor-visible handler). It is called as (handler self).

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.

self

Passed: a <GtkTextView>.

Signal: text-view:toggle-overwrite

Connect a handler with (connect object text-view:toggle-overwrite handler). It is called as (handler self).

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.

self

Passed: a <GtkTextView>.

Virtual methods

Virtual method: text-view:do-backspace implementor self

The class handler for the text-view:backspace keybinding signal.

To override it in a new class, give register-type #:vfuncs `((backspace . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: <GtkTextView>, or a class that derives from it, or its GType number.

self

Passed: a <GtkTextView>.

Virtual method: text-view:do-copy-clipboard implementor self

The class handler for the text-view:copy-clipboard keybinding signal.

To override it in a new class, give register-type #:vfuncs `((copy-clipboard . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: <GtkTextView>, or a class that derives from it, or its GType number.

self

Passed: a <GtkTextView>.

Virtual method: text-view:do-cut-clipboard implementor self

The class handler for the text-view:cut-clipboard keybinding signal

To override it in a new class, give register-type #:vfuncs `((cut-clipboard . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: <GtkTextView>, or a class that derives from it, or its GType number.

self

Passed: a <GtkTextView>.

Virtual method: text-view:do-delete-from-cursor implementor self type count

The class handler for the text-view:delete-from-cursor keybinding signal.

To override it in a new class, give register-type #:vfuncs `((delete-from-cursor . ,procedure)). The procedure is called as (procedure self type count).

implementor

Passed: the class whose implementation to call: <GtkTextView>, or a class that derives from it, or its GType number.

self

Passed: a <GtkTextView>.

type

Passed: a <GtkDeleteType>, or one of its symbols.

count

Passed: a 32-bit integer.

Virtual method: text-view:do-extend-selection implementor self granularity location start end ⇒ %return

The class handler for the text-view:extend-selection signal.

To override it in a new class, give register-type #:vfuncs `((extend-selection . ,procedure)). The procedure is called as (procedure self granularity location start end) ⇒ %return.

implementor

Passed: the class whose implementation to call: <GtkTextView>, or a class that derives from it, or its GType number.

self

Passed: a <GtkTextView>.

granularity

Passed: a <GtkTextExtendSelection>, or one of its symbols.

location

Passed: a <GtkTextIter>.

start

Passed: a <GtkTextIter>.

end

Passed: a <GtkTextIter>.

%return

Returned: a boolean.

Virtual method: text-view:do-insert-at-cursor implementor self str

The class handler for the text-view:insert-at-cursor keybinding signal.

To override it in a new class, give register-type #:vfuncs `((insert-at-cursor . ,procedure)). The procedure is called as (procedure self str).

implementor

Passed: the class whose implementation to call: <GtkTextView>, or a class that derives from it, or its GType number.

self

Passed: a <GtkTextView>.

str

Passed: a string.

Virtual method: text-view:do-insert-emoji implementor self

The class handler for the text-view:insert-emoji signal.

To override it in a new class, give register-type #:vfuncs `((insert-emoji . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: <GtkTextView>, or a class that derives from it, or its GType number.

self

Passed: a <GtkTextView>.

Virtual method: text-view:do-move-cursor implementor self step count extend-selection

The class handler for the text-view:move-cursor keybinding signal.

To override it in a new class, give register-type #:vfuncs `((move-cursor . ,procedure)). The procedure is called as (procedure self step count extend-selection).

implementor

Passed: the class whose implementation to call: <GtkTextView>, or a class that derives from it, or its GType number.

self

Passed: a <GtkTextView>.

step

Passed: a <GtkMovementStep>, or one of its symbols.

count

Passed: a 32-bit integer.

extend-selection

Passed: a boolean.

Virtual method: text-view:do-paste-clipboard implementor self

The class handler for the text-view:paste-clipboard keybinding signal.

To override it in a new class, give register-type #:vfuncs `((paste-clipboard . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: <GtkTextView>, or a class that derives from it, or its GType number.

self

Passed: a <GtkTextView>.

Virtual method: text-view:do-set-anchor implementor self

The class handler for the text-view:set-anchor keybinding signal.

To override it in a new class, give register-type #:vfuncs `((set-anchor . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: <GtkTextView>, or a class that derives from it, or its GType number.

self

Passed: a <GtkTextView>.

Virtual method: text-view:do-snapshot-layer implementor self layer snapshot

The snapshot_layer vfunc is called before and after the text view is drawing its own text. Applications can override this vfunc in a subclass to draw customized content underneath or above the text. In the below-text and above-text layers the drawing is done in the buffer coordinate space.

To override it in a new class, give register-type #:vfuncs `((snapshot-layer . ,procedure)). The procedure is called as (procedure self layer snapshot).

implementor

Passed: the class whose implementation to call: <GtkTextView>, or a class that derives from it, or its GType number.

self

Passed: a <GtkTextView>.

layer

Passed: a <GtkTextViewLayer>, or one of its symbols.

snapshot

Passed: a <GtkSnapshot>.

Virtual method: text-view:do-toggle-overwrite implementor self

The class handler for the text-view:toggle-overwrite keybinding signal.

To override it in a new class, give register-type #:vfuncs `((toggle-overwrite . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: <GtkTextView>, or a class that derives from it, or its GType number.

self

Passed: a <GtkTextView>.