package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Viewport

type t = [ `viewport | `widget | `initially_unowned | `object_ ] Gobject.obj
val new_ : [ `adjustment | `initially_unowned | `object_ ] Gobject.obj option -> [ `adjustment | `initially_unowned | `object_ ] Gobject.obj option -> t

Create a new Viewport

val set_scroll_to_focus : t -> bool -> unit

Sets whether the viewport should automatically scroll to keep the focused child in view.

val set_child : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj option -> unit

Sets the child widget of @viewport.

val scroll_to : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj -> [ `scroll_info ] Gobject.obj option -> unit

Scrolls a descendant of the viewport into view.

The viewport and the descendant must be visible and mapped for this function to work, otherwise no scrolling will be performed.

val get_scroll_to_focus : t -> bool

Gets whether the viewport is scrolling to keep the focused child in view.

val get_child : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj option

Gets the child widget of @viewport.