adw.spin_row

Module for [SpinRow] class

Types 3

An adw.action_row.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 adw.action_row.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 _getGType() static nothrow
GType _gType() @property nothrow
SpinRow self() nothrowReturns `this`, for use in `with` statements.
SpinRowGidBuilder builder() static nothrowGet builder for [adw.spin_row.SpinRow] Returns: New builder object
gtk.adjustment.Adjustment adjustment() @property nothrowGet `adjustment` property. Returns: The adjustment that holds the value of the spin row.
void adjustment(gtk.adjustment.Adjustment propval) @property nothrowSet `adjustment` property. Params: propval = The adjustment that holds the value of the spin row.
double climbRate() @property nothrowGet `climbRate` property. Returns: The acceleration rate when you hold down a button or key.
void climbRate(double propval) @property nothrowSet `climbRate` property. Params: propval = The acceleration rate when you hold down a button or key.
uint digits() @property nothrowGet `digits` property. Returns: The number of decimal places to display.
void digits(uint propval) @property nothrowSet `digits` property. Params: propval = The number of decimal places to display.
bool numeric() @property nothrowGet `numeric` property. Returns: Whether non-numeric characters should be ignored.
void numeric(bool propval) @property nothrowSet `numeric` property. Params: propval = Whether non-numeric characters should be ignored.
bool snapToTicks() @property nothrowGet `snapToTicks` property. Returns: Whether invalid values are snapped to the nearest step increment.
void snapToTicks(bool propval) @property nothrowSet `snapToTicks` property. Params: propval = Whether invalid values are snapped to the nearest step increment.
gtk.types.SpinButtonUpdatePolicy updatePolicy() @property nothrowGet `updatePolicy` property. Returns: The policy for updating the spin row.
void updatePolicy(gtk.types.SpinButtonUpdatePolicy propval) @property nothrowSet `updatePolicy` property. Params: propval = The policy for updating the spin row.
double value() @property nothrowGet `value` property. Returns: The current value.
void value(double propval) @property nothrowSet `value` property. Params: propval = The current value.
bool wrap() @property nothrowGet `wrap` property. Returns: Whether the spin row should wrap upon reaching its limits.
void wrap(bool propval) @property nothrowSet `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) static nothrowCreates a new [adw.spin_row.SpinRow] with the given properties.
void configure(gtk.adjustment.Adjustment adjustment, double climbRate, uint digits) nothrowChanges the properties of an existing spin row.
gtk.adjustment.Adjustment getAdjustment() nothrowGets the adjustment that holds the value for the spin row. Returns: the adjustment that holds the spin row's value
double getClimbRate() nothrowGets 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() nothrowGets the number of decimal places to display. Returns: the number of decimal places to display
bool getNumeric() nothrowGets whether non-numeric characters should be ignored. Returns: whether non-numeric characters should be ignored.
bool getSnapToTicks() nothrowGets whether invalid values are snapped to nearest step increment. Returns: whether invalid values are snapped to the nearest step increment
gtk.types.SpinButtonUpdatePolicy getUpdatePolicy() nothrowGets the policy for updating the spin row. Returns: the policy for updating the spin row
double getValue() nothrowGets the current value. Returns: the current value
bool getWrap() nothrowGets 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) nothrowSets the adjustment that holds the value for the spin row.
void setClimbRate(double climbRate) nothrowSets the acceleration rate when you hold down a button or key.
void setDigits(uint digits) nothrowSets the number of decimal places to display.
void setNumeric(bool numeric) nothrowSets whether non-numeric characters should be ignored.
void setRange(double min, double max) nothrowSets the minimum and maximum allowable values for self.
void setSnapToTicks(bool snapToTicks) nothrowSets whether invalid values are snapped to the nearest step increment.
void setUpdatePolicy(gtk.types.SpinButtonUpdatePolicy policy) nothrowSets the policy for updating the spin row.
void setValue(double value) nothrowSets the current value.
void setWrap(bool wrap) nothrowSets whether the spin row should wrap upon reaching its limits.
void update() nothrowManually 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) nothrowConnect 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) nothrowConnect 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) nothrowConnect 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].

Fluent builder implementation template for adw.spin_row.SpinRow

Methods
T adjustment(gtk.adjustment.Adjustment propval) nothrowSet `adjustment` property. Params: propval = The adjustment that holds the value of the spin row. Returns: Builder instance for fluent chaining
T climbRate(double propval) nothrowSet `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) nothrowSet `digits` property. Params: propval = The number of decimal places to display. Returns: Builder instance for fluent chaining
T numeric(bool propval) nothrowSet `numeric` property. Params: propval = Whether non-numeric characters should be ignored. Returns: Builder instance for fluent chaining
T snapToTicks(bool propval) nothrowSet `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) nothrowSet `updatePolicy` property. Params: propval = The policy for updating the spin row.
T value(double propval) nothrowSet `value` property. Params: propval = The current value. Returns: Builder instance for fluent chaining
T wrap(bool propval) nothrowSet `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
SpinRow build() nothrowCreate object from builder. Returns: New object