GtkSpinButton
<!-- ##### SECTION Short_Description ##### -->
-retrieve an integer or floating-point number from the user.
+Retrieve an integer or floating-point number from the user
<!-- ##### SECTION Long_Description ##### -->
<para>
-A #GtkSpinButton is an ideal way to allow the user to set the value of some attribute. 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 typed in, with the bonus that it can be checked to ensure it is in a given range.
+A #GtkSpinButton is an ideal way to allow the user to set the value of some
+attribute. 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 typed in, with the bonus
+that it can be checked to ensure it is in a given range.
</para>
<para>
-The main properties of a #GtkSpinButton are through a #GtkAdjustment. See the #GtkAdjustment section for more details about an adjustment's properties.
+The main properties of a #GtkSpinButton are through a #GtkAdjustment. See the
+#GtkAdjustment section for more details about an adjustment's properties.
</para>
<para>
<example>
-<title>Using a GtkSpinButton to get an integer.</title>
+<title>Using a <structname>GtkSpinButton</structname> to get an integer.</title>
<programlisting>
/* Provides a function to retrieve an integer value from a GtkSpinButton
return gtk_spin_button_get_value_as_int (a_spinner);
}
-void create_integer_spin_button(void) {
+void create_integer_spin_button (void) {
GtkWidget *window, *spinner;
GtkAdjustment *spinner_adj;
- spinner_adj = (GtkAdjustment *) gtk_adjustment_new(50.0, 0.0, 100.0, 1.0, 5.0, 5.0);
+ spinner_adj = (GtkAdjustment *) gtk_adjustment_new (50.0, 0.0, 100.0, 1.0, 5.0, 5.0);
- window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_set_border_width (GTK_CONTAINER (window), 5);
/* creates the spinner, with no decimal places */
spinner = gtk_spin_button_new (spinner_adj, 1.0, 0);
- gtk_container_add (GTK_CONTAINER(window), spinner);
+ gtk_container_add (GTK_CONTAINER (window), spinner);
gtk_widget_show_all (window);
return;
<para>
<example>
-<title>Using a GtkSpinButton to get a floating point value.</title>
+<title>Using a <structname>GtkSpinButton</structname> to get a floating point value.</title>
<programlisting>
/* Provides a function to retrieve a floating point value from a
*/
gfloat grab_int_value (GtkSpinButton *a_spinner, gpointer user_data) {
- return gtk_spin_button_get_value_as_float (a_spinner);
+ return gtk_spin_button_get_value (a_spinner);
}
-void create_floating_spin_button(void) {
+void create_floating_spin_button (void) {
GtkWidget *window, *spinner;
GtkAdjustment *spinner_adj;
- spinner_adj = (GtkAdjustment *) gtk_adjustment_new(2.500, 0.0, 5.0, 0.001, 0.1, 0.1);
+ spinner_adj = (GtkAdjustment *) gtk_adjustment_new (2.500, 0.0, 5.0, 0.001, 0.1, 0.1);
- window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_set_border_width (GTK_CONTAINER (window), 5);
/* creates the spinner, with three decimal places */
spinner = gtk_spin_button_new (spinner_adj, 0.001, 3);
- gtk_container_add (GTK_CONTAINER(window), spinner);
+ gtk_container_add (GTK_CONTAINER (window), spinner);
gtk_widget_show_all (window);
return;
</variablelist>
</para>
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
<!-- ##### STRUCT GtkSpinButton ##### -->
<para>
-<structfield>entry</structfield> is the #GtkEntry part of the #GtkSpinButton widget, and can be used accordingly. All other fields contain private data and should only be modified using the functions below.
+<structfield>entry</structfield> is the #GtkEntry part of the #GtkSpinButton
+widget, and can be used accordingly. All other fields contain private data
+and should only be modified using the functions below.
+</para>
+
+
+<!-- ##### SIGNAL GtkSpinButton::change-value ##### -->
+<para>
+
+</para>
+
+@spinbutton: the object which received the signal.
+@arg1:
+
+<!-- ##### SIGNAL GtkSpinButton::input ##### -->
+<para>
+
+</para>
+
+@spinbutton: the object which received the signal.
+@arg1:
+@Returns:
+
+<!-- ##### SIGNAL GtkSpinButton::output ##### -->
+<para>
+
</para>
+@spinbutton: the object which received the signal.
+@Returns:
+
+<!-- ##### SIGNAL GtkSpinButton::value-changed ##### -->
+<para>
+
+</para>
+
+@spinbutton: the object which received the signal.
+
+<!-- ##### SIGNAL GtkSpinButton::wrapped ##### -->
+<para>
+
+</para>
+
+@spinbutton: the object which received the signal.
+
+<!-- ##### ARG GtkSpinButton:adjustment ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkSpinButton:climb-rate ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkSpinButton:digits ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkSpinButton:numeric ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkSpinButton:snap-to-ticks ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkSpinButton:update-policy ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkSpinButton:value ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkSpinButton:wrap ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GtkSpinButton:shadow-type ##### -->
+<para>
+the type of border that surrounds the arrows of a spin button.
+</para>
<!-- ##### ENUM GtkSpinButtonUpdatePolicy ##### -->
<para>
-<informaltable pgwide=1 frame="none" role="enum">
-<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
+<informaltable pgwide="1" frame="none" role="enum">
+<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
<tbody>
<row>
<entry>GTK_UPDATE_ALWAYS</entry>
<!-- ##### ENUM GtkSpinType ##### -->
<para>
-<informaltable pgwide=1 frame="none" role="struct">
-<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
+<informaltable pgwide="1" frame="none" role="struct">
+<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
<tbody>
<row>
<entry>GTK_SPIN_STEP_FORWARD,
<row>
<entry>GTK_SPIN_HOME,
GTK_SPIN_END</entry>
-<entry>These set the spin button's value to the minimum or maxmimum possible values, (set by it's #GtkAdjustment), respectively.</entry>
+<entry>These set the spin button's value to the minimum or maxmimum possible values, (set by its #GtkAdjustment), respectively.</entry>
</row>
<row>
<entry>GTK_SPIN_USER_DEFINED</entry>
<!-- ##### FUNCTION gtk_spin_button_configure ##### -->
<para>
-Changes the properties of an existing spin button. The adjustment, climb rate, and number of decimal places are all changed accordingly, after this function call.
+
</para>
-@spin_button: a #GtkSpinButton.
-@adjustment: a #GtkAdjustment.
-@climb_rate: the new climb rate.
-@digits: the number of decimal places to display in the spin button.
+@spin_button:
+@adjustment:
+@climb_rate:
+@digits:
<!-- ##### FUNCTION gtk_spin_button_new ##### -->
@max:
-<!-- ##### MACRO gtk_spin_button_get_value_as_float ##### -->
-<para>
-Gets the value in the @spin_button. This function is deprecated,
-use gtk_spin_button_get_value() instead.
-</para>
-
-@Returns: the value of @spin_button.
-<!-- # Unused Parameters # -->
-@spin_button: a #GtkSpinButton.
-
-
<!-- ##### FUNCTION gtk_spin_button_get_value_as_int ##### -->
<para>
-<!-- ##### SIGNAL GtkSpinButton::input ##### -->
-<para>
-
-</para>
-
-@spinbutton: the object which received the signal.
-@arg1:
-@Returns:
-
-<!-- ##### SIGNAL GtkSpinButton::output ##### -->
-<para>
-
-</para>
-
-@spinbutton: the object which received the signal.
-@Returns:
-
-<!-- ##### SIGNAL GtkSpinButton::value-changed ##### -->
-<para>
-
-</para>
-
-@spinbutton: the object which received the signal.
-
-<!-- ##### ARG GtkSpinButton:adjustment ##### -->
-<para>
-the #GtkAdjustment that defines a spin button's main properties.
-</para>
-
-<!-- ##### ARG GtkSpinButton:climb-rate ##### -->
-<para>
-the amount a spin button changes when an arrow is clicked.
-</para>
-
-<!-- ##### ARG GtkSpinButton:digits ##### -->
-<para>
-the number of decimal places to display.
-</para>
-
-<!-- ##### ARG GtkSpinButton:snap-to-ticks ##### -->
-<para>
-whether erroneous values are automatically changed to a spin button's nearest step increment.
-</para>
-
-<!-- ##### ARG GtkSpinButton:numeric ##### -->
-<para>
-whether non-numeric characters should be ignored.
-</para>
-
-<!-- ##### ARG GtkSpinButton:wrap ##### -->
-<para>
-whether a spin button should wrap upon reaching its limits.
-</para>
-
-<!-- ##### ARG GtkSpinButton:update-policy ##### -->
-<para>
-how a spin button should be updated.
-</para>
-
-<!-- ##### ARG GtkSpinButton:value ##### -->
-<para>
-reads the current value, or sets a new value.
-</para>
-