Adjustment

The #GtkAdjustment 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 #GtkSpinButton, #GtkViewport, and #GtkRange (which is a base class for #GtkScrollbar and #GtkScale).

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

Constructors

this
this(void* ptr, Flag!"Take" take)
this
this(double value, double lower, double upper, double stepIncrement, double pageIncrement, double pageSize)

Creates a new #GtkAdjustment.

Members

Functions

changed
void changed()

Emits a #GtkAdjustment::changed signal from the #GtkAdjustment. This is typically called by the owner of the #GtkAdjustment after it has changed any of the #GtkAdjustment properties other than the value.

clampPage
void clampPage(double lower, double upper)

Updates the #GtkAdjustment:value property to ensure that the range between lower and upper is in the current page (i.e. between #GtkAdjustment:value and #GtkAdjustment:value + #GtkAdjustment:page-size). If the range is larger than the page size, then only the start of it will be in the current page.

configure
void configure(double value, double lower, double upper, double stepIncrement, double pageIncrement, double pageSize)

Sets all properties of the adjustment at once.

connectChanged
gulong connectChanged(T callback, Flag!"After" after)

Connect to Changed signal.

connectValueChanged
gulong connectValueChanged(T callback, Flag!"After" after)

Connect to ValueChanged signal.

getLower
double getLower()

Retrieves the minimum value of the adjustment.

getMinimumIncrement
double getMinimumIncrement()

Gets the smaller of step increment and page increment.

getPageIncrement
double getPageIncrement()

Retrieves the page increment of the adjustment.

getPageSize
double getPageSize()

Retrieves the page size of the adjustment.

getStepIncrement
double getStepIncrement()

Retrieves the step increment of the adjustment.

getUpper
double getUpper()

Retrieves the maximum value of the adjustment.

getValue
double getValue()

Gets the current value of the adjustment. See gtk.adjustment.Adjustment.setValue.

self
Adjustment self()

Returns this, for use in with statements.

setLower
void setLower(double lower)

Sets the minimum value of the adjustment.

setPageIncrement
void setPageIncrement(double pageIncrement)

Sets the page increment of the adjustment.

setPageSize
void setPageSize(double pageSize)

Sets the page size of the adjustment.

setStepIncrement
void setStepIncrement(double stepIncrement)

Sets the step increment of the adjustment.

setUpper
void setUpper(double upper)

Sets the maximum value of the adjustment.

setValue
void setValue(double value)

Sets the #GtkAdjustment value. The value is clamped to lie between #GtkAdjustment:lower and #GtkAdjustment:upper.

valueChanged
void valueChanged()

Emits a #GtkAdjustment::value-changed signal from the #GtkAdjustment. This is typically called by the owner of the #GtkAdjustment after it has changed the #GtkAdjustment:value property.

Properties

_gType
GType _gType [@property getter]
lower
double lower [@property getter]

Get lower property.

lower
double lower [@property setter]

Set lower property.

pageIncrement
double pageIncrement [@property getter]

Get pageIncrement property.

pageIncrement
double pageIncrement [@property setter]

Set pageIncrement property.

pageSize
double pageSize [@property getter]

Get pageSize property.

pageSize
double pageSize [@property setter]

Set pageSize property.

stepIncrement
double stepIncrement [@property getter]

Get stepIncrement property.

stepIncrement
double stepIncrement [@property setter]

Set stepIncrement property.

upper
double upper [@property getter]

Get upper property.

upper
double upper [@property setter]

Set upper property.

value
double value [@property getter]

Get value property.

value
double value [@property setter]

Set value property.

Static functions

_getGType
GType _getGType()
builder
AdjustmentGidBuilder builder()

Get builder for gtk.adjustment.Adjustment

Inherited Members

From InitiallyUnowned

_getGType
GType _getGType()
_gType
GType _gType [@property getter]
self
InitiallyUnowned self()

Returns this, for use in with statements.

builder
InitiallyUnownedGidBuilder builder()

Get builder for gobject.initially_unowned.InitiallyUnowned