gi-adwaita-1.0.7: Adwaita bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Adw.Objects.SpinRow

Description

An [classactionRow] with an embedded spin button.

<picture> <source srcset="spin-row-dark.png" media="(prefers-color-scheme: dark)"> <img src="spin-row.png" alt="spin-row"> </picture>

Example of an AdwSpinRow UI definition:

xml code

<object class="AdwSpinRow">
  <property name="title" translatable="yes">Spin Row</property>
  <property name="adjustment">
    <object class="GtkAdjustment">
      <property name="lower">0</property>
      <property name="upper">100</property>
      <property name="value">50</property>
      <property name="page-increment">10</property>
      <property name="step-increment">1</property>
    </object>
  </property>
</object>

See SpinButton for details.

CSS nodes

AdwSpinRow has the same structure as [classactionRow], as well as the .spin style class on the main node.

Since: 1.4

Synopsis

Exported types

newtype SpinRow Source #

Memory-managed wrapper type.

Constructors

SpinRow (ManagedPtr SpinRow) 

Instances

Instances details
Eq SpinRow Source # 
Instance details

Defined in GI.Adw.Objects.SpinRow

Methods

(==) :: SpinRow -> SpinRow -> Bool #

(/=) :: SpinRow -> SpinRow -> Bool #

GObject SpinRow Source # 
Instance details

Defined in GI.Adw.Objects.SpinRow

ManagedPtrNewtype SpinRow Source # 
Instance details

Defined in GI.Adw.Objects.SpinRow

Methods

toManagedPtr :: SpinRow -> ManagedPtr SpinRow

TypedObject SpinRow Source # 
Instance details

Defined in GI.Adw.Objects.SpinRow

Methods

glibType :: IO GType

HasParentTypes SpinRow Source # 
Instance details

Defined in GI.Adw.Objects.SpinRow

IsGValue (Maybe SpinRow) Source #

Convert SpinRow to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Adw.Objects.SpinRow

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe SpinRow -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe SpinRow)

type ParentTypes SpinRow Source # 
Instance details

Defined in GI.Adw.Objects.SpinRow

type ParentTypes SpinRow = '[ActionRow, PreferencesRow, ListBoxRow, Widget, Object, Accessible, Actionable, Buildable, ConstraintTarget, Editable]

class (GObject o, IsDescendantOf SpinRow o) => IsSpinRow o Source #

Type class for types which can be safely cast to SpinRow, for instance with toSpinRow.

Instances

Instances details
(GObject o, IsDescendantOf SpinRow o) => IsSpinRow o Source # 
Instance details

Defined in GI.Adw.Objects.SpinRow

toSpinRow :: (MonadIO m, IsSpinRow o) => o -> m SpinRow Source #

Cast to SpinRow, for types for which this is known to be safe. For general casts, use castTo.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addPrefix, addSuffix, addTickCallback, allocate, announce, bindProperty, bindPropertyFull, changed, childFocus, computeBounds, computeExpand, computePoint, computeTransform, configure, contains, createPangoContext, createPangoLayout, delegateGetAccessiblePlatformState, deleteSelection, deleteText, disposeTemplate, dragCheckThreshold, errorBell, finishDelegate, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initDelegate, initTemplate, insertActionGroup, insertAfter, insertBefore, insertText, isAncestor, isDrawable, isFloating, isFocus, isSelected, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, remove, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, selectRegion, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, update, updateNextAccessibleSibling, updateProperty, updateRelation, updateState, watchClosure.

Getters

getAccessibleParent, getAccessibleRole, getActionName, getActionTargetValue, getActivatable, getActivatableWidget, getAdjustment, getAlignment, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBaseline, getBounds, getBuildableId, getCanFocus, getCanTarget, getChars, getChild, getChildVisible, getClimbRate, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDelegate, getDigits, getDirection, getDisplay, getEditable, getEnableUndo, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeader, getHeight, getHexpand, getHexpandSet, getIconName, getIndex, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getMaxWidthChars, getName, getNative, getNextAccessibleSibling, getNextSibling, getNumeric, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPosition, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSelectable, getSelectionBounds, getSensitive, getSettings, getSize, getSizeRequest, getSnapToTicks, getStateFlags, getStyleContext, getSubtitle, getSubtitleLines, getSubtitleSelectable, getTemplateChild, getText, getTitle, getTitleLines, getTitleSelectable, getTooltipMarkup, getTooltipText, getUpdatePolicy, getUseMarkup, getUseUnderline, getValign, getValue, getVexpand, getVexpandSet, getVisible, getWidth, getWidthChars, getWrap.

Setters

setAccessibleParent, setActionName, setActionTargetValue, setActivatable, setActivatableWidget, setAdjustment, setAlignment, setCanFocus, setCanTarget, setChild, setChildVisible, setClimbRate, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDetailedActionName, setDigits, setDirection, setEditable, setEnableUndo, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHeader, setHexpand, setHexpandSet, setIconName, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setMaxWidthChars, setName, setNumeric, setOpacity, setOverflow, setParent, setPosition, setProperty, setRange, setReceivesDefault, setSelectable, setSensitive, setSizeRequest, setSnapToTicks, setStateFlags, setSubtitle, setSubtitleLines, setSubtitleSelectable, setText, setTitle, setTitleLines, setTitleSelectable, setTooltipMarkup, setTooltipText, setUpdatePolicy, setUseMarkup, setUseUnderline, setValign, setValue, setVexpand, setVexpandSet, setVisible, setWidthChars, setWrap.

configure

spinRowConfigure Source #

Arguments

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

self: a spin row

-> Maybe b

adjustment: the adjustment that this spin row should use

-> Double

climbRate: the new climb rate

-> Word32

digits: the number of decimal places to display

-> m () 

Changes the properties of an existing spin row.

The adjustment, climb rate, and number of decimal places are updated accordingly.

Since: 1.4

getAdjustment

spinRowGetAdjustment Source #

Arguments

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

self: a spin row

-> m Adjustment

Returns: the adjustment that holds the spin row's value

Gets the adjustment that holds the value for the spin row.

Since: 1.4

getClimbRate

spinRowGetClimbRate Source #

Arguments

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

self: a spin row

-> m Double

Returns: the acceleration rate when you hold down a button or key

Gets the acceleration rate when you hold down a button or key.

Since: 1.4

getDigits

spinRowGetDigits Source #

Arguments

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

self: a spin row

-> m Word32

Returns: the number of decimal places to display

Gets the number of decimal places to display.

Since: 1.4

getNumeric

spinRowGetNumeric Source #

Arguments

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

self: a spin row

-> m Bool

Returns: whether non-numeric characters should be ignored.

Gets whether non-numeric characters should be ignored.

Since: 1.4

getSnapToTicks

spinRowGetSnapToTicks Source #

Arguments

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

self: a spin row

-> m Bool

Returns: whether invalid values are snapped to the nearest step increment

Gets whether invalid values are snapped to nearest step increment.

Since: 1.4

getUpdatePolicy

spinRowGetUpdatePolicy Source #

Arguments

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

self: a spin row

-> m SpinButtonUpdatePolicy

Returns: the policy for updating the spin row

Gets the policy for updating the spin row.

Since: 1.4

getValue

spinRowGetValue Source #

Arguments

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

self: a spin row

-> m Double

Returns: the current value

Gets the current value.

Since: 1.4

getWrap

spinRowGetWrap Source #

Arguments

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

self: a spin row

-> m Bool

Returns: whether the spin row should wrap upon reaching its limits

Gets whether the spin row should wrap upon reaching its limits.

Since: 1.4

new

spinRowNew Source #

Arguments

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

adjustment: the adjustment that this spin row should use

-> Double

climbRate: the rate the value changes when holding a button or key

-> Word32

digits: the number of decimal places to display

-> m SpinRow

Returns: the newly created AdwSpinRow

Creates a new AdwSpinRow.

Since: 1.4

newWithRange

spinRowNewWithRange Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Double

min: minimum allowable value

-> Double

max: maximum allowable value

-> Double

step: increment added or subtracted by spinning the widget

-> m SpinRow

Returns: the new AdwSpinRow

Creates a new AdwSpinRow with the given properties.

This is a convenience constructor that allows creation of a numeric AdwSpinRow without manually creating an adjustment. The value is initially set to the minimum value and a page increment of 10 * step is the default. The precision of the spin row is equivalent to the precisions of step.

::: note The way in which the precision is derived works best if step is a power of ten. If the resulting precision is not suitable for your needs, use [methodspinRow.set_digits] to correct it.

Since: 1.4

setAdjustment

spinRowSetAdjustment Source #

Arguments

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

self: a spin row

-> Maybe b

adjustment: an adjustment

-> m () 

Sets the adjustment that holds the value for the spin row.

Since: 1.4

setClimbRate

spinRowSetClimbRate Source #

Arguments

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

self: a spin row

-> Double

climbRate: the acceleration rate when you hold down a button or key

-> m () 

Sets the acceleration rate when you hold down a button or key.

Since: 1.4

setDigits

spinRowSetDigits Source #

Arguments

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

self: a spin row

-> Word32

digits: the number of decimal places to display

-> m () 

Sets the number of decimal places to display.

Since: 1.4

setNumeric

spinRowSetNumeric Source #

Arguments

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

self: a spin row

-> Bool

numeric: whether non-numeric characters should be ignored

-> m () 

Sets whether non-numeric characters should be ignored.

Since: 1.4

setRange

spinRowSetRange Source #

Arguments

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

self: a spin row

-> Double

min: minimum allowable value

-> Double

max: maximum allowable value

-> m () 

Sets the minimum and maximum allowable values for self.

If the current value is outside this range, it will be adjusted to fit within the range, otherwise it will remain unchanged.

Since: 1.4

setSnapToTicks

spinRowSetSnapToTicks Source #

Arguments

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

self: a spin row

-> Bool

snapToTicks: whether invalid values are snapped to the nearest step increment

-> m () 

Sets whether invalid values are snapped to the nearest step increment.

Since: 1.4

setUpdatePolicy

spinRowSetUpdatePolicy Source #

Arguments

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

self: a spin row

-> SpinButtonUpdatePolicy

policy: the policy for updating the spin row

-> m () 

Sets the policy for updating the spin row.

The options are always, or only when the value is invalid.

Since: 1.4

setValue

spinRowSetValue Source #

Arguments

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

self: a spin row

-> Double

value: a new value

-> m () 

Sets the current value.

Since: 1.4

setWrap

spinRowSetWrap Source #

Arguments

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

self: a spin row

-> Bool

wrap: whether the spin row should wrap upon reaching its limits

-> m () 

Sets whether the spin row should wrap upon reaching its limits.

Since: 1.4

update

spinRowUpdate Source #

Arguments

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

self: a spin row

-> m () 

Manually force an update of the spin row.

Since: 1.4

Properties

adjustment

The adjustment that holds the value of the spin row.

Since: 1.4

clearSpinRowAdjustment :: (MonadIO m, IsSpinRow o) => o -> m () Source #

Set the value of the “adjustment” property to Nothing. When overloading is enabled, this is equivalent to

clear #adjustment

constructSpinRowAdjustment :: (IsSpinRow o, MonadIO m, IsAdjustment a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “adjustment” property. This is rarely needed directly, but it is used by new.

getSpinRowAdjustment :: (MonadIO m, IsSpinRow o) => o -> m Adjustment Source #

Get the value of the “adjustment” property. When overloading is enabled, this is equivalent to

get spinRow #adjustment

setSpinRowAdjustment :: (MonadIO m, IsSpinRow o, IsAdjustment a) => o -> a -> m () Source #

Set the value of the “adjustment” property. When overloading is enabled, this is equivalent to

set spinRow [ #adjustment := value ]

climbRate

The acceleration rate when you hold down a button or key.

Since: 1.4

constructSpinRowClimbRate :: (IsSpinRow o, MonadIO m) => Double -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “climb-rate” property. This is rarely needed directly, but it is used by new.

getSpinRowClimbRate :: (MonadIO m, IsSpinRow o) => o -> m Double Source #

Get the value of the “climb-rate” property. When overloading is enabled, this is equivalent to

get spinRow #climbRate

setSpinRowClimbRate :: (MonadIO m, IsSpinRow o) => o -> Double -> m () Source #

Set the value of the “climb-rate” property. When overloading is enabled, this is equivalent to

set spinRow [ #climbRate := value ]

digits

The number of decimal places to display.

Since: 1.4

constructSpinRowDigits :: (IsSpinRow o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “digits” property. This is rarely needed directly, but it is used by new.

getSpinRowDigits :: (MonadIO m, IsSpinRow o) => o -> m Word32 Source #

Get the value of the “digits” property. When overloading is enabled, this is equivalent to

get spinRow #digits

setSpinRowDigits :: (MonadIO m, IsSpinRow o) => o -> Word32 -> m () Source #

Set the value of the “digits” property. When overloading is enabled, this is equivalent to

set spinRow [ #digits := value ]

numeric

Whether non-numeric characters should be ignored.

Since: 1.4

constructSpinRowNumeric :: (IsSpinRow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “numeric” property. This is rarely needed directly, but it is used by new.

getSpinRowNumeric :: (MonadIO m, IsSpinRow o) => o -> m Bool Source #

Get the value of the “numeric” property. When overloading is enabled, this is equivalent to

get spinRow #numeric

setSpinRowNumeric :: (MonadIO m, IsSpinRow o) => o -> Bool -> m () Source #

Set the value of the “numeric” property. When overloading is enabled, this is equivalent to

set spinRow [ #numeric := value ]

snapToTicks

Whether invalid values are snapped to the nearest step increment.

Since: 1.4

constructSpinRowSnapToTicks :: (IsSpinRow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “snap-to-ticks” property. This is rarely needed directly, but it is used by new.

getSpinRowSnapToTicks :: (MonadIO m, IsSpinRow o) => o -> m Bool Source #

Get the value of the “snap-to-ticks” property. When overloading is enabled, this is equivalent to

get spinRow #snapToTicks

setSpinRowSnapToTicks :: (MonadIO m, IsSpinRow o) => o -> Bool -> m () Source #

Set the value of the “snap-to-ticks” property. When overloading is enabled, this is equivalent to

set spinRow [ #snapToTicks := value ]

updatePolicy

The policy for updating the spin row.

The options are always, or only when the value is invalid.

Since: 1.4

constructSpinRowUpdatePolicy :: (IsSpinRow o, MonadIO m) => SpinButtonUpdatePolicy -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “update-policy” property. This is rarely needed directly, but it is used by new.

getSpinRowUpdatePolicy :: (MonadIO m, IsSpinRow o) => o -> m SpinButtonUpdatePolicy Source #

Get the value of the “update-policy” property. When overloading is enabled, this is equivalent to

get spinRow #updatePolicy

setSpinRowUpdatePolicy :: (MonadIO m, IsSpinRow o) => o -> SpinButtonUpdatePolicy -> m () Source #

Set the value of the “update-policy” property. When overloading is enabled, this is equivalent to

set spinRow [ #updatePolicy := value ]

value

The current value.

Since: 1.4

constructSpinRowValue :: (IsSpinRow o, MonadIO m) => Double -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “value” property. This is rarely needed directly, but it is used by new.

getSpinRowValue :: (MonadIO m, IsSpinRow o) => o -> m Double Source #

Get the value of the “value” property. When overloading is enabled, this is equivalent to

get spinRow #value

setSpinRowValue :: (MonadIO m, IsSpinRow o) => o -> Double -> m () Source #

Set the value of the “value” property. When overloading is enabled, this is equivalent to

set spinRow [ #value := value ]

wrap

Whether the spin row should wrap upon reaching its limits.

Since: 1.4

constructSpinRowWrap :: (IsSpinRow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “wrap” property. This is rarely needed directly, but it is used by new.

getSpinRowWrap :: (MonadIO m, IsSpinRow o) => o -> m Bool Source #

Get the value of the “wrap” property. When overloading is enabled, this is equivalent to

get spinRow #wrap

setSpinRowWrap :: (MonadIO m, IsSpinRow o) => o -> Bool -> m () Source #

Set the value of the “wrap” property. When overloading is enabled, this is equivalent to

set spinRow [ #wrap := value ]

Signals

input

type SpinRowInputCallback Source #

Arguments

 = IO (Int32, Double)

Returns: TRUE for a successful conversion, FALSE if the input was not handled, and GTK_INPUT_ERROR if the conversion failed.

Emitted to convert the user's input into a double value.

The signal handler is expected to use editableGetText to retrieve the text of the spinbutton and set new_value to the new value.

The default conversion uses strtod.

See SpinButton::input.

Since: 1.4

afterSpinRowInput :: (IsSpinRow a, MonadIO m) => a -> ((?self :: a) => SpinRowInputCallback) -> m SignalHandlerId Source #

Connect a signal handler for the input signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after spinRow #input callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onSpinRowInput :: (IsSpinRow a, MonadIO m) => a -> ((?self :: a) => SpinRowInputCallback) -> m SignalHandlerId Source #

Connect a signal handler for the input signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on spinRow #input callback

output

type SpinRowOutputCallback Source #

Arguments

 = IO Bool

Returns: TRUE if the value has been displayed

Emitted to tweak the formatting of the value for display.

See SpinButton::output.

Since: 1.4

afterSpinRowOutput :: (IsSpinRow a, MonadIO m) => a -> ((?self :: a) => SpinRowOutputCallback) -> m SignalHandlerId Source #

Connect a signal handler for the output signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after spinRow #output callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onSpinRowOutput :: (IsSpinRow a, MonadIO m) => a -> ((?self :: a) => SpinRowOutputCallback) -> m SignalHandlerId Source #

Connect a signal handler for the output signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on spinRow #output callback

wrapped

type SpinRowWrappedCallback = IO () Source #

Emitted right after the spinbutton wraps.

See SpinButton::wrapped.

Since: 1.4

afterSpinRowWrapped :: (IsSpinRow a, MonadIO m) => a -> ((?self :: a) => SpinRowWrappedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the wrapped signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after spinRow #wrapped callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

onSpinRowWrapped :: (IsSpinRow a, MonadIO m) => a -> ((?self :: a) => SpinRowWrappedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the wrapped signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on spinRow #wrapped callback