Package ch.bailu.gtk.adw
Klasse SpinRow
- Alle implementierten Schnittstellen:
PointerInterface
An [class@ActionRow] 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
<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 [class@Gtk.SpinButton] for details.
## CSS nodes
`AdwSpinRow` has the same structure as [class@ActionRow], as well as the
`.spin` style class on the main node.
## Accessibility
`AdwSpinRow` uses an internal `GtkSpinButton` with the
`GTK_ACCESSIBLE_ROLE_SPIN_BUTTON` role.
<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
<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 [class@Gtk.SpinButton] for details.
## CSS nodes
`AdwSpinRow` has the same structure as [class@ActionRow], as well as the
`.spin` style class on the main node.
## Accessibility
`AdwSpinRow` uses an internal `GtkSpinButton` with the
`GTK_ACCESSIBLE_ROLE_SPIN_BUTTON` role.
https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.SpinRow.html
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic interface
static interface
static interface
Von Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.adw.ActionRow
ActionRow.OnActivated
Von Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gtk.ListBoxRow
ListBoxRow.OnActivate
Von Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gtk.Widget
Widget.OnDestroy, Widget.OnDestroyNotify, Widget.OnDirectionChanged, Widget.OnHide, Widget.OnKeynavFailed, Widget.OnMap, Widget.OnMnemonicActivate, Widget.OnMoveFocus, Widget.OnQueryTooltip, Widget.OnRealize, Widget.OnShow, Widget.OnStateFlagsChanged, Widget.OnTickCallback, Widget.OnUnmap, Widget.OnUnrealize
Von Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Feldübersicht
FelderVon Klasse geerbte Felder ch.bailu.gtk.adw.ActionRow
SIGNAL_ON_ACTIVATED
Von Klasse geerbte Felder ch.bailu.gtk.gtk.ListBoxRow
SIGNAL_ON_ACTIVATE
Von Klasse geerbte Felder ch.bailu.gtk.gtk.Widget
SIGNAL_ON_DESTROY, SIGNAL_ON_DIRECTION_CHANGED, SIGNAL_ON_HIDE, SIGNAL_ON_KEYNAV_FAILED, SIGNAL_ON_MAP, SIGNAL_ON_MNEMONIC_ACTIVATE, SIGNAL_ON_MOVE_FOCUS, SIGNAL_ON_QUERY_TOOLTIP, SIGNAL_ON_REALIZE, SIGNAL_ON_SHOW, SIGNAL_ON_STATE_FLAGS_CHANGED, SIGNAL_ON_UNMAP, SIGNAL_ON_UNREALIZE
Von Klasse geerbte Felder ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungSpinRow
(Adjustment adjustment, double climb_rate, int digits) Creates a new `AdwSpinRow`.SpinRow
(PointerContainer pointer) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungImplements interfaceAccessible
.Implements interfaceActionable
.Implements interfaceBuildable
.Implements interfaceConstraintTarget
.Implements interfaceEditable
.void
configure
(Adjustment adjustment, double climb_rate, int digits) Changes the properties of an existing spin row.Gets the adjustment that holds the value for the spin row.static ClassHandler
double
Gets the acceleration rate when you hold down a button or key.int
Gets the number of decimal places to display.static int
boolean
Gets whether non-numeric characters should be ignored.static long
static TypeSystem.TypeSize
boolean
Gets whether invalid values are snapped to nearest step increment.static long
static TypeSystem.TypeSize
int
Gets the policy for updating the spin row.double
getValue()
Gets the current value.boolean
getWrap()
Gets whether the spin row should wrap upon reaching its limits.static SpinRow
newWithRangeSpinRow
(double min, double max, double step) Creates a new `AdwSpinRow` with the given properties.onInput
(SpinRow.OnInput signal) Connect to signal "input".onOutput
(SpinRow.OnOutput signal) Connect to signal "output".onWrapped
(SpinRow.OnWrapped signal) Connect to signal "wrapped".void
setAdjustment
(Adjustment adjustment) Sets the adjustment that holds the value for the spin row.void
setClimbRate
(double climb_rate) Sets the acceleration rate when you hold down a button or key.void
setDigits
(int digits) Sets the number of decimal places to display.void
setNumeric
(boolean 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
(boolean snap_to_ticks) Sets whether invalid values are snapped to the nearest step increment.void
setUpdatePolicy
(int policy) Sets the policy for updating the spin row.void
setValue
(double value) Sets the current value.void
setWrap
(boolean wrap) Sets whether the spin row should wrap upon reaching its limits.void
update()
Manually force an update of the spin row.Von Klasse geerbte Methoden ch.bailu.gtk.adw.ActionRow
addPrefix, addSuffix, getActivatableWidget, getIconName, getSubtitle, getSubtitleLines, getSubtitleSelectable, getTitleLines, onActivated, remove, setActivatableWidget, setIconName, setIconName, setSubtitle, setSubtitle, setSubtitleLines, setSubtitleSelectable, setTitleLines
Von Klasse geerbte Methoden ch.bailu.gtk.adw.PreferencesRow
getTitle, getTitleSelectable, getUseMarkup, getUseUnderline, setTitle, setTitle, setTitleSelectable, setUseMarkup, setUseUnderline
Von Klasse geerbte Methoden ch.bailu.gtk.gtk.ListBoxRow
changed, getActivatable, getChild, getHeader, getIndex, getSelectable, isSelected, onActivate, setActivatable, setChild, setHeader, setSelectable
Von Klasse geerbte Methoden ch.bailu.gtk.gtk.Widget
actionSetEnabled, actionSetEnabled, activate, activateAction, activateAction, activateActionVariant, activateActionVariant, activateDefault, addController, addCssClass, addCssClass, addMnemonicLabel, addTickCallback, allocate, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getBaseline, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getDefaultDirection, getDirection, getDisplay, getFirstChild, getFocusable, getFocusChild, getFocusOnClick, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getLimitEvents, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPreferredSize, getPrevSibling, getPrimaryClipboard, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth, grabFocus, hasCssClass, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, observeChildren, observeControllers, onDestroy, onDirectionChanged, onHide, onKeynavFailed, onMap, onMnemonicActivate, onMoveFocus, onQueryTooltip, onRealize, onShow, onStateFlagsChanged, onUnmap, onUnrealize, pick, queueAllocate, queueDraw, queueResize, realize, removeController, removeCssClass, removeCssClass, removeMnemonicLabel, removeTickCallback, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setCursorFromName, setDefaultDirection, setDirection, setFocusable, setFocusChild, setFocusOnClick, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setName, setOpacity, setOverflow, setParent, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipMarkup, setTooltipText, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible, shouldLayout, show, sizeAllocate, snapshotChild, triggerTooltipQuery, unmap, unparent, unrealize, unsetStateFlags
Von Klasse geerbte Methoden ch.bailu.gtk.type.PropertyHolder
getBooleanProperty, getIntProperty, getObjectProperty, getStringProperty, getStrProperty, setBooleanProperty, setIntProperty, setObjectProperty, setStringProperty, setStrProperty
Von Klasse geerbte Methoden ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Felddetails
-
Konstruktordetails
-
Methodendetails
-
getClassHandler
-
newWithRangeSpinRow
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
[method@SpinRow.set_digits] to correct it.- Parameter:
min
- minimum allowable valuemax
- maximum allowable valuestep
- increment added or subtracted by spinning the widget- Gibt zurück:
- the new `AdwSpinRow`
-
configure
Changes the properties of an existing spin row.
The adjustment, climb rate, and number of decimal places are updated
accordingly.- Parameter:
adjustment
- the adjustment that this spin row should useclimb_rate
- the new climb ratedigits
- the number of decimal places to display
-
getAdjustment
Gets the adjustment that holds the value for the spin row.- Gibt zurück:
- the adjustment that holds the spin row's value
-
getClimbRate
public double getClimbRate()Gets the acceleration rate when you hold down a button or key.- Gibt zurück:
- the acceleration rate when you hold down a button or key
-
getDigits
public int getDigits()Gets the number of decimal places to display.- Gibt zurück:
- the number of decimal places to display
-
getNumeric
public boolean getNumeric()Gets whether non-numeric characters should be ignored.- Gibt zurück:
- whether non-numeric characters should be ignored.
-
getSnapToTicks
public boolean getSnapToTicks()Gets whether invalid values are snapped to nearest step increment.- Gibt zurück:
- whether invalid values are snapped to the nearest step increment
-
getUpdatePolicy
public int getUpdatePolicy()Gets the policy for updating the spin row.- Gibt zurück:
- the policy for updating the spin row
-
getValue
public double getValue()Gets the current value.- Gibt zurück:
- the current value
-
getWrap
public boolean getWrap()Gets whether the spin row should wrap upon reaching its limits.- Gibt zurück:
- whether the spin row should wrap upon reaching its limits
-
setAdjustment
Sets the adjustment that holds the value for the spin row.- Parameter:
adjustment
- an adjustment
-
setClimbRate
public void setClimbRate(double climb_rate) Sets the acceleration rate when you hold down a button or key.- Parameter:
climb_rate
- the acceleration rate when you hold down a button or key
-
setDigits
public void setDigits(int digits) Sets the number of decimal places to display.- Parameter:
digits
- the number of decimal places to display
-
setNumeric
public void setNumeric(boolean numeric) Sets whether non-numeric characters should be ignored.- Parameter:
numeric
- whether non-numeric characters should be ignored
-
setRange
public void setRange(double min, double max) 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.- Parameter:
min
- minimum allowable valuemax
- maximum allowable value
-
setSnapToTicks
public void setSnapToTicks(boolean snap_to_ticks) Sets whether invalid values are snapped to the nearest step increment.- Parameter:
snap_to_ticks
- whether invalid values are snapped to the nearest step increment
-
setUpdatePolicy
public void setUpdatePolicy(int policy) Sets the policy for updating the spin row.
The options are always, or only when the value is invalid.- Parameter:
policy
- the policy for updating the spin row
-
setValue
public void setValue(double value) Sets the current value.- Parameter:
value
- a new value
-
setWrap
public void setWrap(boolean wrap) Sets whether the spin row should wrap upon reaching its limits.- Parameter:
wrap
- whether the spin row should wrap upon reaching its limits
-
update
public void update()Manually force an update of the spin row. -
onInput
Connect to signal "input".
SeeSpinRow.OnInput.onInput(ch.bailu.gtk.type.Pointer)
for signal description.
FieldSIGNAL_ON_INPUT
contains original signal name and can be used as resource reference.- Parameter:
signal
- callback function (lambda).- Gibt zurück:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
onOutput
Connect to signal "output".
SeeSpinRow.OnOutput.onOutput()
for signal description.
FieldSIGNAL_ON_OUTPUT
contains original signal name and can be used as resource reference.- Parameter:
signal
- callback function (lambda).- Gibt zurück:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
onWrapped
Connect to signal "wrapped".
SeeSpinRow.OnWrapped.onWrapped()
for signal description.
FieldSIGNAL_ON_WRAPPED
contains original signal name and can be used as resource reference.- Parameter:
signal
- callback function (lambda).- Gibt zurück:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
asAccessible
Implements interfaceAccessible
. Call this to get access to interface functions.- Setzt außer Kraft:
asAccessible
in KlasseActionRow
- Gibt zurück:
Accessible
-
asActionable
Implements interfaceActionable
. Call this to get access to interface functions.- Setzt außer Kraft:
asActionable
in KlasseActionRow
- Gibt zurück:
Actionable
-
asBuildable
Implements interfaceBuildable
. Call this to get access to interface functions.- Setzt außer Kraft:
asBuildable
in KlasseActionRow
- Gibt zurück:
Buildable
-
asConstraintTarget
Implements interfaceConstraintTarget
. Call this to get access to interface functions.- Setzt außer Kraft:
asConstraintTarget
in KlasseActionRow
- Gibt zurück:
ConstraintTarget
-
asEditable
Implements interfaceEditable
. Call this to get access to interface functions.- Gibt zurück:
Editable
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-