gi-gtk-3.0.11: Gtk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.Adjustment

Contents

Description

The Adjustment 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 SpinButton, Viewport, and Range (which is a base class for Scrollbar and Scale).

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

Synopsis

Exported types

Methods

changed

data AdjustmentChangedMethodInfo Source #

Instances

((~) * signature (m ()), MonadIO m, IsAdjustment a) => MethodInfo * AdjustmentChangedMethodInfo a signature Source # 

adjustmentChanged Source #

Arguments

:: (HasCallStack, MonadIO m, IsAdjustment a) 
=> a

adjustment: a Adjustment

-> m () 

Deprecated: (Since version 3.18)GTK+ emits Adjustment::changed itself whenever any of the properties (other than value) change

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

clampPage

adjustmentClampPage Source #

Arguments

:: (HasCallStack, MonadIO m, IsAdjustment a) 
=> a

adjustment: a Adjustment

-> Double

lower: the lower value

-> Double

upper: the upper value

-> m () 

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

A Adjustment::value-changed signal will be emitted if the value is changed.

configure

adjustmentConfigure Source #

Arguments

:: (HasCallStack, MonadIO m, IsAdjustment a) 
=> a

adjustment: a Adjustment

-> Double

value: the new value

-> Double

lower: the new minimum value

-> Double

upper: the new maximum value

-> Double

stepIncrement: the new step increment

-> Double

pageIncrement: the new page increment

-> Double

pageSize: the new page size

-> m () 

Sets all properties of the adjustment at once.

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

Since: 2.14

getLower

adjustmentGetLower Source #

Arguments

:: (HasCallStack, MonadIO m, IsAdjustment a) 
=> a

adjustment: a Adjustment

-> m Double

Returns: The current minimum value of the adjustment

Retrieves the minimum value of the adjustment.

Since: 2.14

getMinimumIncrement

adjustmentGetMinimumIncrement Source #

Arguments

:: (HasCallStack, MonadIO m, IsAdjustment a) 
=> a

adjustment: a Adjustment

-> m Double

Returns: the minimum increment of adjustment

Gets the smaller of step increment and page increment.

Since: 3.2

getPageIncrement

adjustmentGetPageIncrement Source #

Arguments

:: (HasCallStack, MonadIO m, IsAdjustment a) 
=> a

adjustment: a Adjustment

-> m Double

Returns: The current page increment of the adjustment

Retrieves the page increment of the adjustment.

Since: 2.14

getPageSize

adjustmentGetPageSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsAdjustment a) 
=> a

adjustment: a Adjustment

-> m Double

Returns: The current page size of the adjustment

Retrieves the page size of the adjustment.

Since: 2.14

getStepIncrement

adjustmentGetStepIncrement Source #

Arguments

:: (HasCallStack, MonadIO m, IsAdjustment a) 
=> a

adjustment: a Adjustment

-> m Double

Returns: The current step increment of the adjustment.

Retrieves the step increment of the adjustment.

Since: 2.14

getUpper

adjustmentGetUpper Source #

Arguments

:: (HasCallStack, MonadIO m, IsAdjustment a) 
=> a

adjustment: a Adjustment

-> m Double

Returns: The current maximum value of the adjustment

Retrieves the maximum value of the adjustment.

Since: 2.14

getValue

adjustmentGetValue Source #

Arguments

:: (HasCallStack, MonadIO m, IsAdjustment a) 
=> a

adjustment: a Adjustment

-> m Double

Returns: The current value of the adjustment

Gets the current value of the adjustment. See adjustmentSetValue.

new

adjustmentNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Double

value: the initial value

-> Double

lower: the minimum value

-> Double

upper: the maximum value

-> Double

stepIncrement: the step increment

-> Double

pageIncrement: the page increment

-> Double

pageSize: the page size

-> m Adjustment

Returns: a new Adjustment

Creates a new Adjustment.

setLower

adjustmentSetLower Source #

Arguments

:: (HasCallStack, MonadIO m, IsAdjustment a) 
=> a

adjustment: a Adjustment

-> Double

lower: the new minimum value

-> m () 

Sets the minimum value of the adjustment.

When setting multiple adjustment properties via their individual setters, multiple Adjustment::changed signals will be emitted. However, since the emission of the Adjustment::changed signal is tied to the emission of the Object::notify signals of the changed properties, it’s possible to compress the Adjustment::changed signals into one by calling objectFreezeNotify and objectThawNotify around the calls to the individual setters.

Alternatively, using a single g_object_set() for all the properties to change, or using adjustmentConfigure has the same effect of compressing Adjustment::changed emissions.

Since: 2.14

setPageIncrement

adjustmentSetPageIncrement Source #

Arguments

:: (HasCallStack, MonadIO m, IsAdjustment a) 
=> a

adjustment: a Adjustment

-> Double

pageIncrement: the new page increment

-> m () 

Sets the page increment of the adjustment.

See adjustmentSetLower about how to compress multiple emissions of the Adjustment::changed signal when setting multiple adjustment properties.

Since: 2.14

setPageSize

adjustmentSetPageSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsAdjustment a) 
=> a

adjustment: a Adjustment

-> Double

pageSize: the new page size

-> m () 

Sets the page size of the adjustment.

See adjustmentSetLower about how to compress multiple emissions of the GtkAdjustment::changed signal when setting multiple adjustment properties.

Since: 2.14

setStepIncrement

adjustmentSetStepIncrement Source #

Arguments

:: (HasCallStack, MonadIO m, IsAdjustment a) 
=> a

adjustment: a Adjustment

-> Double

stepIncrement: the new step increment

-> m () 

Sets the step increment of the adjustment.

See adjustmentSetLower about how to compress multiple emissions of the Adjustment::changed signal when setting multiple adjustment properties.

Since: 2.14

setUpper

adjustmentSetUpper Source #

Arguments

:: (HasCallStack, MonadIO m, IsAdjustment a) 
=> a

adjustment: a Adjustment

-> Double

upper: the new maximum value

-> m () 

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 adjustmentSetLower about how to compress multiple emissions of the Adjustment::changed signal when setting multiple adjustment properties.

Since: 2.14

setValue

adjustmentSetValue Source #

Arguments

:: (HasCallStack, MonadIO m, IsAdjustment a) 
=> a

adjustment: a Adjustment

-> Double

value: the new value

-> m () 

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

Note that for adjustments which are used in a Scrollbar, the effective range of allowed values goes from Adjustment:lower to Adjustment:upper - Adjustment:page-size.

valueChanged

adjustmentValueChanged Source #

Arguments

:: (HasCallStack, MonadIO m, IsAdjustment a) 
=> a

adjustment: a Adjustment

-> m () 

Deprecated: (Since version 3.18)GTK+ emits Adjustment::value-changed itself whenever the value changes

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

Properties

lower

data AdjustmentLowerPropertyInfo Source #

Instances

AttrInfo AdjustmentLowerPropertyInfo Source # 
type AttrOrigin AdjustmentLowerPropertyInfo Source # 
type AttrLabel AdjustmentLowerPropertyInfo Source # 
type AttrGetType AdjustmentLowerPropertyInfo Source # 
type AttrBaseTypeConstraint AdjustmentLowerPropertyInfo Source # 
type AttrSetTypeConstraint AdjustmentLowerPropertyInfo Source # 
type AttrAllowedOps AdjustmentLowerPropertyInfo Source # 

pageIncrement

data AdjustmentPageIncrementPropertyInfo Source #

Instances

AttrInfo AdjustmentPageIncrementPropertyInfo Source # 
type AttrOrigin AdjustmentPageIncrementPropertyInfo Source # 
type AttrLabel AdjustmentPageIncrementPropertyInfo Source # 
type AttrGetType AdjustmentPageIncrementPropertyInfo Source # 
type AttrBaseTypeConstraint AdjustmentPageIncrementPropertyInfo Source # 
type AttrSetTypeConstraint AdjustmentPageIncrementPropertyInfo Source # 
type AttrAllowedOps AdjustmentPageIncrementPropertyInfo Source # 

pageSize

data AdjustmentPageSizePropertyInfo Source #

Instances

AttrInfo AdjustmentPageSizePropertyInfo Source # 
type AttrOrigin AdjustmentPageSizePropertyInfo Source # 
type AttrLabel AdjustmentPageSizePropertyInfo Source # 
type AttrGetType AdjustmentPageSizePropertyInfo Source # 
type AttrBaseTypeConstraint AdjustmentPageSizePropertyInfo Source # 
type AttrSetTypeConstraint AdjustmentPageSizePropertyInfo Source # 
type AttrAllowedOps AdjustmentPageSizePropertyInfo Source # 

stepIncrement

data AdjustmentStepIncrementPropertyInfo Source #

Instances

AttrInfo AdjustmentStepIncrementPropertyInfo Source # 
type AttrOrigin AdjustmentStepIncrementPropertyInfo Source # 
type AttrLabel AdjustmentStepIncrementPropertyInfo Source # 
type AttrGetType AdjustmentStepIncrementPropertyInfo Source # 
type AttrBaseTypeConstraint AdjustmentStepIncrementPropertyInfo Source # 
type AttrSetTypeConstraint AdjustmentStepIncrementPropertyInfo Source # 
type AttrAllowedOps AdjustmentStepIncrementPropertyInfo Source # 

upper

data AdjustmentUpperPropertyInfo Source #

Instances

AttrInfo AdjustmentUpperPropertyInfo Source # 
type AttrOrigin AdjustmentUpperPropertyInfo Source # 
type AttrLabel AdjustmentUpperPropertyInfo Source # 
type AttrGetType AdjustmentUpperPropertyInfo Source # 
type AttrBaseTypeConstraint AdjustmentUpperPropertyInfo Source # 
type AttrSetTypeConstraint AdjustmentUpperPropertyInfo Source # 
type AttrAllowedOps AdjustmentUpperPropertyInfo Source # 

value

data AdjustmentValuePropertyInfo Source #

Instances

AttrInfo AdjustmentValuePropertyInfo Source # 
type AttrOrigin AdjustmentValuePropertyInfo Source # 
type AttrLabel AdjustmentValuePropertyInfo Source # 
type AttrGetType AdjustmentValuePropertyInfo Source # 
type AttrBaseTypeConstraint AdjustmentValuePropertyInfo Source # 
type AttrSetTypeConstraint AdjustmentValuePropertyInfo Source # 
type AttrAllowedOps AdjustmentValuePropertyInfo Source # 

Signals

changed

valueChanged