adw.spin_row
Module for [SpinRow] class
Types 3
An adw.action_row.ActionRow with an embedded spin button.
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
SpinRowGidBuilder builder() static nothrowGet builder for [adw.spin_row.SpinRow] Returns: New builder objectgtk.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.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 valuedouble getClimbRate() nothrowGets the acceleration rate when you hold down a button or key. Returns: the acceleration rate when you hold down a button or keyuint getDigits() nothrowGets the number of decimal places to display. Returns: the number of decimal places to displaybool 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 incrementgtk.types.SpinButtonUpdatePolicy getUpdatePolicy() nothrowGets the policy for updating the spin row. Returns: the policy for updating the spin rowbool getWrap() nothrowGets whether the spin row should wrap upon reaching its limits. Returns: whether the spin row should wrap upon reaching its limitsvoid 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 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.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(gtk.adjustment.Adjustment adjustment, double climbRate, uint digits)Creates a new [adw.spin_row.SpinRow].classSpinRowGidBuilderImpl(T) : adw.action_row.ActionRowGidBuilderImpl!T, gtk.editable.EditableGidBuilderImpl!T
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 chainingT climbRate(double propval) nothrowSet `climbRate` property. Params: propval = The acceleration rate when you hold down a button or key. Returns: Builder instance for fluent chainingT digits(uint propval) nothrowSet `digits` property. Params: propval = The number of decimal places to display. Returns: Builder instance for fluent chainingT numeric(bool propval) nothrowSet `numeric` property. Params: propval = Whether non-numeric characters should be ignored. Returns: Builder instance for fluent chainingT snapToTicks(bool propval) nothrowSet `snapToTicks` property. Params: propval = Whether invalid values are snapped to the nearest step increment. Returns: Builder instance for fluent chainingT 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 chainingT wrap(bool propval) nothrowSet `wrap` property. Params: propval = Whether the spin row should wrap upon reaching its limits. Returns: Builder instance for fluent chainingFluent builder for adw.spin_row.SpinRow