Method

Gtk.TextView.scroll_to_iter

Declaration [src]

gboolean
gtk_text_view_scroll_to_iter (
  GtkTextView* text_view,
  GtkTextIter* iter,
  double within_margin,
  gboolean use_align,
  double xalign,
  double yalign
)

Description [src]

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 GtkTextIter
 

a GtkTextIter

 Ownership is not transferred to the callee
within_margin double
 

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

use_align gboolean
 

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

xalign double
 

horizontal alignment of mark within visible area

yalign double
 

vertical alignment of mark within visible area

Return value

Returns: gboolean

TRUE if scrolling occurred