Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
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.
- newtype Adjustment = Adjustment (ManagedPtr Adjustment)
- class GObject o => IsAdjustment o
- toAdjustment :: IsAdjustment o => o -> IO Adjustment
- noAdjustment :: Maybe Adjustment
- data AdjustmentChangedMethodInfo
- adjustmentChanged :: (HasCallStack, MonadIO m, IsAdjustment a) => a -> m ()
- data AdjustmentClampPageMethodInfo
- adjustmentClampPage :: (HasCallStack, MonadIO m, IsAdjustment a) => a -> Double -> Double -> m ()
- data AdjustmentConfigureMethodInfo
- adjustmentConfigure :: (HasCallStack, MonadIO m, IsAdjustment a) => a -> Double -> Double -> Double -> Double -> Double -> Double -> m ()
- data AdjustmentGetLowerMethodInfo
- adjustmentGetLower :: (HasCallStack, MonadIO m, IsAdjustment a) => a -> m Double
- data AdjustmentGetMinimumIncrementMethodInfo
- adjustmentGetMinimumIncrement :: (HasCallStack, MonadIO m, IsAdjustment a) => a -> m Double
- data AdjustmentGetPageIncrementMethodInfo
- adjustmentGetPageIncrement :: (HasCallStack, MonadIO m, IsAdjustment a) => a -> m Double
- data AdjustmentGetPageSizeMethodInfo
- adjustmentGetPageSize :: (HasCallStack, MonadIO m, IsAdjustment a) => a -> m Double
- data AdjustmentGetStepIncrementMethodInfo
- adjustmentGetStepIncrement :: (HasCallStack, MonadIO m, IsAdjustment a) => a -> m Double
- data AdjustmentGetUpperMethodInfo
- adjustmentGetUpper :: (HasCallStack, MonadIO m, IsAdjustment a) => a -> m Double
- data AdjustmentGetValueMethodInfo
- adjustmentGetValue :: (HasCallStack, MonadIO m, IsAdjustment a) => a -> m Double
- adjustmentNew :: (HasCallStack, MonadIO m) => Double -> Double -> Double -> Double -> Double -> Double -> m Adjustment
- data AdjustmentSetLowerMethodInfo
- adjustmentSetLower :: (HasCallStack, MonadIO m, IsAdjustment a) => a -> Double -> m ()
- data AdjustmentSetPageIncrementMethodInfo
- adjustmentSetPageIncrement :: (HasCallStack, MonadIO m, IsAdjustment a) => a -> Double -> m ()
- data AdjustmentSetPageSizeMethodInfo
- adjustmentSetPageSize :: (HasCallStack, MonadIO m, IsAdjustment a) => a -> Double -> m ()
- data AdjustmentSetStepIncrementMethodInfo
- adjustmentSetStepIncrement :: (HasCallStack, MonadIO m, IsAdjustment a) => a -> Double -> m ()
- data AdjustmentSetUpperMethodInfo
- adjustmentSetUpper :: (HasCallStack, MonadIO m, IsAdjustment a) => a -> Double -> m ()
- data AdjustmentSetValueMethodInfo
- adjustmentSetValue :: (HasCallStack, MonadIO m, IsAdjustment a) => a -> Double -> m ()
- data AdjustmentValueChangedMethodInfo
- adjustmentValueChanged :: (HasCallStack, MonadIO m, IsAdjustment a) => a -> m ()
- data AdjustmentLowerPropertyInfo
- adjustmentLower :: AttrLabelProxy "lower"
- constructAdjustmentLower :: IsAdjustment o => Double -> IO (GValueConstruct o)
- getAdjustmentLower :: (MonadIO m, IsAdjustment o) => o -> m Double
- setAdjustmentLower :: (MonadIO m, IsAdjustment o) => o -> Double -> m ()
- data AdjustmentPageIncrementPropertyInfo
- adjustmentPageIncrement :: AttrLabelProxy "pageIncrement"
- constructAdjustmentPageIncrement :: IsAdjustment o => Double -> IO (GValueConstruct o)
- getAdjustmentPageIncrement :: (MonadIO m, IsAdjustment o) => o -> m Double
- setAdjustmentPageIncrement :: (MonadIO m, IsAdjustment o) => o -> Double -> m ()
- data AdjustmentPageSizePropertyInfo
- adjustmentPageSize :: AttrLabelProxy "pageSize"
- constructAdjustmentPageSize :: IsAdjustment o => Double -> IO (GValueConstruct o)
- getAdjustmentPageSize :: (MonadIO m, IsAdjustment o) => o -> m Double
- setAdjustmentPageSize :: (MonadIO m, IsAdjustment o) => o -> Double -> m ()
- data AdjustmentStepIncrementPropertyInfo
- adjustmentStepIncrement :: AttrLabelProxy "stepIncrement"
- constructAdjustmentStepIncrement :: IsAdjustment o => Double -> IO (GValueConstruct o)
- getAdjustmentStepIncrement :: (MonadIO m, IsAdjustment o) => o -> m Double
- setAdjustmentStepIncrement :: (MonadIO m, IsAdjustment o) => o -> Double -> m ()
- data AdjustmentUpperPropertyInfo
- adjustmentUpper :: AttrLabelProxy "upper"
- constructAdjustmentUpper :: IsAdjustment o => Double -> IO (GValueConstruct o)
- getAdjustmentUpper :: (MonadIO m, IsAdjustment o) => o -> m Double
- setAdjustmentUpper :: (MonadIO m, IsAdjustment o) => o -> Double -> m ()
- data AdjustmentValuePropertyInfo
- adjustmentValue :: AttrLabelProxy "value"
- constructAdjustmentValue :: IsAdjustment o => Double -> IO (GValueConstruct o)
- getAdjustmentValue :: (MonadIO m, IsAdjustment o) => o -> m Double
- setAdjustmentValue :: (MonadIO m, IsAdjustment o) => o -> Double -> m ()
- type AdjustmentChangedCallback = IO ()
- data AdjustmentChangedSignalInfo
- type C_AdjustmentChangedCallback = Ptr () -> Ptr () -> IO ()
- afterAdjustmentChanged :: (GObject a, MonadIO m) => a -> AdjustmentChangedCallback -> m SignalHandlerId
- genClosure_AdjustmentChanged :: AdjustmentChangedCallback -> IO Closure
- mk_AdjustmentChangedCallback :: C_AdjustmentChangedCallback -> IO (FunPtr C_AdjustmentChangedCallback)
- noAdjustmentChangedCallback :: Maybe AdjustmentChangedCallback
- onAdjustmentChanged :: (GObject a, MonadIO m) => a -> AdjustmentChangedCallback -> m SignalHandlerId
- wrap_AdjustmentChangedCallback :: AdjustmentChangedCallback -> Ptr () -> Ptr () -> IO ()
- type AdjustmentValueChangedCallback = IO ()
- data AdjustmentValueChangedSignalInfo
- type C_AdjustmentValueChangedCallback = Ptr () -> Ptr () -> IO ()
- afterAdjustmentValueChanged :: (GObject a, MonadIO m) => a -> AdjustmentValueChangedCallback -> m SignalHandlerId
- genClosure_AdjustmentValueChanged :: AdjustmentValueChangedCallback -> IO Closure
- mk_AdjustmentValueChangedCallback :: C_AdjustmentValueChangedCallback -> IO (FunPtr C_AdjustmentValueChangedCallback)
- noAdjustmentValueChangedCallback :: Maybe AdjustmentValueChangedCallback
- onAdjustmentValueChanged :: (GObject a, MonadIO m) => a -> AdjustmentValueChangedCallback -> m SignalHandlerId
- wrap_AdjustmentValueChangedCallback :: AdjustmentValueChangedCallback -> Ptr () -> Ptr () -> IO ()
Exported types
newtype Adjustment Source #
GObject Adjustment Source # | |
IsObject Adjustment Source # | |
IsAdjustment Adjustment Source # | |
((~) * info (ResolveAdjustmentMethod t Adjustment), MethodInfo * info Adjustment p) => IsLabel t (Adjustment -> p) Source # | |
((~) * info (ResolveAdjustmentMethod t Adjustment), MethodInfo * info Adjustment p) => IsLabelProxy t (Adjustment -> p) Source # | |
HasAttributeList * Adjustment Source # | |
type AttributeList Adjustment Source # | |
type SignalList Adjustment Source # | |
class GObject o => IsAdjustment o Source #
toAdjustment :: IsAdjustment o => o -> IO Adjustment Source #
Methods
changed
data AdjustmentChangedMethodInfo Source #
((~) * signature (m ()), MonadIO m, IsAdjustment a) => MethodInfo * AdjustmentChangedMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAdjustment a) | |
=> a |
|
-> 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
data AdjustmentClampPageMethodInfo Source #
((~) * signature (Double -> Double -> m ()), MonadIO m, IsAdjustment a) => MethodInfo * AdjustmentClampPageMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAdjustment a) | |
=> a |
|
-> Double |
|
-> Double |
|
-> 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
data AdjustmentConfigureMethodInfo Source #
((~) * signature (Double -> Double -> Double -> Double -> Double -> Double -> m ()), MonadIO m, IsAdjustment a) => MethodInfo * AdjustmentConfigureMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAdjustment a) | |
=> a |
|
-> Double |
|
-> Double |
|
-> Double |
|
-> Double |
|
-> Double |
|
-> Double |
|
-> 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
data AdjustmentGetLowerMethodInfo Source #
((~) * signature (m Double), MonadIO m, IsAdjustment a) => MethodInfo * AdjustmentGetLowerMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAdjustment a) | |
=> a |
|
-> m Double | Returns: The current minimum value of the adjustment |
Retrieves the minimum value of the adjustment.
Since: 2.14
getMinimumIncrement
data AdjustmentGetMinimumIncrementMethodInfo Source #
((~) * signature (m Double), MonadIO m, IsAdjustment a) => MethodInfo * AdjustmentGetMinimumIncrementMethodInfo a signature Source # | |
adjustmentGetMinimumIncrement Source #
:: (HasCallStack, MonadIO m, IsAdjustment a) | |
=> a |
|
-> m Double | Returns: the minimum increment of |
Gets the smaller of step increment and page increment.
Since: 3.2
getPageIncrement
data AdjustmentGetPageIncrementMethodInfo Source #
((~) * signature (m Double), MonadIO m, IsAdjustment a) => MethodInfo * AdjustmentGetPageIncrementMethodInfo a signature Source # | |
adjustmentGetPageIncrement Source #
:: (HasCallStack, MonadIO m, IsAdjustment a) | |
=> a |
|
-> m Double | Returns: The current page increment of the adjustment |
Retrieves the page increment of the adjustment.
Since: 2.14
getPageSize
data AdjustmentGetPageSizeMethodInfo Source #
((~) * signature (m Double), MonadIO m, IsAdjustment a) => MethodInfo * AdjustmentGetPageSizeMethodInfo a signature Source # | |
adjustmentGetPageSize Source #
:: (HasCallStack, MonadIO m, IsAdjustment a) | |
=> a |
|
-> m Double | Returns: The current page size of the adjustment |
Retrieves the page size of the adjustment.
Since: 2.14
getStepIncrement
data AdjustmentGetStepIncrementMethodInfo Source #
((~) * signature (m Double), MonadIO m, IsAdjustment a) => MethodInfo * AdjustmentGetStepIncrementMethodInfo a signature Source # | |
adjustmentGetStepIncrement Source #
:: (HasCallStack, MonadIO m, IsAdjustment a) | |
=> a |
|
-> m Double | Returns: The current step increment of the adjustment. |
Retrieves the step increment of the adjustment.
Since: 2.14
getUpper
data AdjustmentGetUpperMethodInfo Source #
((~) * signature (m Double), MonadIO m, IsAdjustment a) => MethodInfo * AdjustmentGetUpperMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAdjustment a) | |
=> a |
|
-> m Double | Returns: The current maximum value of the adjustment |
Retrieves the maximum value of the adjustment.
Since: 2.14
getValue
data AdjustmentGetValueMethodInfo Source #
((~) * signature (m Double), MonadIO m, IsAdjustment a) => MethodInfo * AdjustmentGetValueMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAdjustment a) | |
=> a |
|
-> m Double | Returns: The current value of the adjustment |
Gets the current value of the adjustment.
See adjustmentSetValue
.
new
:: (HasCallStack, MonadIO m) | |
=> Double |
|
-> Double |
|
-> Double |
|
-> Double |
|
-> Double |
|
-> Double |
|
-> m Adjustment | Returns: a new |
Creates a new Adjustment
.
setLower
data AdjustmentSetLowerMethodInfo Source #
((~) * signature (Double -> m ()), MonadIO m, IsAdjustment a) => MethodInfo * AdjustmentSetLowerMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAdjustment a) | |
=> a |
|
-> Double |
|
-> 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
data AdjustmentSetPageIncrementMethodInfo Source #
((~) * signature (Double -> m ()), MonadIO m, IsAdjustment a) => MethodInfo * AdjustmentSetPageIncrementMethodInfo a signature Source # | |
adjustmentSetPageIncrement Source #
:: (HasCallStack, MonadIO m, IsAdjustment a) | |
=> a |
|
-> Double |
|
-> 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
data AdjustmentSetPageSizeMethodInfo Source #
((~) * signature (Double -> m ()), MonadIO m, IsAdjustment a) => MethodInfo * AdjustmentSetPageSizeMethodInfo a signature Source # | |
adjustmentSetPageSize Source #
:: (HasCallStack, MonadIO m, IsAdjustment a) | |
=> a |
|
-> Double |
|
-> 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
data AdjustmentSetStepIncrementMethodInfo Source #
((~) * signature (Double -> m ()), MonadIO m, IsAdjustment a) => MethodInfo * AdjustmentSetStepIncrementMethodInfo a signature Source # | |
adjustmentSetStepIncrement Source #
:: (HasCallStack, MonadIO m, IsAdjustment a) | |
=> a |
|
-> Double |
|
-> 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
data AdjustmentSetUpperMethodInfo Source #
((~) * signature (Double -> m ()), MonadIO m, IsAdjustment a) => MethodInfo * AdjustmentSetUpperMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAdjustment a) | |
=> a |
|
-> Double |
|
-> 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
data AdjustmentSetValueMethodInfo Source #
((~) * signature (Double -> m ()), MonadIO m, IsAdjustment a) => MethodInfo * AdjustmentSetValueMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAdjustment a) | |
=> a |
|
-> Double |
|
-> 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
data AdjustmentValueChangedMethodInfo Source #
((~) * signature (m ()), MonadIO m, IsAdjustment a) => MethodInfo * AdjustmentValueChangedMethodInfo a signature Source # | |
adjustmentValueChanged Source #
:: (HasCallStack, MonadIO m, IsAdjustment a) | |
=> a |
|
-> 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 #
adjustmentLower :: AttrLabelProxy "lower" Source #
constructAdjustmentLower :: IsAdjustment o => Double -> IO (GValueConstruct o) Source #
getAdjustmentLower :: (MonadIO m, IsAdjustment o) => o -> m Double Source #
setAdjustmentLower :: (MonadIO m, IsAdjustment o) => o -> Double -> m () Source #
pageIncrement
data AdjustmentPageIncrementPropertyInfo Source #
adjustmentPageIncrement :: AttrLabelProxy "pageIncrement" Source #
constructAdjustmentPageIncrement :: IsAdjustment o => Double -> IO (GValueConstruct o) Source #
getAdjustmentPageIncrement :: (MonadIO m, IsAdjustment o) => o -> m Double Source #
setAdjustmentPageIncrement :: (MonadIO m, IsAdjustment o) => o -> Double -> m () Source #
pageSize
data AdjustmentPageSizePropertyInfo Source #
adjustmentPageSize :: AttrLabelProxy "pageSize" Source #
constructAdjustmentPageSize :: IsAdjustment o => Double -> IO (GValueConstruct o) Source #
getAdjustmentPageSize :: (MonadIO m, IsAdjustment o) => o -> m Double Source #
setAdjustmentPageSize :: (MonadIO m, IsAdjustment o) => o -> Double -> m () Source #
stepIncrement
data AdjustmentStepIncrementPropertyInfo Source #
adjustmentStepIncrement :: AttrLabelProxy "stepIncrement" Source #
constructAdjustmentStepIncrement :: IsAdjustment o => Double -> IO (GValueConstruct o) Source #
getAdjustmentStepIncrement :: (MonadIO m, IsAdjustment o) => o -> m Double Source #
setAdjustmentStepIncrement :: (MonadIO m, IsAdjustment o) => o -> Double -> m () Source #
upper
data AdjustmentUpperPropertyInfo Source #
adjustmentUpper :: AttrLabelProxy "upper" Source #
constructAdjustmentUpper :: IsAdjustment o => Double -> IO (GValueConstruct o) Source #
getAdjustmentUpper :: (MonadIO m, IsAdjustment o) => o -> m Double Source #
setAdjustmentUpper :: (MonadIO m, IsAdjustment o) => o -> Double -> m () Source #
value
data AdjustmentValuePropertyInfo Source #
adjustmentValue :: AttrLabelProxy "value" Source #
constructAdjustmentValue :: IsAdjustment o => Double -> IO (GValueConstruct o) Source #
getAdjustmentValue :: (MonadIO m, IsAdjustment o) => o -> m Double Source #
setAdjustmentValue :: (MonadIO m, IsAdjustment o) => o -> Double -> m () Source #
Signals
changed
type AdjustmentChangedCallback = IO () Source #
afterAdjustmentChanged :: (GObject a, MonadIO m) => a -> AdjustmentChangedCallback -> m SignalHandlerId Source #
mk_AdjustmentChangedCallback :: C_AdjustmentChangedCallback -> IO (FunPtr C_AdjustmentChangedCallback) Source #
onAdjustmentChanged :: (GObject a, MonadIO m) => a -> AdjustmentChangedCallback -> m SignalHandlerId Source #
wrap_AdjustmentChangedCallback :: AdjustmentChangedCallback -> Ptr () -> Ptr () -> IO () Source #
valueChanged
type AdjustmentValueChangedCallback = IO () Source #
afterAdjustmentValueChanged :: (GObject a, MonadIO m) => a -> AdjustmentValueChangedCallback -> m SignalHandlerId Source #
mk_AdjustmentValueChangedCallback :: C_AdjustmentValueChangedCallback -> IO (FunPtr C_AdjustmentValueChangedCallback) Source #
onAdjustmentValueChanged :: (GObject a, MonadIO m) => a -> AdjustmentValueChangedCallback -> m SignalHandlerId Source #
wrap_AdjustmentValueChangedCallback :: AdjustmentValueChangedCallback -> Ptr () -> Ptr () -> IO () Source #