forked from AuroraMiddleware/gtk
spinbutton: Convert docs
Change link syntax, add an example image, generally clean things up.
This commit is contained in:
parent
6c315b1b8a
commit
63dc97fb29
@ -70,31 +70,31 @@
|
|||||||
#define TIMEOUT_REPEAT 50
|
#define TIMEOUT_REPEAT 50
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:gtkspinbutton
|
* GtkSpinButton:
|
||||||
* @Title: GtkSpinButton
|
|
||||||
* @Short_description: Retrieve an integer or floating-point number from
|
|
||||||
* the user
|
|
||||||
* @See_also: #GtkEntry
|
|
||||||
*
|
*
|
||||||
* A #GtkSpinButton is an ideal way to allow the user to set the value of
|
* A `GtkSpinButton` is an ideal way to allow the user to set the
|
||||||
* some attribute. Rather than having to directly type a number into a
|
* value of some attribute.
|
||||||
* #GtkEntry, GtkSpinButton allows the user to click on one of two arrows
|
*
|
||||||
|
* ![An example GtkSpinButton](spinbutton.png)
|
||||||
|
*
|
||||||
|
* Rather than having to directly type a number into a `GtkEntry`,
|
||||||
|
* `GtkSpinButton` allows the user to click on one of two arrows
|
||||||
* to increment or decrement the displayed value. A value can still be
|
* to increment or decrement the displayed value. A value can still be
|
||||||
* typed in, with the bonus that it can be checked to ensure it is in a
|
* typed in, with the bonus that it can be checked to ensure it is in a
|
||||||
* given range.
|
* given range.
|
||||||
*
|
*
|
||||||
* The main properties of a GtkSpinButton are through an adjustment.
|
* The main properties of a `GtkSpinButton` are through an adjustment.
|
||||||
* See the #GtkAdjustment section for more details about an adjustment's
|
* See the [class@Gtk.Adjustment] documentation for more details about
|
||||||
* properties.
|
* an adjustment's properties.
|
||||||
*
|
*
|
||||||
* Note that GtkSpinButton will by default make its entry large enough to
|
* Note that `GtkSpinButton` will by default make its entry large enough
|
||||||
* accommodate the lower and upper bounds of the adjustment. If this is
|
* to accommodate the lower and upper bounds of the adjustment. If this
|
||||||
* not desired, the automatic sizing can be turned off by explicitly
|
* is not desired, the automatic sizing can be turned off by explicitly
|
||||||
* setting #GtkEditable::width-chars to a value != -1.
|
* setting [property@Gtk.Editable:width-chars] to a value != -1.
|
||||||
*
|
*
|
||||||
* ## Using a GtkSpinButton to get an integer
|
* ## Using a GtkSpinButton to get an integer
|
||||||
*
|
*
|
||||||
* |[<!-- language="C" -->
|
* ```c
|
||||||
* // Provides a function to retrieve an integer value from a GtkSpinButton
|
* // Provides a function to retrieve an integer value from a GtkSpinButton
|
||||||
* // and creates a spin button to model percentage values.
|
* // and creates a spin button to model percentage values.
|
||||||
*
|
*
|
||||||
@ -122,11 +122,11 @@
|
|||||||
*
|
*
|
||||||
* gtk_widget_show (window);
|
* gtk_widget_show (window);
|
||||||
* }
|
* }
|
||||||
* ]|
|
* ```
|
||||||
*
|
*
|
||||||
* ## Using a GtkSpinButton to get a floating point value
|
* ## Using a GtkSpinButton to get a floating point value
|
||||||
*
|
*
|
||||||
* |[<!-- language="C" -->
|
* ```c
|
||||||
* // Provides a function to retrieve a floating point value from a
|
* // Provides a function to retrieve a floating point value from a
|
||||||
* // GtkSpinButton, and creates a high precision spin button.
|
* // GtkSpinButton, and creates a high precision spin button.
|
||||||
*
|
*
|
||||||
@ -153,7 +153,7 @@
|
|||||||
*
|
*
|
||||||
* gtk_widget_show (window);
|
* gtk_widget_show (window);
|
||||||
* }
|
* }
|
||||||
* ]|
|
* ```
|
||||||
*
|
*
|
||||||
* # CSS nodes
|
* # CSS nodes
|
||||||
*
|
*
|
||||||
@ -175,15 +175,15 @@
|
|||||||
* ╰── button.down
|
* ╰── button.down
|
||||||
* ]|
|
* ]|
|
||||||
*
|
*
|
||||||
* GtkSpinButtons main CSS node has the name spinbutton. It creates subnodes
|
* `GtkSpinButton`s main CSS node has the name spinbutton. It creates subnodes
|
||||||
* for the entry and the two buttons, with these names. The button nodes have
|
* for the entry and the two buttons, with these names. The button nodes have
|
||||||
* the style classes .up and .down. The GtkText subnodes (if present) are put
|
* the style classes .up and .down. The `GtkText` subnodes (if present) are put
|
||||||
* below the text node. The orientation of the spin button is reflected in
|
* below the text node. The orientation of the spin button is reflected in
|
||||||
* the .vertical or .horizontal style class on the main node.
|
* the .vertical or .horizontal style class on the main node.
|
||||||
*
|
*
|
||||||
* # Accessiblity
|
* # Accessiblity
|
||||||
*
|
*
|
||||||
* GtkSpinButton uses the #GTK_ACCESSIBLE_ROLE_SPIN_BUTTON role.
|
* `GtkSpinButton` uses the %GTK_ACCESSIBLE_ROLE_SPIN_BUTTON role.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct _GtkSpinButton GtkSpinButton;
|
typedef struct _GtkSpinButton GtkSpinButton;
|
||||||
@ -364,6 +364,11 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
|
|||||||
class->output = NULL;
|
class->output = NULL;
|
||||||
class->change_value = gtk_spin_button_real_change_value;
|
class->change_value = gtk_spin_button_real_change_value;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GtkSpinButton:adjustment:
|
||||||
|
*
|
||||||
|
* The adjustment that holds the value of the spin button.
|
||||||
|
*/
|
||||||
spinbutton_props[PROP_ADJUSTMENT] =
|
spinbutton_props[PROP_ADJUSTMENT] =
|
||||||
g_param_spec_object ("adjustment",
|
g_param_spec_object ("adjustment",
|
||||||
P_("Adjustment"),
|
P_("Adjustment"),
|
||||||
@ -371,6 +376,11 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
|
|||||||
GTK_TYPE_ADJUSTMENT,
|
GTK_TYPE_ADJUSTMENT,
|
||||||
GTK_PARAM_READWRITE);
|
GTK_PARAM_READWRITE);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GtkSpinButton:climb-rate:
|
||||||
|
*
|
||||||
|
* The acceleration rate when you hold down a button or key.
|
||||||
|
*/
|
||||||
spinbutton_props[PROP_CLIMB_RATE] =
|
spinbutton_props[PROP_CLIMB_RATE] =
|
||||||
g_param_spec_double ("climb-rate",
|
g_param_spec_double ("climb-rate",
|
||||||
P_("Climb Rate"),
|
P_("Climb Rate"),
|
||||||
@ -378,6 +388,11 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
|
|||||||
0.0, G_MAXDOUBLE, 0.0,
|
0.0, G_MAXDOUBLE, 0.0,
|
||||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GtkSpinButton:digits:
|
||||||
|
*
|
||||||
|
* The number of decimal places to display.
|
||||||
|
*/
|
||||||
spinbutton_props[PROP_DIGITS] =
|
spinbutton_props[PROP_DIGITS] =
|
||||||
g_param_spec_uint ("digits",
|
g_param_spec_uint ("digits",
|
||||||
P_("Digits"),
|
P_("Digits"),
|
||||||
@ -385,6 +400,12 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
|
|||||||
0, MAX_DIGITS, 0,
|
0, MAX_DIGITS, 0,
|
||||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GtkSpinButton:snap-to-ticks:
|
||||||
|
*
|
||||||
|
* Whether erroneous values are automatically changed to the spin buttons
|
||||||
|
* nearest step increment.
|
||||||
|
*/
|
||||||
spinbutton_props[PROP_SNAP_TO_TICKS] =
|
spinbutton_props[PROP_SNAP_TO_TICKS] =
|
||||||
g_param_spec_boolean ("snap-to-ticks",
|
g_param_spec_boolean ("snap-to-ticks",
|
||||||
P_("Snap to Ticks"),
|
P_("Snap to Ticks"),
|
||||||
@ -392,6 +413,11 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
|
|||||||
FALSE,
|
FALSE,
|
||||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GtkSpinButton:numeric:
|
||||||
|
*
|
||||||
|
* Whether non-numeric characters should be ignored.
|
||||||
|
*/
|
||||||
spinbutton_props[PROP_NUMERIC] =
|
spinbutton_props[PROP_NUMERIC] =
|
||||||
g_param_spec_boolean ("numeric",
|
g_param_spec_boolean ("numeric",
|
||||||
P_("Numeric"),
|
P_("Numeric"),
|
||||||
@ -399,6 +425,11 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
|
|||||||
FALSE,
|
FALSE,
|
||||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GtkSpinButton:wrap:
|
||||||
|
*
|
||||||
|
* Whehter a spin button should wrap upon reaching its limits.
|
||||||
|
*/
|
||||||
spinbutton_props[PROP_WRAP] =
|
spinbutton_props[PROP_WRAP] =
|
||||||
g_param_spec_boolean ("wrap",
|
g_param_spec_boolean ("wrap",
|
||||||
P_("Wrap"),
|
P_("Wrap"),
|
||||||
@ -406,6 +437,12 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
|
|||||||
FALSE,
|
FALSE,
|
||||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GtkSpinButton:update-policy:
|
||||||
|
*
|
||||||
|
* Whether the spin button should update always, or only when the value
|
||||||
|
* is acceptable..
|
||||||
|
*/
|
||||||
spinbutton_props[PROP_UPDATE_POLICY] =
|
spinbutton_props[PROP_UPDATE_POLICY] =
|
||||||
g_param_spec_enum ("update-policy",
|
g_param_spec_enum ("update-policy",
|
||||||
P_("Update Policy"),
|
P_("Update Policy"),
|
||||||
@ -414,6 +451,11 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
|
|||||||
GTK_UPDATE_ALWAYS,
|
GTK_UPDATE_ALWAYS,
|
||||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GtkSpinButton:value:
|
||||||
|
*
|
||||||
|
* The current value.
|
||||||
|
*/
|
||||||
spinbutton_props[PROP_VALUE] =
|
spinbutton_props[PROP_VALUE] =
|
||||||
g_param_spec_double ("value",
|
g_param_spec_double ("value",
|
||||||
P_("Value"),
|
P_("Value"),
|
||||||
@ -431,15 +473,16 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
|
|||||||
* @spin_button: the object on which the signal was emitted
|
* @spin_button: the object on which the signal was emitted
|
||||||
* @new_value: (out) (type double): return location for the new value
|
* @new_value: (out) (type double): return location for the new value
|
||||||
*
|
*
|
||||||
* The ::input signal can be used to influence the conversion of
|
* Emitted to convert the users input into a double value.
|
||||||
* the users input into a double value. The signal handler is
|
*
|
||||||
* expected to use gtk_editable_get_text() to retrieve the text of
|
* The signal handler is expected to use [method@Gtk.Editable.get_text]
|
||||||
* the spinbutton and set @new_value to the new value.
|
* to retrieve the text of the spinbutton and set @new_value to the
|
||||||
|
* new value.
|
||||||
*
|
*
|
||||||
* The default conversion uses g_strtod().
|
* The default conversion uses g_strtod().
|
||||||
*
|
*
|
||||||
* Returns: %TRUE for a successful conversion, %FALSE if the input
|
* Returns: %TRUE for a successful conversion, %FALSE if the input
|
||||||
* was not handled, and %GTK_INPUT_ERROR if the conversion failed.
|
* was not handled, and %GTK_INPUT_ERROR if the conversion failed.
|
||||||
*/
|
*/
|
||||||
spinbutton_signals[INPUT] =
|
spinbutton_signals[INPUT] =
|
||||||
g_signal_new (I_("input"),
|
g_signal_new (I_("input"),
|
||||||
@ -455,9 +498,9 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
|
|||||||
* GtkSpinButton::output:
|
* GtkSpinButton::output:
|
||||||
* @spin_button: the object on which the signal was emitted
|
* @spin_button: the object on which the signal was emitted
|
||||||
*
|
*
|
||||||
* The ::output signal can be used to change to formatting
|
* Emitted to tweak the formatting of the value for display.
|
||||||
* of the value that is displayed in the spin buttons entry.
|
*
|
||||||
* |[<!-- language="C" -->
|
* ```c
|
||||||
* // show leading zeros
|
* // show leading zeros
|
||||||
* static gboolean
|
* static gboolean
|
||||||
* on_output (GtkSpinButton *spin,
|
* on_output (GtkSpinButton *spin,
|
||||||
@ -475,7 +518,7 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
|
|||||||
*
|
*
|
||||||
* return TRUE;
|
* return TRUE;
|
||||||
* }
|
* }
|
||||||
* ]|
|
* ```
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if the value has been displayed
|
* Returns: %TRUE if the value has been displayed
|
||||||
*/
|
*/
|
||||||
@ -492,8 +535,9 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
|
|||||||
* GtkSpinButton::value-changed:
|
* GtkSpinButton::value-changed:
|
||||||
* @spin_button: the object on which the signal was emitted
|
* @spin_button: the object on which the signal was emitted
|
||||||
*
|
*
|
||||||
* The ::value-changed signal is emitted when the value represented by
|
* Emitted when the value is changed.
|
||||||
* @spinbutton changes. Also see the #GtkSpinButton::output signal.
|
*
|
||||||
|
* Also see the [signal@Gtk.SpinButton::output] signal.
|
||||||
*/
|
*/
|
||||||
spinbutton_signals[VALUE_CHANGED] =
|
spinbutton_signals[VALUE_CHANGED] =
|
||||||
g_signal_new (I_("value-changed"),
|
g_signal_new (I_("value-changed"),
|
||||||
@ -508,8 +552,8 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
|
|||||||
* GtkSpinButton::wrapped:
|
* GtkSpinButton::wrapped:
|
||||||
* @spin_button: the object on which the signal was emitted
|
* @spin_button: the object on which the signal was emitted
|
||||||
*
|
*
|
||||||
* The ::wrapped signal is emitted right after the spinbutton wraps
|
* Emitted right after the spinbutton wraps from its maximum
|
||||||
* from its maximum to minimum value or vice-versa.
|
* to its minimum value or vice-versa.
|
||||||
*/
|
*/
|
||||||
spinbutton_signals[WRAPPED] =
|
spinbutton_signals[WRAPPED] =
|
||||||
g_signal_new (I_("wrapped"),
|
g_signal_new (I_("wrapped"),
|
||||||
@ -526,14 +570,15 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
|
|||||||
* @spin_button: the object on which the signal was emitted
|
* @spin_button: the object on which the signal was emitted
|
||||||
* @scroll: a #GtkScrollType to specify the speed and amount of change
|
* @scroll: a #GtkScrollType to specify the speed and amount of change
|
||||||
*
|
*
|
||||||
* The ::change-value signal is a [keybinding signal][GtkSignalAction]
|
* Emitted when the user initiates a value change.
|
||||||
* which gets emitted when the user initiates a value change.
|
|
||||||
*
|
*
|
||||||
* Applications should not connect to it, but may emit it with
|
* This is a [keybinding signal](class.SignalAction.html).
|
||||||
|
*
|
||||||
|
* Applications should not connect to it, but may emit it with
|
||||||
* g_signal_emit_by_name() if they need to control the cursor
|
* g_signal_emit_by_name() if they need to control the cursor
|
||||||
* programmatically.
|
* programmatically.
|
||||||
*
|
*
|
||||||
* The default bindings for this signal are Up/Down and PageUp and/PageDown.
|
* The default bindings for this signal are Up/Down and PageUp/PageDown.
|
||||||
*/
|
*/
|
||||||
spinbutton_signals[CHANGE_VALUE] =
|
spinbutton_signals[CHANGE_VALUE] =
|
||||||
g_signal_new (I_("change-value"),
|
g_signal_new (I_("change-value"),
|
||||||
@ -1654,14 +1699,16 @@ gtk_spin_button_default_output (GtkSpinButton *spin_button)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_configure:
|
* gtk_spin_button_configure:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
* @adjustment: (nullable): a #GtkAdjustment to replace the spin button’s
|
* @adjustment: (nullable): a `GtkAdjustment` to replace the spin button’s
|
||||||
* existing adjustment, or %NULL to leave its current adjustment unchanged
|
* existing adjustment, or %NULL to leave its current adjustment unchanged
|
||||||
* @climb_rate: the new climb rate
|
* @climb_rate: the new climb rate
|
||||||
* @digits: the number of decimal places to display in the spin button
|
* @digits: the number of decimal places to display in the spin button
|
||||||
*
|
*
|
||||||
* Changes the properties of an existing spin button. The adjustment,
|
* Changes the properties of an existing spin button.
|
||||||
* climb rate, and number of decimal places are updated accordingly.
|
*
|
||||||
|
* The adjustment, climb rate, and number of decimal places
|
||||||
|
* are updated accordingly.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_spin_button_configure (GtkSpinButton *spin_button,
|
gtk_spin_button_configure (GtkSpinButton *spin_button,
|
||||||
@ -1721,15 +1768,15 @@ gtk_spin_button_configure (GtkSpinButton *spin_button,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_new:
|
* gtk_spin_button_new:
|
||||||
* @adjustment: (allow-none): the #GtkAdjustment object that this spin
|
* @adjustment: (allow-none): the `GtkAdjustment` that this spin
|
||||||
* button should use, or %NULL
|
* button should use, or %NULL
|
||||||
* @climb_rate: specifies by how much the rate of change in the value will
|
* @climb_rate: specifies by how much the rate of change in the value will
|
||||||
* accelerate if you continue to hold down an up/down button or arrow key
|
* accelerate if you continue to hold down an up/down button or arrow key
|
||||||
* @digits: the number of decimal places to display
|
* @digits: the number of decimal places to display
|
||||||
*
|
*
|
||||||
* Creates a new #GtkSpinButton.
|
* Creates a new `GtkSpinButton`.
|
||||||
*
|
*
|
||||||
* Returns: The new spin button as a #GtkWidget
|
* Returns: The new `GtkSpinButton`
|
||||||
*/
|
*/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gtk_spin_button_new (GtkAdjustment *adjustment,
|
gtk_spin_button_new (GtkAdjustment *adjustment,
|
||||||
@ -1754,17 +1801,21 @@ gtk_spin_button_new (GtkAdjustment *adjustment,
|
|||||||
* @max: Maximum allowable value
|
* @max: Maximum allowable value
|
||||||
* @step: Increment added or subtracted by spinning the widget
|
* @step: Increment added or subtracted by spinning the widget
|
||||||
*
|
*
|
||||||
* This is a convenience constructor that allows creation of a numeric
|
* Creates a new `GtkSpinButton` with the given properties.
|
||||||
* #GtkSpinButton without manually creating an adjustment. The value is
|
*
|
||||||
* initially set to the minimum value and a page increment of 10 * @step
|
* This is a convenience constructor that allows creation
|
||||||
* is the default. The precision of the spin button is equivalent to the
|
* of a numeric `GtkSpinButton` 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 button is equivalent to the
|
||||||
* precision of @step.
|
* precision of @step.
|
||||||
*
|
*
|
||||||
* Note that the way in which the precision is derived works best if @step
|
* Note that the way in which the precision is derived works
|
||||||
* is a power of ten. If the resulting precision is not suitable for your
|
* best if @step is a power of ten. If the resulting precision
|
||||||
* needs, use gtk_spin_button_set_digits() to correct it.
|
* is not suitable for your needs, use
|
||||||
|
* [method@Gtk.SpinButton.set_digits] to correct it.
|
||||||
*
|
*
|
||||||
* Returns: The new spin button as a #GtkWidget
|
* Returns: The new `GtkSpinButton`
|
||||||
*/
|
*/
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
gtk_spin_button_new_with_range (double min,
|
gtk_spin_button_new_with_range (double min,
|
||||||
@ -1799,10 +1850,10 @@ gtk_spin_button_new_with_range (double min,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_set_adjustment:
|
* gtk_spin_button_set_adjustment:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
* @adjustment: a #GtkAdjustment to replace the existing adjustment
|
* @adjustment: a `GtkAdjustment` to replace the existing adjustment
|
||||||
*
|
*
|
||||||
* Replaces the #GtkAdjustment associated with @spin_button.
|
* Replaces the `GtkAdjustment` associated with @spin_button.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_spin_button_set_adjustment (GtkSpinButton *spin_button,
|
gtk_spin_button_set_adjustment (GtkSpinButton *spin_button,
|
||||||
@ -1821,11 +1872,11 @@ gtk_spin_button_set_adjustment (GtkSpinButton *spin_button,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_get_adjustment:
|
* gtk_spin_button_get_adjustment:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
*
|
*
|
||||||
* Get the adjustment associated with a #GtkSpinButton
|
* Get the adjustment associated with a `GtkSpinButton`.
|
||||||
*
|
*
|
||||||
* Returns: (transfer none): the #GtkAdjustment of @spin_button
|
* Returns: (transfer none): the `GtkAdjustment` of @spin_button
|
||||||
**/
|
**/
|
||||||
GtkAdjustment *
|
GtkAdjustment *
|
||||||
gtk_spin_button_get_adjustment (GtkSpinButton *spin_button)
|
gtk_spin_button_get_adjustment (GtkSpinButton *spin_button)
|
||||||
@ -1837,12 +1888,14 @@ gtk_spin_button_get_adjustment (GtkSpinButton *spin_button)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_set_digits:
|
* gtk_spin_button_set_digits:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
* @digits: the number of digits after the decimal point to be displayed for the spin button’s value
|
* @digits: the number of digits after the decimal point to be
|
||||||
|
* displayed for the spin button’s value
|
||||||
*
|
*
|
||||||
* Set the precision to be displayed by @spin_button. Up to 20 digit precision
|
* Set the precision to be displayed by @spin_button.
|
||||||
* is allowed.
|
*
|
||||||
**/
|
* Up to 20 digit precision is allowed.
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
gtk_spin_button_set_digits (GtkSpinButton *spin_button,
|
gtk_spin_button_set_digits (GtkSpinButton *spin_button,
|
||||||
guint digits)
|
guint digits)
|
||||||
@ -1862,9 +1915,11 @@ gtk_spin_button_set_digits (GtkSpinButton *spin_button,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_get_digits:
|
* gtk_spin_button_get_digits:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
*
|
*
|
||||||
* Fetches the precision of @spin_button. See gtk_spin_button_set_digits().
|
* Fetches the precision of @spin_button.
|
||||||
|
*
|
||||||
|
* See [method@Gtk.SpinButton.set_digits].
|
||||||
*
|
*
|
||||||
* Returns: the current precision
|
* Returns: the current precision
|
||||||
**/
|
**/
|
||||||
@ -1878,13 +1933,15 @@ gtk_spin_button_get_digits (GtkSpinButton *spin_button)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_set_increments:
|
* gtk_spin_button_set_increments:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
* @step: increment applied for a button 1 press.
|
* @step: increment applied for a button 1 press.
|
||||||
* @page: increment applied for a button 2 press.
|
* @page: increment applied for a button 2 press.
|
||||||
*
|
*
|
||||||
* Sets the step and page increments for spin_button. This affects how
|
* Sets the step and page increments for spin_button.
|
||||||
* quickly the value changes when the spin button’s arrows are activated.
|
*
|
||||||
**/
|
* This affects how quickly the value changes when
|
||||||
|
* the spin button’s arrows are activated.
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
gtk_spin_button_set_increments (GtkSpinButton *spin_button,
|
gtk_spin_button_set_increments (GtkSpinButton *spin_button,
|
||||||
double step,
|
double step,
|
||||||
@ -1903,13 +1960,15 @@ gtk_spin_button_set_increments (GtkSpinButton *spin_button,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_get_increments:
|
* gtk_spin_button_get_increments:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
* @step: (out) (allow-none): location to store step increment, or %NULL
|
* @step: (out) (allow-none): location to store step increment, or %NULL
|
||||||
* @page: (out) (allow-none): location to store page increment, or %NULL
|
* @page: (out) (allow-none): location to store page increment, or %NULL
|
||||||
*
|
*
|
||||||
* Gets the current step and page the increments used by @spin_button. See
|
* Gets the current step and page the increments
|
||||||
* gtk_spin_button_set_increments().
|
* used by @spin_button.
|
||||||
**/
|
*
|
||||||
|
* See [method@Gtk.SpinButton.set_increments].
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
gtk_spin_button_get_increments (GtkSpinButton *spin_button,
|
gtk_spin_button_get_increments (GtkSpinButton *spin_button,
|
||||||
double *step,
|
double *step,
|
||||||
@ -1925,7 +1984,7 @@ gtk_spin_button_get_increments (GtkSpinButton *spin_button,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_set_range:
|
* gtk_spin_button_set_range:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
* @min: minimum allowable value
|
* @min: minimum allowable value
|
||||||
* @max: maximum allowable value
|
* @max: maximum allowable value
|
||||||
*
|
*
|
||||||
@ -1956,12 +2015,13 @@ gtk_spin_button_set_range (GtkSpinButton *spin_button,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_get_range:
|
* gtk_spin_button_get_range:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
* @min: (out) (optional): location to store minimum allowed value, or %NULL
|
* @min: (out) (optional): location to store minimum allowed value, or %NULL
|
||||||
* @max: (out) (optional): location to store maximum allowed value, or %NULL
|
* @max: (out) (optional): location to store maximum allowed value, or %NULL
|
||||||
*
|
*
|
||||||
* Gets the range allowed for @spin_button.
|
* Gets the range allowed for @spin_button.
|
||||||
* See gtk_spin_button_set_range().
|
*
|
||||||
|
* See [method@Gtk.SpinButton.set_range].
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_spin_button_get_range (GtkSpinButton *spin_button,
|
gtk_spin_button_get_range (GtkSpinButton *spin_button,
|
||||||
@ -1978,7 +2038,7 @@ gtk_spin_button_get_range (GtkSpinButton *spin_button,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_get_value:
|
* gtk_spin_button_get_value:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
*
|
*
|
||||||
* Get the value in the @spin_button.
|
* Get the value in the @spin_button.
|
||||||
*
|
*
|
||||||
@ -1994,7 +2054,7 @@ gtk_spin_button_get_value (GtkSpinButton *spin_button)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_get_value_as_int:
|
* gtk_spin_button_get_value_as_int:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
*
|
*
|
||||||
* Get the value @spin_button represented as an integer.
|
* Get the value @spin_button represented as an integer.
|
||||||
*
|
*
|
||||||
@ -2016,7 +2076,7 @@ gtk_spin_button_get_value_as_int (GtkSpinButton *spin_button)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_set_value:
|
* gtk_spin_button_set_value:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
* @value: the new value
|
* @value: the new value
|
||||||
*
|
*
|
||||||
* Sets the value of @spin_button.
|
* Sets the value of @spin_button.
|
||||||
@ -2040,12 +2100,13 @@ gtk_spin_button_set_value (GtkSpinButton *spin_button,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_set_update_policy:
|
* gtk_spin_button_set_update_policy:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
* @policy: a #GtkSpinButtonUpdatePolicy value
|
* @policy: a `GtkSpinButtonUpdatePolicy` value
|
||||||
*
|
*
|
||||||
* Sets the update behavior of a spin button.
|
* Sets the update behavior of a spin button.
|
||||||
* This determines whether the spin button is always updated
|
*
|
||||||
* or only when a valid value is set.
|
* This determines whether the spin button is always
|
||||||
|
* updated or only when a valid value is set.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_spin_button_set_update_policy (GtkSpinButton *spin_button,
|
gtk_spin_button_set_update_policy (GtkSpinButton *spin_button,
|
||||||
@ -2062,10 +2123,11 @@ gtk_spin_button_set_update_policy (GtkSpinButton *spin_button,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_get_update_policy:
|
* gtk_spin_button_get_update_policy:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
*
|
*
|
||||||
* Gets the update behavior of a spin button.
|
* Gets the update behavior of a spin button.
|
||||||
* See gtk_spin_button_set_update_policy().
|
*
|
||||||
|
* See [method@Gtk.SpinButton.set_update_policy].
|
||||||
*
|
*
|
||||||
* Returns: the current update policy
|
* Returns: the current update policy
|
||||||
*/
|
*/
|
||||||
@ -2079,7 +2141,7 @@ gtk_spin_button_get_update_policy (GtkSpinButton *spin_button)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_set_numeric:
|
* gtk_spin_button_set_numeric:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
* @numeric: flag indicating if only numeric entry is allowed
|
* @numeric: flag indicating if only numeric entry is allowed
|
||||||
*
|
*
|
||||||
* Sets the flag that determines if non-numeric text can be typed
|
* Sets the flag that determines if non-numeric text can be typed
|
||||||
@ -2102,10 +2164,11 @@ gtk_spin_button_set_numeric (GtkSpinButton *spin_button,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_get_numeric:
|
* gtk_spin_button_get_numeric:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
*
|
*
|
||||||
* Returns whether non-numeric text can be typed into the spin button.
|
* Returns whether non-numeric text can be typed into the spin button.
|
||||||
* See gtk_spin_button_set_numeric().
|
*
|
||||||
|
* See [method@Gtk.SpinButton.set_numeric].
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if only numeric text can be entered
|
* Returns: %TRUE if only numeric text can be entered
|
||||||
*/
|
*/
|
||||||
@ -2119,7 +2182,7 @@ gtk_spin_button_get_numeric (GtkSpinButton *spin_button)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_set_wrap:
|
* gtk_spin_button_set_wrap:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
* @wrap: a flag indicating if wrapping behavior is performed
|
* @wrap: a flag indicating if wrapping behavior is performed
|
||||||
*
|
*
|
||||||
* Sets the flag that determines if a spin button value wraps
|
* Sets the flag that determines if a spin button value wraps
|
||||||
@ -2145,11 +2208,13 @@ gtk_spin_button_set_wrap (GtkSpinButton *spin_button,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_get_wrap:
|
* gtk_spin_button_get_wrap:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
*
|
*
|
||||||
* Returns whether the spin button’s value wraps around to the
|
* Returns whether the spin button’s value wraps around to the
|
||||||
* opposite limit when the upper or lower limit of the range is
|
* opposite limit when the upper or lower limit of the range is
|
||||||
* exceeded. See gtk_spin_button_set_wrap().
|
* exceeded.
|
||||||
|
*
|
||||||
|
* See [method@Gtk.SpinButton.set_wrap].
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if the spin button wraps around
|
* Returns: %TRUE if the spin button wraps around
|
||||||
*/
|
*/
|
||||||
@ -2163,7 +2228,7 @@ gtk_spin_button_get_wrap (GtkSpinButton *spin_button)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_set_snap_to_ticks:
|
* gtk_spin_button_set_snap_to_ticks:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
* @snap_to_ticks: a flag indicating if invalid values should be corrected
|
* @snap_to_ticks: a flag indicating if invalid values should be corrected
|
||||||
*
|
*
|
||||||
* Sets the policy as to whether values are corrected to the
|
* Sets the policy as to whether values are corrected to the
|
||||||
@ -2192,10 +2257,11 @@ gtk_spin_button_set_snap_to_ticks (GtkSpinButton *spin_button,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_get_snap_to_ticks:
|
* gtk_spin_button_get_snap_to_ticks:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
*
|
*
|
||||||
* Returns whether the values are corrected to the nearest step.
|
* Returns whether the values are corrected to the nearest step.
|
||||||
* See gtk_spin_button_set_snap_to_ticks().
|
*
|
||||||
|
* See [method@Gtk.SpinButton.set_snap_to_ticks].
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if values are snapped to the nearest step
|
* Returns: %TRUE if values are snapped to the nearest step
|
||||||
*/
|
*/
|
||||||
@ -2209,7 +2275,7 @@ gtk_spin_button_get_snap_to_ticks (GtkSpinButton *spin_button)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_set_climb_rate:
|
* gtk_spin_button_set_climb_rate:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
* @climb_rate: the rate of acceleration, must be >= 0
|
* @climb_rate: the rate of acceleration, must be >= 0
|
||||||
*
|
*
|
||||||
* Sets the acceleration rate for repeated changes when you
|
* Sets the acceleration rate for repeated changes when you
|
||||||
@ -2232,7 +2298,7 @@ gtk_spin_button_set_climb_rate (GtkSpinButton *spin_button,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_get_climb_rate:
|
* gtk_spin_button_get_climb_rate:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
*
|
*
|
||||||
* Returns the acceleration rate for repeated changes.
|
* Returns the acceleration rate for repeated changes.
|
||||||
*
|
*
|
||||||
@ -2248,8 +2314,8 @@ gtk_spin_button_get_climb_rate (GtkSpinButton *spin_button)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_spin:
|
* gtk_spin_button_spin:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
* @direction: a #GtkSpinType indicating the direction to spin
|
* @direction: a `GtkSpinType` indicating the direction to spin
|
||||||
* @increment: step increment to apply in the specified direction
|
* @increment: step increment to apply in the specified direction
|
||||||
*
|
*
|
||||||
* Increment or decrement a spin button’s value in a specified
|
* Increment or decrement a spin button’s value in a specified
|
||||||
@ -2326,7 +2392,7 @@ gtk_spin_button_spin (GtkSpinButton *spin_button,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_spin_button_update:
|
* gtk_spin_button_update:
|
||||||
* @spin_button: a #GtkSpinButton
|
* @spin_button: a `GtkSpinButton`
|
||||||
*
|
*
|
||||||
* Manually force an update of the spin button.
|
* Manually force an update of the spin button.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user