Interface: SpinButtonProps
Defined in: react/src/generated/jsx.ts:5225
Props for the SpinButton widget.
Extends
Properties
activatesDefault?
optionalactivatesDefault:boolean
Defined in: react/src/generated/jsx.ts:5231
Whether to activate the default widget when the spin button is activated.
See [signal@Gtk.SpinButton::activate] for what counts as activation.
adjustment?
optionaladjustment:Adjustment
Defined in: react/src/generated/jsx.ts:5233
The adjustment that holds the value of the spin button.
canFocus?
optionalcanFocus:boolean
Defined in: react/src/generated/jsx.ts:412
Whether the widget or any of its descendents can accept the input focus.
This property is meant to be set by widget implementations, typically in their instance init function.
Inherited from
canTarget?
optionalcanTarget:boolean
Defined in: react/src/generated/jsx.ts:414
Whether the widget can receive pointer events.
Inherited from
children?
optionalchildren:ReactNode
Defined in: react/src/generated/jsx.ts:688
Inherited from
climbRate
climbRate:
number
Defined in: react/src/generated/jsx.ts:5235
The acceleration rate when you hold down a button or key.
cssClasses?
optionalcssClasses:string[]
Defined in: react/src/generated/jsx.ts:416
A list of css classes applied to this widget.
Inherited from
cssName?
optionalcssName:string
Defined in: react/src/generated/jsx.ts:423
The name of this widget in the CSS tree.
This property is meant to be set by widget implementations, typically in their instance init function.
Inherited from
cursor?
optionalcursor:number
Defined in: react/src/generated/jsx.ts:425
The cursor used by @widget.
Inherited from
cursorPosition?
optionalcursorPosition:number
Defined in: react/src/generated/jsx.ts:5257
The current position of the insertion cursor in chars.
digits
digits:
number
Defined in: react/src/generated/jsx.ts:5237
The number of decimal places to display.
editable?
optionaleditable:boolean
Defined in: react/src/generated/jsx.ts:5259
Whether the entry contents can be edited.
editingCanceled?
optionaleditingCanceled:boolean
Defined in: react/src/generated/jsx.ts:5255
Indicates whether editing on the cell has been canceled.
enableUndo?
optionalenableUndo:boolean
Defined in: react/src/generated/jsx.ts:5261
If undo/redo should be enabled for the editable.
focusable?
optionalfocusable:boolean
Defined in: react/src/generated/jsx.ts:433
Whether this widget itself will accept the input focus.
Inherited from
focusOnClick?
optionalfocusOnClick:boolean
Defined in: react/src/generated/jsx.ts:431
Whether the widget should grab focus when it is clicked with the mouse.
This property is only relevant for widgets that can take focus.
Inherited from
halign?
optionalhalign:Align
Defined in: react/src/generated/jsx.ts:435
How to distribute horizontal space if widget gets extra space.
Inherited from
hasDefault?
optionalhasDefault:boolean
Defined in: react/src/generated/jsx.ts:437
Whether the widget is the default widget.
Inherited from
hasFocus?
optionalhasFocus:boolean
Defined in: react/src/generated/jsx.ts:439
Whether the widget has the input focus.
Inherited from
hasTooltip?
optionalhasTooltip:boolean
Defined in: react/src/generated/jsx.ts:448
Enables or disables the emission of the [signal@Gtk.Widget::query-tooltip] signal on @widget.
A true value indicates that widget can have a tooltip, in this case
the widget will be queried using [signal@Gtk.Widget::query-tooltip] to
determine whether it will provide a tooltip or not.
Inherited from
heightRequest?
optionalheightRequest:number
Defined in: react/src/generated/jsx.ts:454
Overrides for height request of the widget.
If this is -1, the natural request will be used.
Inherited from
hexpand?
optionalhexpand:boolean
Defined in: react/src/generated/jsx.ts:456
Whether to expand horizontally.
Inherited from
hexpandSet?
optionalhexpandSet:boolean
Defined in: react/src/generated/jsx.ts:458
Whether to use the hexpand property.
Inherited from
layoutManager?
optionallayoutManager:LayoutManager
Defined in: react/src/generated/jsx.ts:466
The [class@Gtk.LayoutManager] instance to use to compute the preferred size of the widget, and allocate its children.
This property is meant to be set by widget implementations, typically in their instance init function.
Inherited from
limitEvents?
optionallimitEvents:boolean
Defined in: react/src/generated/jsx.ts:475
Makes this widget act like a modal dialog, with respect to event delivery.
Global event controllers will not handle events with targets inside the widget, unless they are set up to ignore propagation limits. See [method@Gtk.EventController.set_propagation_limit].
Inherited from
marginBottom?
optionalmarginBottom:number
Defined in: react/src/generated/jsx.ts:483
Margin on bottom side of widget.
This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from [method@Gtk.Widget.set_size_request] for example.
Inherited from
marginEnd?
optionalmarginEnd:number
Defined in: react/src/generated/jsx.ts:494
Margin on end of widget, horizontally.
This property supports left-to-right and right-to-left text directions.
This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from [method@Gtk.Widget.set_size_request] for example.
Inherited from
marginStart?
optionalmarginStart:number
Defined in: react/src/generated/jsx.ts:505
Margin on start of widget, horizontally.
This property supports left-to-right and right-to-left text directions.
This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from [method@Gtk.Widget.set_size_request] for example.
Inherited from
marginTop?
optionalmarginTop:number
Defined in: react/src/generated/jsx.ts:513
Margin on top side of widget.
This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from [method@Gtk.Widget.set_size_request] for example.
Inherited from
maxWidthChars?
optionalmaxWidthChars:number
Defined in: react/src/generated/jsx.ts:5263
The desired maximum width of the entry, in characters.
name?
optionalname:string
Defined in: react/src/generated/jsx.ts:515
The name of the widget.
Inherited from
numeric?
optionalnumeric:boolean
Defined in: react/src/generated/jsx.ts:5239
Whether non-numeric characters should be ignored.
onActivate()?
optionalonActivate: (self) =>void
Defined in: react/src/generated/jsx.ts:5288
Emitted when the spin button is activated.
The keybindings for this signal are all forms of the Enter key.
If the Enter key results in the value being committed to the
spin button, then activation does not occur until Enter is
pressed again.
Parameters
| Parameter | Type |
|---|---|
self | SpinButton |
Returns
void
onChanged()?
optionalonChanged: (self) =>void
Defined in: react/src/generated/jsx.ts:5383
Emitted at the end of a single user-visible operation on the contents.
E.g., a paste operation that replaces the contents of the selection will cause only one signal emission (even though it is implemented by first deleting the selection, then inserting the new content, and may cause multiple ::notify::text signals to be emitted).
Parameters
| Parameter | Type |
|---|---|
self | SpinButton |
Returns
void
onChangeValue()?
optionalonChangeValue: (self,scroll) =>void
Defined in: react/src/generated/jsx.ts:5300
Emitted when the user initiates a value change.
This is a keybinding signal.
Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control the cursor programmatically.
The default bindings for this signal are Up/Down and PageUp/PageDown.
Parameters
| Parameter | Type |
|---|---|
self | SpinButton |
scroll | ScrollType |
Returns
void
onDeleteText()?
optionalonDeleteText: (self,startPos,endPos) =>void
Defined in: react/src/generated/jsx.ts:5395
Emitted when text is deleted from the widget by the user.
The default handler for this signal will normally be responsible for deleting the text, so by connecting to this signal and then stopping the signal with g_signal_stop_emission(), it is possible to modify the range of deleted text, or prevent it from being deleted entirely.
The start_pos and end_pos parameters are interpreted as for
[method@Gtk.Editable.delete_text].
Parameters
| Parameter | Type |
|---|---|
self | SpinButton |
startPos | number |
endPos | number |
Returns
void
onDestroy()?
optionalonDestroy: (self) =>void
Defined in: react/src/generated/jsx.ts:593
Signals that all holders of a reference to the widget should release the reference that they hold.
May result in finalization of the widget if all references are released.
This signal is not suitable for saving widget state.
Parameters
| Parameter | Type |
|---|---|
self | Widget |
Returns
void
Inherited from
onDirectionChanged()?
optionalonDirectionChanged: (self,previousDirection) =>void
Defined in: react/src/generated/jsx.ts:595
Emitted when the text direction of a widget changes.
Parameters
| Parameter | Type |
|---|---|
self | Widget |
previousDirection | TextDirection |
Returns
void
Inherited from
WidgetProps.onDirectionChanged
onEditingDone()?
optionalonEditingDone: (self) =>void
Defined in: react/src/generated/jsx.ts:5357
This signal is a sign for the cell renderer to update its value from the @cell_editable.
Implementations of GtkCellEditable are responsible for
emitting this signal when they are done editing, e.g.
GtkEntry emits this signal when the user presses Enter. Typical things to
do in a handler for ::editing-done are to capture the edited value,
disconnect the cell_editable from signals on the GtkCellRenderer, etc.
gtk_cell_editable_editing_done() is a convenience method
for emitting GtkCellEditable::editing-done.
Parameters
| Parameter | Type |
|---|---|
self | SpinButton |
Returns
void
onHide()?
optionalonHide: (self) =>void
Defined in: react/src/generated/jsx.ts:600
Emitted when widget is hidden.
Parameters
| Parameter | Type |
|---|---|
self | Widget |
Returns
void
Inherited from
onInput()?
optionalonInput: (self,newValue) =>number
Defined in: react/src/generated/jsx.ts:5310
Emitted to convert the users input into a double value.
The signal handler is expected to use [method@Gtk.Editable.get_text]
to retrieve the text of the spinbutton and set new_value to the
new value.
The default conversion uses g_strtod().
Parameters
| Parameter | Type |
|---|---|
self | SpinButton |
newValue | Ref<number> |
Returns
number
onInsertText()?
optionalonInsertText: (self,text,length,position) =>void
Defined in: react/src/generated/jsx.ts:5408
Emitted when text is inserted into the widget by the user.
The default handler for this signal will normally be responsible for inserting the text, so by connecting to this signal and then stopping the signal with g_signal_stop_emission(), it is possible to modify the inserted text, or prevent it from being inserted entirely.
Parameters
| Parameter | Type |
|---|---|
self | SpinButton |
text | string |
length | number |
position | Ref<number> |
Returns
void
onKeynavFailed()?
optionalonKeynavFailed: (self,direction) =>boolean
Defined in: react/src/generated/jsx.ts:606
Emitted if keyboard navigation fails.
See [method@Gtk.Widget.keynav_failed] for details.
Parameters
| Parameter | Type |
|---|---|
self | Widget |
direction | DirectionType |
Returns
boolean
Inherited from
onMap()?
optionalonMap: (self) =>void
Defined in: react/src/generated/jsx.ts:618
Emitted when widget is going to be mapped.
A widget is mapped when the widget is visible (which is controlled with [property@Gtk.Widget:visible]) and all its parents up to the toplevel widget are also visible.
The ::map signal can be used to determine whether a widget will be drawn,
for instance it can resume an animation that was stopped during the
emission of [signal@Gtk.Widget::unmap].
Parameters
| Parameter | Type |
|---|---|
self | Widget |
Returns
void
Inherited from
onMnemonicActivate()?
optionalonMnemonicActivate: (self,groupCycling) =>boolean
Defined in: react/src/generated/jsx.ts:624
Emitted when a widget is activated via a mnemonic.
The default handler for this signal activates widget if group_cycling is false, or just makes widget grab focus if group_cycling is true.
Parameters
| Parameter | Type |
|---|---|
self | Widget |
groupCycling | boolean |
Returns
boolean
Inherited from
WidgetProps.onMnemonicActivate
onMoveFocus()?
optionalonMoveFocus: (self,direction) =>void
Defined in: react/src/generated/jsx.ts:633
Emitted when the focus is moved.
The ::move-focus signal is a keybinding signal.
The default bindings for this signal are Tab to move forward,
and Shift+Tab to move backward.
Parameters
| Parameter | Type |
|---|---|
self | Widget |
direction | DirectionType |
Returns
void
Inherited from
onOutput()?
optionalonOutput: (self) =>boolean
Defined in: react/src/generated/jsx.ts:5332
Emitted to tweak the formatting of the value for display.
// show leading zeros
static gboolean
on_output (GtkSpinButton *spin,
gpointer data)
{
char *text;
int value;
value = gtk_spin_button_get_value_as_int (spin);
text = g_strdup_printf ("%02d", value);
gtk_editable_set_text (GTK_EDITABLE (spin), text):
g_free (text);
return TRUE;
}
Parameters
| Parameter | Type |
|---|---|
self | SpinButton |
Returns
boolean
onQueryTooltip()?
optionalonQueryTooltip: (self,x,y,keyboardMode,tooltip) =>boolean
Defined in: react/src/generated/jsx.ts:648
Emitted when the widget’s tooltip is about to be shown.
This happens when the [property@Gtk.Widget:has-tooltip] property
is true and the hover timeout has expired with the cursor hovering
above @widget; or emitted when widget got focus in keyboard mode.
Using the given coordinates, the signal handler should determine
whether a tooltip should be shown for @widget. If this is the case
true should be returned, false otherwise. Note that if keyboard_mode is true, the values of x and y are undefined and should not be used.
The signal handler is free to manipulate tooltip with the therefore
destined function calls.
Parameters
| Parameter | Type |
|---|---|
self | Widget |
x | number |
y | number |
keyboardMode | boolean |
tooltip | Tooltip |
Returns
boolean
Inherited from
onRealize()?
optionalonRealize: (self) =>void
Defined in: react/src/generated/jsx.ts:661
Emitted when widget is associated with a GdkSurface.
This means that [method@Gtk.Widget.realize] has been called or the widget has been mapped (that is, it is going to be drawn).
Parameters
| Parameter | Type |
|---|---|
self | Widget |
Returns
void
Inherited from
onRemoveWidget()?
optionalonRemoveWidget: (self) =>void
Defined in: react/src/generated/jsx.ts:5372
This signal is meant to indicate that the cell is finished
editing, and the cell_editable widget is being removed and may
subsequently be destroyed.
Implementations of GtkCellEditable are responsible for
emitting this signal when they are done editing. It must
be emitted after the GtkCellEditable::editing-done signal,
to give the cell renderer a chance to update the cell's value
before the widget is removed.
gtk_cell_editable_remove_widget() is a convenience method
for emitting GtkCellEditable::remove-widget.
Parameters
| Parameter | Type |
|---|---|
self | SpinButton |
Returns
void
onShow()?
optionalonShow: (self) =>void
Defined in: react/src/generated/jsx.ts:663
Emitted when widget is shown.
Parameters
| Parameter | Type |
|---|---|
self | Widget |
Returns
void
Inherited from
onStateFlagsChanged()?
optionalonStateFlagsChanged: (self,flags) =>void
Defined in: react/src/generated/jsx.ts:669
Emitted when the widget state changes.
See [method@Gtk.Widget.get_state_flags].
Parameters
| Parameter | Type |
|---|---|
self | Widget |
flags | StateFlags |
Returns
void
Inherited from
WidgetProps.onStateFlagsChanged
onUnmap()?
optionalonUnmap: (self) =>void
Defined in: react/src/generated/jsx.ts:679
Emitted when widget is going to be unmapped.
A widget is unmapped when either it or any of its parents up to the toplevel widget have been set as hidden.
As ::unmap indicates that a widget will not be shown any longer,
it can be used to, for example, stop an animation on the widget.
Parameters
| Parameter | Type |
|---|---|
self | Widget |
Returns
void
Inherited from
onUnrealize()?
optionalonUnrealize: (self) =>void
Defined in: react/src/generated/jsx.ts:686
Emitted when the GdkSurface associated with widget is destroyed.
This means that [method@Gtk.Widget.unrealize] has been called or the widget has been unmapped (that is, it is going to be hidden).
Parameters
| Parameter | Type |
|---|---|
self | Widget |
Returns
void
Inherited from
onValueChanged()?
optionalonValueChanged: (self) =>void
Defined in: react/src/generated/jsx.ts:5338
Emitted when the value is changed.
Also see the [signal@Gtk.SpinButton::output] signal.
Parameters
| Parameter | Type |
|---|---|
self | SpinButton |
Returns
void
onWrapped()?
optionalonWrapped: (self) =>void
Defined in: react/src/generated/jsx.ts:5343
Emitted right after the spinbutton wraps from its maximum to its minimum value or vice-versa.
Parameters
| Parameter | Type |
|---|---|
self | SpinButton |
Returns
void
opacity?
optionalopacity:number
Defined in: react/src/generated/jsx.ts:517
The requested opacity of the widget.
Inherited from
orientation?
optionalorientation:Orientation
Defined in: react/src/generated/jsx.ts:5277
The orientation of the orientable.
overflow?
optionaloverflow:Overflow
Defined in: react/src/generated/jsx.ts:524
How content outside the widget's content area is treated.
This property is meant to be set by widget implementations, typically in their instance init function.
Inherited from
parent?
optionalparent:Widget
Defined in: react/src/generated/jsx.ts:526
The parent widget of this widget.
Inherited from
receivesDefault?
optionalreceivesDefault:boolean
Defined in: react/src/generated/jsx.ts:528
Whether the widget will receive the default action when it is focused.
Inherited from
ref?
optionalref:Ref<SpinButton>
Defined in: react/src/generated/jsx.ts:5415
root?
optionalroot:Root
Defined in: react/src/generated/jsx.ts:534
The GtkRoot widget of the widget tree containing this widget.
This will be NULL if the widget is not contained in a root widget.
Inherited from
scaleFactor?
optionalscaleFactor:number
Defined in: react/src/generated/jsx.ts:536
The scale factor of the widget.
Inherited from
selectionBound?
optionalselectionBound:number
Defined in: react/src/generated/jsx.ts:5265
The position of the opposite end of the selection from the cursor in chars.
sensitive?
optionalsensitive:boolean
Defined in: react/src/generated/jsx.ts:538
Whether the widget responds to input.
Inherited from
snapToTicks?
optionalsnapToTicks:boolean
Defined in: react/src/generated/jsx.ts:5244
Whether erroneous values are automatically changed to the spin buttons nearest step increment.
text?
optionaltext:string
Defined in: react/src/generated/jsx.ts:5267
The contents of the entry.
tooltipMarkup?
optionaltooltipMarkup:string
Defined in: react/src/generated/jsx.ts:554
Sets the text of tooltip to be the given string, which is marked up with Pango markup.
Also see [method@Gtk.Tooltip.set_markup].
This is a convenience property which will take care of getting the
tooltip shown if the given string is not NULL:
[property@Gtk.Widget:has-tooltip] will automatically be set to true
and there will be taken care of [signal@Gtk.Widget::query-tooltip] in
the default signal handler.
Note that if both [property@Gtk.Widget:tooltip-text] and [property@Gtk.Widget:tooltip-markup] are set, the last one wins.
Inherited from
tooltipText?
optionaltooltipText:string
Defined in: react/src/generated/jsx.ts:569
Sets the text of tooltip to be the given string.
Also see [method@Gtk.Tooltip.set_text].
This is a convenience property which will take care of getting the
tooltip shown if the given string is not NULL:
[property@Gtk.Widget:has-tooltip] will automatically be set to true
and there will be taken care of [signal@Gtk.Widget::query-tooltip] in
the default signal handler.
Note that if both [property@Gtk.Widget:tooltip-text] and [property@Gtk.Widget:tooltip-markup] are set, the last one wins.
Inherited from
updatePolicy?
optionalupdatePolicy:SpinButtonUpdatePolicy
Defined in: react/src/generated/jsx.ts:5249
Whether the spin button should update always, or only when the value is acceptable.
valign?
optionalvalign:Align
Defined in: react/src/generated/jsx.ts:571
How to distribute vertical space if widget gets extra space.
Inherited from
value?
optionalvalue:number
Defined in: react/src/generated/jsx.ts:5251
The current value.
vexpand?
optionalvexpand:boolean
Defined in: react/src/generated/jsx.ts:573
Whether to expand vertically.
Inherited from
vexpandSet?
optionalvexpandSet:boolean
Defined in: react/src/generated/jsx.ts:575
Whether to use the vexpand property.
Inherited from
visible?
optionalvisible:boolean
Defined in: react/src/generated/jsx.ts:577
Whether the widget is visible.
Inherited from
widthChars?
optionalwidthChars:number
Defined in: react/src/generated/jsx.ts:5269
Number of characters to leave space for in the entry.
widthRequest?
optionalwidthRequest:number
Defined in: react/src/generated/jsx.ts:583
Overrides for width request of the widget.
If this is -1, the natural request will be used.
Inherited from
wrap?
optionalwrap:boolean
Defined in: react/src/generated/jsx.ts:5253
Whether a spin button should wrap upon reaching its limits.
xalign?
optionalxalign:number
Defined in: react/src/generated/jsx.ts:5275
The horizontal alignment, from 0 (left) to 1 (right).
Reversed for RTL layouts.