GtkSpinButton             package:RGtk2             R Documentation

_G_t_k_S_p_i_n_B_u_t_t_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Retrieve an integer or floating-point number from the user

_M_e_t_h_o_d_s _a_n_d _F_u_n_c_t_i_o_n_s:

     'gtkSpinButtonConfigure(object, adjustment = NULL, climb.rate,
     digits)'
      'gtkSpinButtonNew(adjustment = NULL, climb.rate = NULL, digits =
     NULL, show = TRUE)'
      'gtkSpinButtonNewWithRange(min, max, step, show = TRUE)'
      'gtkSpinButtonSetAdjustment(object, adjustment)'
      'gtkSpinButtonGetAdjustment(object)'
      'gtkSpinButtonSetDigits(object, digits)'
      'gtkSpinButtonSetIncrements(object, step, page)'
      'gtkSpinButtonSetRange(object, min, max)'
      'gtkSpinButtonGetValueAsInt(object)'
      'gtkSpinButtonSetValue(object, value)'
      'gtkSpinButtonSetUpdatePolicy(object, policy)'
      'gtkSpinButtonSetNumeric(object, numeric)'
      'gtkSpinButtonSpin(object, direction, increment)'
      'gtkSpinButtonSetWrap(object, wrap)'
      'gtkSpinButtonSetSnapToTicks(object, snap.to.ticks)'
      'gtkSpinButtonUpdate(object)'
      'gtkSpinButtonGetDigits(object)'
      'gtkSpinButtonGetIncrements(object)'
      'gtkSpinButtonGetNumeric(object)'
      'gtkSpinButtonGetRange(object)'
      'gtkSpinButtonGetSnapToTicks(object)'
      'gtkSpinButtonGetUpdatePolicy(object)'
      'gtkSpinButtonGetValue(object)'
      'gtkSpinButtonGetWrap(object)'
      'gtkSpinButton(adjustment = NULL, climb.rate = NULL, digits =
     NULL, min, max, step, show = TRUE)'

_H_i_e_r_a_r_c_h_y:

     GObject
        +----GInitiallyUnowned
              +----GtkObject
                    +----GtkWidget
                          +----GtkEntry
                                +----GtkSpinButton 

_I_n_t_e_r_f_a_c_e_s:

     GtkSpinButton implements AtkImplementorIface,  'GtkBuildable', 
     'GtkCellEditable' and  'GtkEditable'.

_D_e_t_a_i_l_e_d _D_e_s_c_r_i_p_t_i_o_n:

     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.

     The main properties of a 'GtkSpinButton' are through a
     'GtkAdjustment'. See the  'GtkAdjustment' section for more details
     about an adjustment's properties.

     _Using a   'GtkSpinButton'   to get an integer._


     ## Provides a function to retrieve an integer value from a
     GtkSpinButton
     ## and creates a spin button to model percentage values.

     grab_int_value <- function(a_spinner, user_data) {
        return(a_spinner$getValueAsInt())
     }

     create_integer_spin_button <- function() {

       spinner_adj <- gtkAdjustment(50.0, 0.0, 100.0, 1.0, 5.0, 5.0)

       window <- gtkWindow("toplevel", show = F)
       window$setBorderWidth(5)

       ## creates the spinner, with no decimal places
       spinner <- gtkSpinner(spinner_adj, 1.0, 0)
       window$add(spinner)

       window$showAll()
     }
      _Using a   'GtkSpinButton'   to get a floating point value._


     # Provides a function to retrieve a floating point value from a
     # GtkSpinButton, and creates a high precision spin button.

     grab_value <- function(a_spinner, user_data) {
        return(a_spinner$getValue())
     }

     create_floating_spin_button <- function() {

       spinner_adj <- gtkAdjustment(2.500, 0.0, 5.0, 0.001, 0.1, 0.1)

       window <- gtkWindow("toplevel", show = F)
       window$setBorderWidth(5)

       ## creates the spinner, with three decimal places
       spinner <- gtkSpinner(spinner_adj, 0.001, 3)
       window$add(spinner)

       window$showAll()
     }


_S_t_r_u_c_t_u_r_e_s:


     '_G_t_k_S_p_i_n_B_u_t_t_o_n' 'entry' 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.


_C_o_n_v_e_n_i_e_n_t _C_o_n_s_t_r_u_c_t_i_o_n:

     'gtkSpinButton' is the result of collapsing the constructors of
     'GtkSpinButton' ('gtkSpinButtonNew', 'gtkSpinButtonNewWithRange')
     and accepts a subset of its arguments matching the required
     arguments of one of its delegate constructors.

_E_n_u_m_s _a_n_d _F_l_a_g_s:


            GTK_UPDATE_ALWAYS    When refreshing your   'GtkSpinButton'  , the value is always displayed.
            GTK_UPDATE_IF_VALID  When refreshing your   'GtkSpinButton'  , the value is only displayed if it is valid within the bounds of the spin button's   'GtkAdjustment'  .


            GTK_SPIN_STEP_FORWARD,  GTK_SPIN_STEP_BACKWARD,  GTK_SPIN_PAGE_FORWARD,  GTK_SPIN_PAGE_BACKWARD  These values spin a   'GtkSpinButton'   by the relevant values of the spin button's   'GtkAdjustment'  .
            GTK_SPIN_HOME,  GTK_SPIN_END                                                                     These set the spin button's value to the minimum or maxmimum possible values, (set by its   'GtkAdjustment'  ), respectively.
            GTK_SPIN_USER_DEFINED                                                                            The programmer must specify the exact amount to spin the   'GtkSpinButton'  .


_S_i_g_n_a_l_s:


     '_c_h_a_n_g_e-_v_a_l_u_e(_s_p_i_n_b_u_t_t_o_n, _a_r_g_1, _u_s_e_r._d_a_t_a)' _undocumented _

          '_s_p_i_n_b_u_t_t_o_n' ['GtkSpinButton'] the object which received the
               signal.

          '_a_r_g_1' ['GtkScrollType'] 

          '_u_s_e_r._d_a_t_a' [R object] user data set when the signal handler
               was connected.


     '_i_n_p_u_t(_s_p_i_n_b_u_t_t_o_n, _a_r_g_1, _u_s_e_r._d_a_t_a)' _undocumented _

          '_s_p_i_n_b_u_t_t_o_n' ['GtkSpinButton'] the object which received the
               signal.

          '_a_r_g_1' [R object] 

          '_u_s_e_r._d_a_t_a' [R object] user data set when the signal handler
               was connected.


     '_o_u_t_p_u_t(_s_p_i_n_b_u_t_t_o_n, _u_s_e_r._d_a_t_a)' _undocumented _

          '_s_p_i_n_b_u_t_t_o_n' ['GtkSpinButton'] the object which received the
               signal.

          '_u_s_e_r._d_a_t_a' [R object] user data set when the signal handler
               was connected.


     '_v_a_l_u_e-_c_h_a_n_g_e_d(_s_p_i_n_b_u_t_t_o_n, _u_s_e_r._d_a_t_a)' _undocumented _

          '_s_p_i_n_b_u_t_t_o_n' ['GtkSpinButton'] the object which received the
               signal.

          '_u_s_e_r._d_a_t_a' [R object] user data set when the signal handler
               was connected.


     '_w_r_a_p_p_e_d(_s_p_i_n_b_u_t_t_o_n, _u_s_e_r._d_a_t_a)' The wrapped signal is emitted
          right after the spinbutton wraps from its maximum to minimum
          value or vice-versa.  

          Since  2.10

          '_s_p_i_n_b_u_t_t_o_n' ['GtkSpinButton']  the object which received the
               signal

          '_u_s_e_r._d_a_t_a' [R object] user data set when the signal handler
               was connected.


_P_r_o_p_e_r_t_i_e_s:


     '_a_d_j_u_s_t_m_e_n_t' ['_G_t_k_A_d_j_u_s_t_m_e_n_t' : _R_e_a_d / _W_r_i_t_e] The adjustment that
          holds the value of the spinbutton.


     '_c_l_i_m_b-_r_a_t_e' [_n_u_m_e_r_i_c : _R_e_a_d / _W_r_i_t_e] The acceleration rate when
          you hold down a button.  Allowed values: >= 0  Default value:
          0


     '_d_i_g_i_t_s' [_n_u_m_e_r_i_c : _R_e_a_d / _W_r_i_t_e] The number of decimal places to
          display.  Allowed values: <= 20  Default value: 0


     '_n_u_m_e_r_i_c' [_l_o_g_i_c_a_l : _R_e_a_d / _W_r_i_t_e] Whether non-numeric characters
          should be ignored.  Default value: FALSE


     '_s_n_a_p-_t_o-_t_i_c_k_s' [_l_o_g_i_c_a_l : _R_e_a_d / _W_r_i_t_e] Whether erroneous values
          are automatically changed to a spin button's nearest step
          increment.  Default value: FALSE


     '_u_p_d_a_t_e-_p_o_l_i_c_y' ['_G_t_k_S_p_i_n_B_u_t_t_o_n_U_p_d_a_t_e_P_o_l_i_c_y' : _R_e_a_d / _W_r_i_t_e] 
          Whether the spin button should update always, or only when
          the value is legal.  Default value: GTK_UPDATE_ALWAYS


     '_v_a_l_u_e' [_n_u_m_e_r_i_c : _R_e_a_d / _W_r_i_t_e] Reads the current value, or sets
          a new value.  Default value: 0


     '_w_r_a_p' [_l_o_g_i_c_a_l : _R_e_a_d / _W_r_i_t_e] Whether a spin button should wrap
          upon reaching its limits.  Default value: FALSE


_S_t_y_l_e _P_r_o_p_e_r_t_i_e_s:


     '_s_h_a_d_o_w-_t_y_p_e' ['_G_t_k_S_h_a_d_o_w_T_y_p_e' : _R_e_a_d] the type of border that
          surrounds the arrows of a spin button. Default value:
          GTK_SHADOW_IN


_A_u_t_h_o_r(_s):

     Derived by RGtkGen from GTK+ documentation

_R_e_f_e_r_e_n_c_e_s:

     <URL:
     http://developer.gnome.org/doc/API/2.0/gtk/GtkSpinButton.html>

