ScrolledView


Object Hierarchy:

Object hierarchy for ScrolledView

Description:

public class ScrolledView : Widget

App-owned vertical scroll shell (GTK Gtk.ScrolledWindow model, without fighting measure).

Based on GTK `gtkscrolledwindow.c` allocate/measure: viewport size is independent of content; a Gtk.Scrollable child gets the viewport allocation and scrolls via shared adjustments.

Vertical size is exactly content_height (min = nat). Classic vertical scrollbar only when at max_height and `vadjustment.upper > page_size` (hidden while the viewport still grows).

When the child is a Gtk.TextView, set_child binds `buffer.changed` (one Idle) to set content_height from line yrange (capped by max_height). Scroll-to-end is applied in size_allocate after the TextView updates its adjustment.

Usage Examples

Composer TextView

  var scroll = new OLLMchatGtk.ScrolledView();
scroll.max_height = half_chat;
scroll.set_child(text_view); // auto-sizes on buffer.changed

Since:

1.0


Namespace: OLLMchatGtk
Package: ollmchat

Content:

Properties:

Creation methods:

Methods:

Signals:

Inherited Members:

All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
All known members inherited from interface Gtk.Accessible
All known members inherited from interface Gtk.Buildable