## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

## Index

Package: Adjustment

- Goto spec source

# Description

    package Gtk.Adjustment is

This object represents an adjustable bounded value. It is used in many other widgets that have such internal values, like Gtk_Scrollbar, Gtk_Spin_Button, Gtk_Range, ... Modifying the value of these widgets is done through their associated adjustments.

The modification of the value is left to the user, who should call Value_Changed or Changed to emit the relevant signals.

The meaning of the most important fields can be explained on the following figure (imagine this is a scrollbar): [-------|=================|-------------------] lower value value + page_size upper

# Classes

### Gtk_Adjustment_Record

- Goto declaration in source

    type Gtk_Adjustment_Record is new GObject_Record with null record;

#### Ancestors:

Glib.Object.GObject_Record

#### Primitive operations:

Changed

- To API doc
- To spec

Clamp_Page

- To API doc
- To spec

Configure

- To API doc
- To spec

Get_Lower

- To API doc
- To spec

Get_Page_Increment

- To API doc
- To spec

Get_Page_Size

- To API doc
- To spec

Get_Step_Increment

- To API doc
- To spec

Get_Upper

- To API doc
- To spec

Get_Value

- To API doc
- To spec

Glib.Object.Deallocate

- To API doc
- To spec

(Inherited)
Glib.Object.Get_Type

- To API doc
- To spec

(Inherited)
Glib.Object.Notify

- To API doc
- To spec

(Inherited)
Glib.Object.Ref

- To API doc
- To spec

(Inherited)
Glib.Object.Ref_Sink

- To API doc
- To spec

(Inherited)
Glib.Object.Unref

- To API doc
- To spec

(Inherited)
Set_Lower

- To API doc
- To spec

Set_Page_Increment

- To API doc
- To spec

Set_Page_Size

- To API doc
- To spec

Set_Step_Increment

- To API doc
- To spec

Set_Upper

- To API doc
- To spec

Set_Value

- To API doc
- To spec

Value_Changed

- To API doc
- To spec

# Types

### Gtk_Adjustment

- Goto declaration in source

    type Gtk_Adjustment is access all Gtk_Adjustment_Record'Class;

# Constants & Global variables

### Lower_Property

- Goto declaration in source

(Glib.Properties.Property_Double)

    Lower_Property : constant Glib.Properties.Property_Double;

### Page_Increment_Property

- Goto declaration in source

(Glib.Properties.Property_Double)

    Page_Increment_Property : constant Glib.Properties.Property_Double;

### Page_Size_Property

- Goto declaration in source

(Glib.Properties.Property_Double)

    Page_Size_Property : constant Glib.Properties.Property_Double;

### Step_Increment_Property

- Goto declaration in source

(Glib.Properties.Property_Double)

    Step_Increment_Property : constant Glib.Properties.Property_Double;

### Upper_Property

- Goto declaration in source

(Glib.Properties.Property_Double)

    Upper_Property : constant Glib.Properties.Property_Double;

### Value_Property

- Goto declaration in source

(Glib.Properties.Property_Double)

    Value_Property : constant Glib.Properties.Property_Double;

### Signal_Changed

- Goto declaration in source

(Glib.Signal_Name)

    Signal_Changed : constant Glib.Signal_Name := "changed";

### Signal_Value_Changed

- Goto declaration in source

(Glib.Signal_Name)

    Signal_Value_Changed : constant Glib.Signal_Name := "value-changed";

# Subprograms & Entries

### Gtk_New

- Goto spec in source

    procedure Gtk_New (Adjustment: out Gtk_Adjustment;Value: Gdouble;Lower: Gdouble;Upper: Gdouble;Step_Increment: Gdouble;Page_Increment: Gdouble;Page_Size: Gdouble := 0.0);

### Initialize

- Goto spec in source

    procedure Initialize (Adjustment: access Gtk_Adjustment_Record'Class;Value: Gdouble;Lower: Gdouble;Upper: Gdouble;Step_Increment: Gdouble;Page_Increment: Gdouble;Page_Size: Gdouble := 0.0);

Create a new adjustment. Value is the initial value of the adjustment. It must be in the range (Lower .. Upper) and the adjustment's value will never be outside this range. Step_Increment is the value used to make minor adjustments, such as when the user clicks on the arrows of a scrollbar. Page_Increment is used to make major adjustments, such as when the user clicks in the through on a scrollbar. Page_Size is deprecated, use the default value.

### Get_Type

- Goto spec in source
- Goto body in source

    function Get_Type return Glib.GType;

### Changed

- Goto spec in source

    procedure Changed (Adjustment: access Gtk_Adjustment_Record);

### Clamp_Page

- Goto spec in source

    procedure Clamp_Page (Adjustment: access Gtk_Adjustment_Record;Lower: Gdouble;Upper: Gdouble);

Update the Adjustment value to ensure that the range between Lower and Upper is in the current page (i.e. between value and value + page_size). If the range is larger than the page size, then only the start of it will be in the current page. A "value_changed" signal will be emitted if the value is changed.

### Configure

- Goto spec in source

    procedure Configure (Adjustment: access Gtk_Adjustment_Record;Value: Gdouble;Lower: Gdouble;Upper: Gdouble;Step_Increment: Gdouble;Page_Increment: Gdouble;Page_Size: Gdouble);

Sets all properties of the adjustment at once. Use this function to avoid multiple emissions of the "changed" signal. See Gtk.Adjustment.Set_Lower for an alternative way of compressing multiple emissions of "changed" into one. Since: gtk+ 2.14 "value": the new value "lower": the new minimum value "upper": the new maximum value "step_increment": the new step increment "page_increment": the new page increment "page_size": the new page size

### Get_Lower

- Goto spec in source

    function Get_Lower (Adjustment: access Gtk_Adjustment_Record) return Gdouble;

### Set_Lower

- Goto spec in source

    procedure Set_Lower (Adjustment: access Gtk_Adjustment_Record;Lower: Gdouble);

Sets the minimum value of the adjustment. When setting multiple adjustment properties via their individual setters, multiple "changed" signals will be emitted. However, since the emission of the "changed" signal is tied to the emission of the "GObject::notify" signals of the changed properties, it's possible to compress the "changed" signals into one by calling g_object_freeze_notify and g_object_thaw_notify around the calls to the individual setters. Alternatively, using a single g_object_set for all the properties to change, or using Gtk.Adjustment.Configure has the same effect of compressing "changed" emissions. Since: gtk+ 2.14 "lower": the new minimum value

### Get_Page_Increment

- Goto spec in source

    function Get_Page_Increment (Adjustment: access Gtk_Adjustment_Record) return Gdouble;

### Set_Page_Increment

- Goto spec in source

    procedure Set_Page_Increment (Adjustment: access Gtk_Adjustment_Record;Page_Increment: Gdouble);

Sets the page increment of the adjustment. See Gtk.Adjustment.Set_Lower about how to compress multiple emissions of the "changed" signal when setting multiple adjustment properties. Since: gtk+ 2.14 "page_increment": the new page increment

### Get_Page_Size

- Goto spec in source

    function Get_Page_Size (Adjustment: access Gtk_Adjustment_Record) return Gdouble;

### Set_Page_Size

- Goto spec in source

    procedure Set_Page_Size (Adjustment: access Gtk_Adjustment_Record;Page_Size: Gdouble);

Sets the page size of the adjustment. See Gtk.Adjustment.Set_Lower about how to compress multiple emissions of the "changed" signal when setting multiple adjustment properties. Since: gtk+ 2.14 "page_size": the new page size

### Get_Step_Increment

- Goto spec in source

    function Get_Step_Increment (Adjustment: access Gtk_Adjustment_Record) return Gdouble;

### Set_Step_Increment

- Goto spec in source

    procedure Set_Step_Increment (Adjustment: access Gtk_Adjustment_Record;Step_Increment: Gdouble);

Sets the step increment of the adjustment. See Gtk.Adjustment.Set_Lower about how to compress multiple emissions of the "changed" signal when setting multiple adjustment properties. Since: gtk+ 2.14 "step_increment": the new step increment

### Get_Upper

- Goto spec in source

    function Get_Upper (Adjustment: access Gtk_Adjustment_Record) return Gdouble;

### Set_Upper

- Goto spec in source

    procedure Set_Upper (Adjustment: access Gtk_Adjustment_Record;Upper: Gdouble);

Sets the maximum value of the adjustment. Note that values will be restricted by <literal>upper - page-size</literal> if the page-size property is nonzero. See Gtk.Adjustment.Set_Lower about how to compress multiple emissions of the "changed" signal when setting multiple adjustment properties. Since: gtk+ 2.14 "upper": the new maximum value

### Get_Value

- Goto spec in source

    function Get_Value (Adjustment: access Gtk_Adjustment_Record) return Gdouble;

### Set_Value

- Goto spec in source

    procedure Set_Value (Adjustment: access Gtk_Adjustment_Record;Value: Gdouble);

### Value_Changed

- Goto spec in source

    procedure Value_Changed (Adjustment: access Gtk_Adjustment_Record);