Gtk.Scrollable

Entities

Simple Types

Access Types

Subtypes

Constants

Subprograms

Description

Gtk.Scrollable.Gtk_Scrollable is an interface that is implemented by widgets with native scrolling ability.

To implement this interface you should override the Gtk.Scrollable.Gtk_Scrollable:hadjustment and Gtk.Scrollable.Gtk_Scrollable:vadjustment properties.

## Creating a scrollable widget

All scrollable widgets should do the following.

widget should populate the adjustments' Gtk.Adjustment.Gtk_Adjustment:lower, Gtk.Adjustment.Gtk_Adjustment:upper, Gtk.Adjustment.Gtk_Adjustment:step-increment, Gtk.Adjustment.Gtk_Adjustment:page-increment and Gtk.Adjustment.Gtk_Adjustment:page-size properties and connect to the Gtk.Adjustment.Gtk_Adjustment::value-changed signal.

scrollable widget must be able to cope with underallocations. This means that it must accept any value passed to its Gtk.Widget.GObject_Class.size_allocate function.

widget should update the adjustments' properties with new values.

Gtk.Adjustment.Gtk_Adjustment::value-changed signal, the scrollable widget should scroll its contents.

<group>Interfaces</group>

"+"

function "+" (W : Gtk_Scrollable) return Gtk_Scrollable
Parameters
W
Return Value

Get_Border

function Get_Border
   (Self   : Gtk_Scrollable;
    Border : access Gtk.Style.Gtk_Border) return Boolean

Returns the size of a non-scrolling border around the outside of the scrollable. An example for this would be treeview headers. GTK+ can use this information to display overlayed graphics, like the overshoot indication, at the right position. Since: gtk+ 3.16

Parameters
Self
Border

return location for the results

Return Value

True if Border has been set

Get_Hadjustment

function Get_Hadjustment
   (Self : Gtk_Scrollable) return Gtk.Adjustment.Gtk_Adjustment

Retrieves the Gtk.Adjustment.Gtk_Adjustment used for horizontal scrolling. Since: gtk+ 3.0

Parameters
Self
Return Value

horizontal Gtk.Adjustment.Gtk_Adjustment.

Get_Hscroll_Policy

function Get_Hscroll_Policy
   (Self : Gtk_Scrollable) return Gtk.Enums.Gtk_Scrollable_Policy

Gets the horizontal Gtk.Enums.Gtk_Scrollable_Policy. Since: gtk+ 3.0

Parameters
Self
Return Value

The horizontal Gtk.Enums.Gtk_Scrollable_Policy.

Get_Type

function Get_Type return Glib.GType
Return Value

Get_Vadjustment

function Get_Vadjustment
   (Self : Gtk_Scrollable) return Gtk.Adjustment.Gtk_Adjustment

Retrieves the Gtk.Adjustment.Gtk_Adjustment used for vertical scrolling. Since: gtk+ 3.0

Parameters
Self
Return Value

vertical Gtk.Adjustment.Gtk_Adjustment.

Get_Vscroll_Policy

function Get_Vscroll_Policy
   (Self : Gtk_Scrollable) return Gtk.Enums.Gtk_Scrollable_Policy

Gets the vertical Gtk.Enums.Gtk_Scrollable_Policy. Since: gtk+ 3.0

Parameters
Self
Return Value

The vertical Gtk.Enums.Gtk_Scrollable_Policy.

Gtk_Scrollable

type Gtk_Scrollable is new Glib.Types.GType_Interface;

Hadjustment_Property

Hadjustment_Property : constant Glib.Properties.Property_Object;

Type: Gtk.Adjustment.Gtk_Adjustment Horizontal Gtk.Adjustment.Gtk_Adjustment of the scrollable widget. This adjustment is shared between the scrollable widget and its parent.

Hscroll_Policy_Property

Hscroll_Policy_Property : constant Gtk.Enums.Property_Gtk_Scrollable_Policy;

Determines whether horizontal scrolling should start once the scrollable widget is allocated less than its minimum width or less than its natural width.

Null_Gtk_Scrollable

Null_Gtk_Scrollable : constant Gtk_Scrollable;

Scrollable_Interface_Descr

subtype Scrollable_Interface_Descr is Glib.Object.Interface_Description;

Set_Get_Border

procedure Set_Get_Border
  (Self    : Scrollable_Interface_Descr;
   Handler : Virtual_Get_Border)

See Glib.Object.Add_Interface

Parameters
Self
Handler

Set_Hadjustment

procedure Set_Hadjustment
   (Self        : Gtk_Scrollable;
    Hadjustment : access Gtk.Adjustment.Gtk_Adjustment_Record'Class)

Sets the horizontal adjustment of the Gtk.Scrollable.Gtk_Scrollable. Since: gtk+ 3.0

Parameters
Self
Hadjustment

a Gtk.Adjustment.Gtk_Adjustment

Set_Hscroll_Policy

procedure Set_Hscroll_Policy
   (Self   : Gtk_Scrollable;
    Policy : Gtk.Enums.Gtk_Scrollable_Policy)

Sets the Gtk.Enums.Gtk_Scrollable_Policy to determine whether horizontal scrolling should start below the minimum width or below the natural width. Since: gtk+ 3.0

Parameters
Self
Policy

the horizontal Gtk.Enums.Gtk_Scrollable_Policy

Set_Vadjustment

procedure Set_Vadjustment
   (Self        : Gtk_Scrollable;
    Vadjustment : access Gtk.Adjustment.Gtk_Adjustment_Record'Class)

Sets the vertical adjustment of the Gtk.Scrollable.Gtk_Scrollable. Since: gtk+ 3.0

Parameters
Self
Vadjustment

a Gtk.Adjustment.Gtk_Adjustment

Set_Vscroll_Policy

procedure Set_Vscroll_Policy
   (Self   : Gtk_Scrollable;
    Policy : Gtk.Enums.Gtk_Scrollable_Policy)

Sets the Gtk.Enums.Gtk_Scrollable_Policy to determine whether vertical scrolling should start below the minimum height or below the natural height. Since: gtk+ 3.0

Parameters
Self
Policy

the vertical Gtk.Enums.Gtk_Scrollable_Policy

Vadjustment_Property

Vadjustment_Property : constant Glib.Properties.Property_Object;

Type: Gtk.Adjustment.Gtk_Adjustment Verical Gtk.Adjustment.Gtk_Adjustment of the scrollable widget. This adjustment is shared between the scrollable widget and its parent.

Virtual_Get_Border

type Virtual_Get_Border is access function
  (Self   : Gtk_Scrollable;
   Border : access Gtk.Style.Gtk_Border) return Glib.Gboolean;

Returns the size of a non-scrolling border around the outside of the scrollable. An example for this would be treeview headers. GTK+ can use this information to display overlayed graphics, like the overshoot indication, at the right position. Since: gtk+ 3.16

Parameters
Self
Border

return location for the results

Return Value

True if Border has been set

Vscroll_Policy_Property

Vscroll_Policy_Property : constant Gtk.Enums.Property_Gtk_Scrollable_Policy;

Determines whether vertical scrolling should start once the scrollable widget is allocated less than its minimum height or less than its natural height.