package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Scrolled_window/index.html

Module Wrappers.Scrolled_window

type t = [ `scrolled_window | `widget | `initially_unowned | `object_ ] Gobject.obj
val new_ : unit -> t

Create a new ScrolledWindow

val unset_placement : t -> unit

Unsets the placement of the contents with respect to the scrollbars.

If no window placement is set for a scrolled window, it defaults to %GTK_CORNER_TOP_LEFT.

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

Sets the `GtkAdjustment` for the vertical scrollbar.

val set_propagate_natural_width : t -> bool -> unit

Sets whether the natural width of the child should be calculated and propagated through the scrolled window’s requested natural width.

val set_propagate_natural_height : t -> bool -> unit

Sets whether the natural height of the child should be calculated and propagated through the scrolled window’s requested natural height.

val set_policy : t -> Gtk_enums.policytype -> Gtk_enums.policytype -> unit

Sets the scrollbar policy for the horizontal and vertical scrollbars.

The policy determines when the scrollbar should appear; it is a value from the enum@Gtk.PolicyType enumeration. If %GTK_POLICY_ALWAYS, the scrollbar is always present; if %GTK_POLICY_NEVER, the scrollbar is never present; if %GTK_POLICY_AUTOMATIC, the scrollbar is present only if needed (that is, if the slider part of the bar would be smaller than the trough — the display is larger than the page size).

val set_placement : t -> Gtk_enums.cornertype -> unit

Sets the placement of the contents with respect to the scrollbars for the scrolled window.

The default is %GTK_CORNER_TOP_LEFT, meaning the child is in the top left, with the scrollbars underneath and to the right. Other values in enum@Gtk.CornerType are %GTK_CORNER_TOP_RIGHT, %GTK_CORNER_BOTTOM_LEFT, and %GTK_CORNER_BOTTOM_RIGHT.

See also method@Gtk.ScrolledWindow.get_placement and method@Gtk.ScrolledWindow.unset_placement.

val set_overlay_scrolling : t -> bool -> unit

Enables or disables overlay scrolling for this scrolled window.

val set_min_content_width : t -> int -> unit

Sets the minimum width that @scrolled_window should keep visible.

Note that this can and (usually will) be smaller than the minimum size of the content.

It is a programming error to set the minimum content width to a value greater than property@Gtk.ScrolledWindow:max-content-width.

val set_min_content_height : t -> int -> unit

Sets the minimum height that @scrolled_window should keep visible.

Note that this can and (usually will) be smaller than the minimum size of the content.

It is a programming error to set the minimum content height to a value greater than property@Gtk.ScrolledWindow:max-content-height.

val set_max_content_width : t -> int -> unit

Sets the maximum width that @scrolled_window should keep visible.

The @scrolled_window will grow up to this width before it starts scrolling the content.

It is a programming error to set the maximum content width to a value smaller than property@Gtk.ScrolledWindow:min-content-width.

val set_max_content_height : t -> int -> unit

Sets the maximum height that @scrolled_window should keep visible.

The @scrolled_window will grow up to this height before it starts scrolling the content.

It is a programming error to set the maximum content height to a value smaller than property@Gtk.ScrolledWindow:min-content-height.

val set_kinetic_scrolling : t -> bool -> unit

Turns kinetic scrolling on or off.

Kinetic scrolling only applies to devices with source %GDK_SOURCE_TOUCHSCREEN.

val set_has_frame : t -> bool -> unit

Changes the frame drawn around the contents of @scrolled_window.

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

Sets the `GtkAdjustment` for the horizontal scrollbar.

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

Sets the child widget of @scrolled_window.

If @child does not implement the iface@Gtk.Scrollable interface, the scrolled window will add @child to a class@Gtk.Viewport instance and then add the viewport as its child widget.

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

Returns the vertical scrollbar of @scrolled_window.

val get_vadjustment : t -> [ `adjustment | `initially_unowned | `object_ ] Gobject.obj

Returns the vertical scrollbar’s adjustment.

This is the adjustment used to connect the vertical scrollbar to the child widget’s vertical scroll functionality.

val get_propagate_natural_width : t -> bool

Reports whether the natural width of the child will be calculated and propagated through the scrolled window’s requested natural width.

val get_propagate_natural_height : t -> bool

Reports whether the natural height of the child will be calculated and propagated through the scrolled window’s requested natural height.

Retrieves the current policy values for the horizontal and vertical scrollbars.

See method@Gtk.ScrolledWindow.set_policy.

val get_placement : t -> Gtk_enums.cornertype

Gets the placement of the contents with respect to the scrollbars.

val get_overlay_scrolling : t -> bool

Returns whether overlay scrolling is enabled for this scrolled window.

val get_min_content_width : t -> int

Gets the minimum content width of @scrolled_window.

val get_min_content_height : t -> int

Gets the minimal content height of @scrolled_window.

val get_max_content_width : t -> int

Returns the maximum content width set.

val get_max_content_height : t -> int

Returns the maximum content height set.

val get_kinetic_scrolling : t -> bool

Returns the specified kinetic scrolling behavior.

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

Returns the horizontal scrollbar of @scrolled_window.

val get_has_frame : t -> bool

Gets whether the scrolled window draws a frame.

val get_hadjustment : t -> [ `adjustment | `initially_unowned | `object_ ] Gobject.obj

Returns the horizontal scrollbar’s adjustment.

This is the adjustment used to connect the horizontal scrollbar to the child widget’s horizontal scroll functionality.

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

Gets the child widget of @scrolled_window.

If the scrolled window automatically added a class@Gtk.Viewport, this function will return the viewport widget, and you can retrieve its child using method@Gtk.Viewport.get_child.

val get_hscrollbar_policy : t -> Gtk_enums.policytype

Get property: hscrollbar-policy

val set_hscrollbar_policy : t -> Gtk_enums.policytype -> unit

Set property: hscrollbar-policy

val get_vscrollbar_policy : t -> Gtk_enums.policytype

Get property: vscrollbar-policy

val set_vscrollbar_policy : t -> Gtk_enums.policytype -> unit

Set property: vscrollbar-policy

val get_window_placement : t -> Gtk_enums.cornertype

Get property: window-placement

val set_window_placement : t -> Gtk_enums.cornertype -> unit

Set property: window-placement

val on_edge_overshot : ?after:bool -> t -> callback:(pos:Gtk_enums.positiontype -> unit) -> Gobject.Signal.handler_id
val on_edge_reached : ?after:bool -> t -> callback:(pos:Gtk_enums.positiontype -> unit) -> Gobject.Signal.handler_id
val on_move_focus_out : ?after:bool -> t -> callback:(direction_type:Gtk_enums.directiontype -> unit) -> Gobject.Signal.handler_id
val on_scroll_child : ?after:bool -> t -> callback:(scroll:Gtk_enums.scrolltype -> horizontal:bool -> bool) -> Gobject.Signal.handler_id