adw.spin_row

Module for [SpinRow] class

Types 3

An class@ActionRow with an embedded spin button.

spin-row

Example of an [adw.spin_row.SpinRow] UI definition:

<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 [gtk.spin_button.SpinButton] for details.

CSS nodes

[adw.spin_row.SpinRow] has the same structure as class@ActionRow, as well as the .spin style class on the main node.

Accessibility

[adw.spin_row.SpinRow] uses an internal [gtk.spin_button.SpinButton] with the [gtk.types.AccessibleRole.SpinButton] role.

Methods
GType _gType() @property
SpinRow self()Returns `this`, for use in `with` statements.
SpinRowGidBuilder builder()Get builder for [adw.spin_row.SpinRow] Returns: New builder object
gtk.adjustment.Adjustment adjustment() @propertyGet `adjustment` property. Returns: The adjustment that holds the value of the spin row.
void adjustment(gtk.adjustment.Adjustment propval) @propertySet `adjustment` property. Params: propval = The adjustment that holds the value of the spin row.
double climbRate() @propertyGet `climbRate` property. Returns: The acceleration rate when you hold down a button or key.
void climbRate(double propval) @propertySet `climbRate` property. Params: propval = The acceleration rate when you hold down a button or key.
uint digits() @propertyGet `digits` property. Returns: The number of decimal places to display.
void digits(uint propval) @propertySet `digits` property. Params: propval = The number of decimal places to display.
bool numeric() @propertyGet `numeric` property. Returns: Whether non-numeric characters should be ignored.
void numeric(bool propval) @propertySet `numeric` property. Params: propval = Whether non-numeric characters should be ignored.
bool snapToTicks() @propertyGet `snapToTicks` property. Returns: Whether invalid values are snapped to the nearest step increment.
void snapToTicks(bool propval) @propertySet `snapToTicks` property. Params: propval = Whether invalid values are snapped to the nearest step increment.
gtk.types.SpinButtonUpdatePolicy updatePolicy() @propertyGet `updatePolicy` property. Returns: The policy for updating the spin row.
void updatePolicy(gtk.types.SpinButtonUpdatePolicy propval) @propertySet `updatePolicy` property. Params: propval = The policy for updating the spin row.
double value() @propertyGet `value` property. Returns: The current value.
void value(double propval) @propertySet `value` property. Params: propval = The current value.
bool wrap() @propertyGet `wrap` property. Returns: Whether the spin row should wrap upon reaching its limits.
void wrap(bool propval) @propertySet `wrap` property. Params: propval = Whether the spin row should wrap upon reaching its limits.
adw.spin_row.SpinRow newWithRange(double min, double max, double step)Creates a new [adw.spin_row.SpinRow] with the given properties.
void configure(gtk.adjustment.Adjustment adjustment, double climbRate, uint digits)Changes the properties of an existing spin row.
gtk.adjustment.Adjustment getAdjustment()Gets the adjustment that holds the value for the spin row. Returns: the adjustment that holds the spin row's value
double getClimbRate()Gets the acceleration rate when you hold down a button or key. Returns: the acceleration rate when you hold down a button or key
uint getDigits()Gets the number of decimal places to display. Returns: the number of decimal places to display
bool getNumeric()Gets whether non-numeric characters should be ignored. Returns: whether non-numeric characters should be ignored.
bool getSnapToTicks()Gets whether invalid values are snapped to nearest step increment. Returns: whether invalid values are snapped to the nearest step increment
gtk.types.SpinButtonUpdatePolicy getUpdatePolicy()Gets the policy for updating the spin row. Returns: the policy for updating the spin row
double getValue()Gets the current value. Returns: the current value
bool getWrap()Gets whether the spin row should wrap upon reaching its limits. Returns: whether the spin row should wrap upon reaching its limits
void setAdjustment(gtk.adjustment.Adjustment adjustment = null)Sets the adjustment that holds the value for the spin row.
void setClimbRate(double climbRate)Sets the acceleration rate when you hold down a button or key.
void setDigits(uint digits)Sets the number of decimal places to display.
void setNumeric(bool numeric)Sets whether non-numeric characters should be ignored.
void setRange(double min, double max)Sets the minimum and maximum allowable values for self.
void setSnapToTicks(bool snapToTicks)Sets whether invalid values are snapped to the nearest step increment.
void setUpdatePolicy(gtk.types.SpinButtonUpdatePolicy policy)Sets the policy for updating the spin row.
void setValue(double value)Sets the current value.
void setWrap(bool wrap)Sets whether the spin row should wrap upon reaching its limits.
void update()Manually force an update of the spin row.
gulong connectInput(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == int) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.out_ && is(Parameters!T[0] == double))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : adw.spin_row.SpinRow))) && Parameters!T.length < 3)Connect to `Input` signal.
gulong connectOutput(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == bool) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : adw.spin_row.SpinRow))) && Parameters!T.length < 2)Connect to `Output` signal.
gulong connectWrapped(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : adw.spin_row.SpinRow))) && Parameters!T.length < 2)Connect to `Wrapped` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this(gtk.adjustment.Adjustment adjustment, double climbRate, uint digits)Creates a new [adw.spin_row.SpinRow].
Methods
T adjustment(gtk.adjustment.Adjustment propval)Set `adjustment` property. Params: propval = The adjustment that holds the value of the spin row. Returns: Builder instance for fluent chaining
T climbRate(double propval)Set `climbRate` property. Params: propval = The acceleration rate when you hold down a button or key. Returns: Builder instance for fluent chaining
T digits(uint propval)Set `digits` property. Params: propval = The number of decimal places to display. Returns: Builder instance for fluent chaining
T numeric(bool propval)Set `numeric` property. Params: propval = Whether non-numeric characters should be ignored. Returns: Builder instance for fluent chaining
T snapToTicks(bool propval)Set `snapToTicks` property. Params: propval = Whether invalid values are snapped to the nearest step increment. Returns: Builder instance for fluent chaining
T updatePolicy(gtk.types.SpinButtonUpdatePolicy propval)Set `updatePolicy` property. Params: propval = The policy for updating the spin row.
T value(double propval)Set `value` property. Params: propval = The current value. Returns: Builder instance for fluent chaining
T wrap(bool propval)Set `wrap` property. Params: propval = Whether the spin row should wrap upon reaching its limits. Returns: Builder instance for fluent chaining

Fluent builder for [adw.spin_row.SpinRow]

Methods