W Wrapl, The Programming Language

Libraries:Gtk:Gtk:Adjustment

Types

T

Inherits from:

The T object represents a value which has an associated lower and upper bound, together with step and page increments, and a page size. It is used within several GTK+ widgets, including Gtk.Gtk.SpinButton.T, Gtk.Gtk.Viewport.T, and Gtk.Gtk.Range.T (which is a base class for Gtk.Gtk.HScrollbar.T, Gtk.Gtk.VScrollbar.T, Gtk.Gtk.HScale.T, and Gtk.Gtk.VScale.T).

The T object does not update the value itself. Instead it is left up to the owner of the T to control the value.

The owner of the T typically calls the ValueChanged and Changed functions after changing the value and its bounds. This results in the emission of the "value_changed" or "changed" signal respectively.



Constants

Nil : T

Functions

GetType() : Gtk.GObject.Type.T



New(value @ Std.Real.T, lower @ Std.Real.T, upper @ Std.Real.T, step_increment @ Std.Real.T, page_increment @ Std.Real.T, page_size @ Std.Real.T) : Gtk.Gtk.Adjustment.T

Creates a new T.

value the initial value.
lower the minimum value.
upper the maximum value.
step_increment the step increment.
page_increment the page increment.
page_size the page size.
Returns a new T.


Methods

:Changed(self @ T) : Std.Object.T

Emits a "changed" signal from the T. This is typically called by the owner of the T after it has changed any of the T fields other than the value.

adjustment a T


:ClampPage(self @ T, lower @ Std.Real.T, upper @ Std.Real.T) : Std.Object.T

Updates the T 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 "changed" signal will be emitted if the value is changed.

adjustment a T.
lower the lower value.
upper the upper value.


:Configure(self @ T, value @ Std.Real.T, lower @ Std.Real.T, upper @ Std.Real.T, step_increment @ Std.Real.T, page_increment @ Std.Real.T, page_size @ Std.Real.T) : Std.Object.T

Sets all properties of the adjustment at once.

Use this function to avoid multiple emissions of the "changed" signal. See SetLower for an alternative way of compressing multiple emissions of "changed" into one.

adjustment a T
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


:GetLower(self @ T) : Std.Real.T

Retrieves the minimum value of the adjustment.

adjustment a T
Returns The current minimum value of the adjustment.


:GetPageIncrement(self @ T) : Std.Real.T

Retrieves the page increment of the adjustment.

adjustment a T
Returns The current page increment of the adjustment.


:GetPageSize(self @ T) : Std.Real.T

Retrieves the page size of the adjustment.

adjustment a T
Returns The current page size of the adjustment.


:GetStepIncrement(self @ T) : Std.Real.T

Retrieves the step increment of the adjustment.

adjustment a T
Returns The current step increment of the adjustment.


:GetUpper(self @ T) : Std.Real.T

Retrieves the maximum value of the adjustment.

adjustment a T
Returns The current maximum value of the adjustment.


:GetValue(self @ T) : Std.Real.T

Gets the current value of the adjustment. See SetValue.

adjustment a T
Returns The current value of the adjustment.


:SetLower(self @ T, lower @ Std.Real.T) : Std.Object.T

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 Configure has the same effect of compressing "changed" emissions.

adjustment a T
lower the new minimum value


:SetPageIncrement(self @ T, page_increment @ Std.Real.T) : Std.Object.T

Sets the page increment of the adjustment.

See SetLower about how to compress multiple emissions of the "changed" signal when setting multiple adjustment properties.

adjustment a T
page_increment the new page increment


:SetPageSize(self @ T, page_size @ Std.Real.T) : Std.Object.T

Sets the page size of the adjustment.

See SetLower about how to compress multiple emissions of the "changed" signal when setting multiple adjustment properties.

adjustment a T
page_size the new page size


:SetStepIncrement(self @ T, step_increment @ Std.Real.T) : Std.Object.T

Sets the step increment of the adjustment.

See SetLower about how to compress multiple emissions of the "changed" signal when setting multiple adjustment properties.

adjustment a T
step_increment the new step increment


:SetUpper(self @ T, upper @ Std.Real.T) : Std.Object.T

Sets the maximum value of the adjustment.

Note that values will be restricted by upper - page-size if the page-size property is nonzero.

See SetLower about how to compress multiple emissions of the "changed" signal when setting multiple adjustment properties.

adjustment a T
upper the new maximum value


:SetValue(self @ T, value @ Std.Real.T) : Std.Object.T

Sets the T value. The value is clamped to lie between adjustment->lower and adjustment->upper.

Note that for adjustments which are used in a Gtk.Gtk.Scrollbar.T, the effective range of allowed values goes from adjustment->lower to adjustment->upper - adjustment->page_size.

adjustment a T.
value the new value.


:ValueChanged(self @ T) : Std.Object.T

Emits a "value_changed" signal from the T. This is typically called by the owner of the T after it has changed the T value field.

adjustment a T