Class: Gtk::TextView

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#accepts_tabTrueClass

Returns whether pressing the Tab key inserts a tab characters. gtk_text_view_set_accepts_tab().

Returns:

  • (TrueClass)

    true if pressing the Tab key inserts a tab character, false if pressing the Tab key moves the keyboard focus.

#accepts_tab=(accepts_tab) ⇒ TrueClass

Parameters:

  • accepts_tab (TrueClass)

Returns:

  • (TrueClass)

    accepts-tab

  • (TrueClass)

    accepts-tab

#accepts_tab?TrueClass

Returns accepts-tab.

Returns:

  • (TrueClass)

    accepts-tab

#add_child_at_anchor(child, anchor) ⇒ nil

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

Parameters:

Returns:

  • (nil)

#add_child_in_window(child, which_window, xpos, ypos) ⇒ nil

Adds a child at fixed coordinates in one of the text widget’s windows.

The window must have nonzero size (see gtk_text_view_set_border_window_size()). Note that the child coordinates are given relative to scrolling. When placing a child in #GTK_TEXT_WINDOW_WIDGET, scrolling is irrelevant, the child floats above all scrollable areas. But when placing a child in one of the scrollable windows (border windows or text window) it will move with the scrolling as needed.

Parameters:

  • child (Gtk::Widget)

    a Gtk::Widget

  • which_window (Gtk::TextWindowType)

    which window the child should appear in

  • xpos (Integer)

    X position of child in window coordinates

  • ypos (Integer)

    Y position of child in window coordinates

Returns:

  • (nil)

#backward_display_line(iter) ⇒ TrueClass

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 Gtk::TextBuffer.

Parameters:

  • iter (Gtk::TextIter)

    a Gtk::TextIter

Returns:

  • (TrueClass)

    true if iter was moved and is not on the end iterator

#backward_display_line_start(iter) ⇒ TrueClass

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 Gtk::TextBuffer.

Parameters:

  • iter (Gtk::TextIter)

    a Gtk::TextIter

Returns:

  • (TrueClass)

    true if iter was moved and is not on the end iterator

#bottom_marginInteger

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

Returns:

  • (Integer)

    bottom-margin

#bottom_margin=(bottom_margin) ⇒ Integer

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

Parameters:

  • bottom_margin (Integer)

Returns:

  • (Integer)

    bottom-margin

  • (Integer)

    bottom-margin

#bufferGtk::TextBuffer

Returns buffer.

Returns:

#buffer=(buffer) ⇒ Gtk::TextBuffer

Parameters:

Returns:

#buffer_to_window_coords(win, buffer_x, buffer_y, window_x, window_y) ⇒ nil

Converts coordinate (buffer_x, buffer_y) to coordinates for the window win, and stores the result in (window_x, window_y).

Note that you can’t convert coordinates for a nonexisting window (see gtk_text_view_set_border_window_size()).

Parameters:

  • win (Gtk::TextWindowType)

    a Gtk::TextWindowType, except %GTK_TEXT_WINDOW_PRIVATE

  • buffer_x (Integer)

    buffer x coordinate

  • buffer_y (Integer)

    buffer y coordinate

  • window_x (Integer)

    window x coordinate return location or nil

  • window_y (Integer)

    window y coordinate return location or nil

Returns:

  • (nil)

#cursor_visibleTrueClass

Find out whether the cursor should be displayed.

Returns:

  • (TrueClass)

    whether the insertion mark is visible

#cursor_visible=(cursor_visible) ⇒ TrueClass

Parameters:

  • cursor_visible (TrueClass)

Returns:

  • (TrueClass)

    cursor-visible

  • (TrueClass)

    cursor-visible

#cursor_visible?TrueClass

Returns cursor-visible.

Returns:

  • (TrueClass)

    cursor-visible

#default_attributesGtk::TextAttributes

Obtains a copy of the default text attributes. These are the attributes used for text unless a tag overrides them. You’d typically pass the default attributes in to gtk_text_iter_get_attributes() in order to get the attributes in effect at a given text position.

The return value is a copy owned by the caller of this function, and should be freed with gtk_text_attributes_unref().

Returns:

  • (Gtk::TextAttributes)

    a new Gtk::TextAttributes

#editableTrueClass

Returns the default editability of the Gtk::TextView. Tags in the buffer may override this setting for some ranges of text.

Returns:

  • (TrueClass)

    whether text is editable by default

#editable=(editable) ⇒ TrueClass

Parameters:

  • editable (TrueClass)

Returns:

  • (TrueClass)

    editable

  • (TrueClass)

    editable

#editable?TrueClass

Returns editable.

Returns:

  • (TrueClass)

    editable

#forward_display_line(iter) ⇒ TrueClass

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 Gtk::TextBuffer.

Parameters:

  • iter (Gtk::TextIter)

    a Gtk::TextIter

Returns:

  • (TrueClass)

    true if iter was moved and is not on the end iterator

#forward_display_line_end(iter) ⇒ TrueClass

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 Gtk::TextBuffer.

Parameters:

  • iter (Gtk::TextIter)

    a Gtk::TextIter

Returns:

  • (TrueClass)

    true if iter was moved and is not on the end iterator

#get_border_window_size(type) ⇒ Integer

Gets the width of the specified border window. See gtk_text_view_set_border_window_size().

Parameters:

Returns:

  • (Integer)

    width of window

#get_cursor_locations(iter, strong, weak) ⇒ nil

Given an iter within a text layout, determine the positions of the strong and weak cursors if the insertion point is at that iterator. 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 nil, 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 gtk_text_view_buffer_to_window_coords() to convert these coordinates to coordinates for one of the windows in the text view.

Parameters:

  • iter (Gtk::TextIter)

    a Gtk::TextIter

  • strong (Gdk::Rectangle)

    location to store the strong cursor position (may be nil)

  • weak (Gdk::Rectangle)

    location to store the weak cursor position (may be nil)

Returns:

  • (nil)

#get_iter_at_location(iter, x, y) ⇒ TrueClass

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

Parameters:

  • iter (Gtk::TextIter)

    a Gtk::TextIter

  • x (Integer)

    x position, in buffer coordinates

  • y (Integer)

    y position, in buffer coordinates

Returns:

  • (TrueClass)

    true if the position is over text

#get_iter_at_position(iter, trailing, x, y) ⇒ TrueClass

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

Note that this is different from gtk_text_view_get_iter_at_location(), which returns cursor locations, i.e. positions between characters.

Parameters:

  • iter (Gtk::TextIter)

    a Gtk::TextIter

  • trailing (Integer)

    if non-nil, 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.

  • x (Integer)

    x position, in buffer coordinates

  • y (Integer)

    y position, in buffer coordinates

Returns:

  • (TrueClass)

    true if the position is over text

#get_iter_location(iter, location) ⇒ nil

Gets a rectangle which roughly contains the character at iter. The rectangle position is in buffer coordinates; use gtk_text_view_buffer_to_window_coords() to convert these coordinates to coordinates for one of the windows in the text view.

Parameters:

  • iter (Gtk::TextIter)

    a Gtk::TextIter

  • location (Gdk::Rectangle)

    bounds of the character at iter

Returns:

  • (nil)

#get_line_at_y(target_iter, y, line_top) ⇒ nil

Gets the Gtk::TextIter at the start of the line containing the coordinate y. y is in buffer coordinates, convert from window coordinates with gtk_text_view_window_to_buffer_coords(). If non-nil, line_top will be filled with the coordinate of the top edge of the line.

Parameters:

  • target_iter (Gtk::TextIter)

    a Gtk::TextIter

  • y (Integer)

    a y coordinate

  • line_top (Integer)

    return location for top coordinate of the line

Returns:

  • (nil)

#get_line_yrange(iter, y, height) ⇒ nil

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

Parameters:

  • iter (Gtk::TextIter)

    a Gtk::TextIter

  • y (Integer)

    return location for a y coordinate

  • height (Integer)

    return location for a height

Returns:

  • (nil)

#get_visible_rect(visible_rect) ⇒ nil

Fills visible_rect with the currently-visible region of the buffer, in buffer coordinates. Convert to window coordinates with gtk_text_view_buffer_to_window_coords().

Parameters:

  • visible_rect (Gdk::Rectangle)

    rectangle to fill

Returns:

  • (nil)

#get_window(win) ⇒ Gdk::Window

Retrieves the Gdk::Window corresponding to an area of the text view; possible windows include the overall widget window, child windows on the left, right, top, bottom, and the window that displays the text buffer. Windows are nil and nonexistent if their width or height is 0, and are nonexistent before the widget has been realized.

Parameters:

Returns:

#get_window_type(window) ⇒ Gtk::TextWindowType

Usually used to find out which window an event corresponds to.

If you connect to an event signal on text_view, this function should be called on ‘event->window` to see which window it was.

Parameters:

Returns:

#hadjustmentGtk::Adjustment

Gets the horizontal-scrolling Gtk::Adjustment.

Returns:

#im_context_filter_keypress(event) ⇒ TrueClass

Allow the Gtk::TextView input 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 gtk_im_context_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 Gtk::TextView.

static gboolean
gtk_foo_bar_key_press_event (GtkWidget   *widget,
                             GdkEventKey *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);
}

Parameters:

  • event (Gdk::EventKey)

    the key event

Returns:

  • (TrueClass)

    true if the input method handled the key event.

#im_moduleString

Which IM (input method) module should be used for this text_view. See Gtk::IMContext.

Setting this to a non-nil value overrides the system-wide IM module setting. See the GtkSettings Gtk::Settings:gtk-im-module property.

Returns:

  • (String)

    im-module

#im_module=(im_module) ⇒ String

Which IM (input method) module should be used for this text_view. See Gtk::IMContext.

Setting this to a non-nil value overrides the system-wide IM module setting. See the GtkSettings Gtk::Settings:gtk-im-module property.

Parameters:

  • im_module (String)

Returns:

  • (String)

    im-module

  • (String)

    im-module

#indentInteger

Returns indent.

Returns:

  • (Integer)

    indent

#indent=(indent) ⇒ Integer

Parameters:

  • indent (Integer)

Returns:

  • (Integer)

    indent

  • (Integer)

    indent

#input_hintsGtk::InputHints

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

Returns:

#input_hints=(input_hints) ⇒ Gtk::InputHints

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

Parameters:

Returns:

#input_purposeGtk::InputPurpose

The purpose of this text field.

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

Returns:

#input_purpose=(input_purpose) ⇒ Gtk::InputPurpose

The purpose of this text field.

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

Parameters:

Returns:

#justificationGtk::Justification

Returns justification.

Returns:

#justification=(justification) ⇒ Gtk::Justification

Parameters:

Returns:

#left_marginInteger

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.

Don’t confuse this property with Gtk::Widget:margin-left.

Returns:

  • (Integer)

    left-margin

#left_margin=(left_margin) ⇒ Integer

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.

Don’t confuse this property with Gtk::Widget:margin-left.

Parameters:

  • left_margin (Integer)

Returns:

  • (Integer)

    left-margin

  • (Integer)

    left-margin

#monospaceTrueClass

Gets the value of the Gtk::TextView:monospace property.

Returns:

  • (TrueClass)

    true if monospace fonts are desired

#monospace=(monospace) ⇒ TrueClass

Parameters:

  • monospace (TrueClass)

Returns:

  • (TrueClass)

    monospace

  • (TrueClass)

    monospace

#monospace?TrueClass

Returns monospace.

Returns:

  • (TrueClass)

    monospace

#move_child(child, xpos, ypos) ⇒ nil

Updates the position of a child, as for gtk_text_view_add_child_in_window().

Parameters:

  • child (Gtk::Widget)

    child widget already added to the text view

  • xpos (Integer)

    new X position in window coordinates

  • ypos (Integer)

    new Y position in window coordinates

Returns:

  • (nil)

#move_mark_onscreen(mark) ⇒ TrueClass

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

Parameters:

Returns:

  • (TrueClass)

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

#move_visually(iter, count) ⇒ TrueClass

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.

Parameters:

  • iter (Gtk::TextIter)

    a Gtk::TextIter

  • count (Integer)

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

Returns:

  • (TrueClass)

    true if iter moved and is not on the end iterator

#newGtk::Widget

Creates a new Gtk::TextView. If you don’t call gtk_text_view_set_buffer() before using the text view, an empty default buffer will be created for you. Get the buffer with gtk_text_view_get_buffer(). If you want to specify your own buffer, consider gtk_text_view_new_with_buffer().

Returns:

#new_with_buffer(buffer) ⇒ Gtk::Widget

Creates a new Gtk::TextView widget displaying the buffer buffer. One buffer can be shared among many widgets. buffer may be nil to create a default buffer, in which case this function is equivalent to gtk_text_view_new(). The text view adds its own reference count to the buffer; it does not take over an existing reference.

Parameters:

Returns:

#overwriteTrueClass

Returns whether the Gtk::TextView is in overwrite mode or not.

Returns:

  • (TrueClass)

    whether text_view is in overwrite mode or not.

#overwrite=(overwrite) ⇒ TrueClass

Parameters:

  • overwrite (TrueClass)

Returns:

  • (TrueClass)

    overwrite

  • (TrueClass)

    overwrite

#overwrite?TrueClass

Returns overwrite.

Returns:

  • (TrueClass)

    overwrite

#pixels_above_linesInteger

Returns pixels-above-lines.

Returns:

  • (Integer)

    pixels-above-lines

#pixels_above_lines=(pixels_above_lines) ⇒ Integer

Parameters:

  • pixels_above_lines (Integer)

Returns:

  • (Integer)

    pixels-above-lines

  • (Integer)

    pixels-above-lines

#pixels_below_linesInteger

Returns pixels-below-lines.

Returns:

  • (Integer)

    pixels-below-lines

#pixels_below_lines=(pixels_below_lines) ⇒ Integer

Parameters:

  • pixels_below_lines (Integer)

Returns:

  • (Integer)

    pixels-below-lines

  • (Integer)

    pixels-below-lines

#pixels_inside_wrapInteger

Returns pixels-inside-wrap.

Returns:

  • (Integer)

    pixels-inside-wrap

#pixels_inside_wrap=(pixels_inside_wrap) ⇒ Integer

Parameters:

  • pixels_inside_wrap (Integer)

Returns:

  • (Integer)

    pixels-inside-wrap

  • (Integer)

    pixels-inside-wrap

#place_cursor_onscreenTrueClass

Moves the cursor to the currently visible region of the buffer, it it isn’t there already.

Returns:

  • (TrueClass)

    true if the cursor had to be moved.

#populate_all=(populate_all) ⇒ TrueClass

If :populate-all is true, the Gtk::TextView::populate-popup signal is also emitted for touch popups.

Parameters:

  • populate_all (TrueClass)

Returns:

  • (TrueClass)

    populate-all

  • (TrueClass)

    populate-all

#populate_all?TrueClass

If :populate-all is true, the Gtk::TextView::populate-popup signal is also emitted for touch popups.

Returns:

  • (TrueClass)

    populate-all

Ensures that the cursor is shown (i.e. not in an ‘off’ blink interval) and 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 Gtk::Widget::key-press-event handler).

Returns:

  • (nil)

#reset_im_contextnil

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.

Returns:

  • (nil)

#right_marginInteger

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.

Don’t confuse this property with Gtk::Widget:margin-right.

Returns:

  • (Integer)

    right-margin

#right_margin=(right_margin) ⇒ Integer

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.

Don’t confuse this property with Gtk::Widget:margin-right.

Parameters:

  • right_margin (Integer)

Returns:

  • (Integer)

    right-margin

  • (Integer)

    right-margin

#scroll_mark_onscreen(mark) ⇒ nil

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

Parameters:

Returns:

  • (nil)

#scroll_to_iter(iter, within_margin, use_align, xalign, yalign) ⇒ TrueClass

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 gtk_text_view_scroll_to_mark() which saves a point to be scrolled to after line validation.

Parameters:

  • iter (Gtk::TextIter)

    a Gtk::TextIter

  • within_margin (Float)

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

  • use_align (TrueClass)

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

  • xalign (Float)

    horizontal alignment of mark within visible area

  • yalign (Float)

    vertical alignment of mark within visible area

Returns:

  • (TrueClass)

    true if scrolling occurred

#scroll_to_mark(mark, within_margin, use_align, xalign, yalign) ⇒ nil

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.

Parameters:

  • mark (Gtk::TextMark)

    a Gtk::TextMark

  • within_margin (Float)

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

  • use_align (TrueClass)

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

  • xalign (Float)

    horizontal alignment of mark within visible area

  • yalign (Float)

    vertical alignment of mark within visible area

Returns:

  • (nil)

#set_border_window_size(type, size) ⇒ nil

Sets the width of %GTK_TEXT_WINDOW_LEFT or %GTK_TEXT_WINDOW_RIGHT, or the height of %GTK_TEXT_WINDOW_TOP or %GTK_TEXT_WINDOW_BOTTOM. Automatically destroys the corresponding window if the size is set to 0, and creates the window if the size is set to non-zero. This function can only be used for the “border windows”, and it won’t work with %GTK_TEXT_WINDOW_WIDGET, %GTK_TEXT_WINDOW_TEXT, or %GTK_TEXT_WINDOW_PRIVATE.

Parameters:

  • type (Gtk::TextWindowType)

    window to affect

  • size (Integer)

    width or height of the window

Returns:

  • (nil)

#starts_display_line(iter) ⇒ TrueClass

Determines whether iter is at the start of a display line. See gtk_text_view_forward_display_line() for an explanation of display lines vs. paragraphs.

Parameters:

  • iter (Gtk::TextIter)

    a Gtk::TextIter

Returns:

  • (TrueClass)

    true if iter begins a wrapped line

#tabsPango::TabArray

Returns tabs.

Returns:

  • (Pango::TabArray)

    tabs

#tabs=(tabs) ⇒ Pango::TabArray

Parameters:

  • tabs (Pango::TabArray)

Returns:

  • (Pango::TabArray)

    tabs

  • (Pango::TabArray)

    tabs

#top_marginInteger

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

Returns:

  • (Integer)

    top-margin

#top_margin=(top_margin) ⇒ Integer

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

Parameters:

  • top_margin (Integer)

Returns:

  • (Integer)

    top-margin

  • (Integer)

    top-margin

#vadjustmentGtk::Adjustment

Gets the vertical-scrolling Gtk::Adjustment.

Returns:

#window_to_buffer_coords(win, window_x, window_y, buffer_x, buffer_y) ⇒ nil

Converts coordinates on the window identified by win to buffer coordinates, storing the result in (buffer_x,buffer_y).

Note that you can’t convert coordinates for a nonexisting window (see gtk_text_view_set_border_window_size()).

Parameters:

  • win (Gtk::TextWindowType)

    a Gtk::TextWindowType except %GTK_TEXT_WINDOW_PRIVATE

  • window_x (Integer)

    window x coordinate

  • window_y (Integer)

    window y coordinate

  • buffer_x (Integer)

    buffer x coordinate return location or nil

  • buffer_y (Integer)

    buffer y coordinate return location or nil

Returns:

  • (nil)

#wrap_modeGtk::WrapMode

Returns wrap-mode.

Returns:

#wrap_mode=(wrap_mode) ⇒ Gtk::WrapMode

Parameters:

Returns: