GtkRadioButton             package:RGtk2             R Documentation

_G_t_k_R_a_d_i_o_B_u_t_t_o_n

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

     A choice from multiple check buttons

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

     'gtkRadioButtonNew(group = NULL, show = TRUE)'
      'gtkRadioButtonNewFromWidget(group = NULL, show = TRUE)'
      'gtkRadioButtonNewWithLabel(group = NULL, label, show = TRUE)'
      'gtkRadioButtonNewWithLabelFromWidget(group = NULL, label, show =
     TRUE)'
      'gtkRadioButtonNewWithMnemonic(group, label, show = TRUE)'
      'gtkRadioButtonNewWithMnemonicFromWidget(group = NULL, label,
     show = TRUE)'
      'gtkRadioButtonSetGroup(object, group)'
      'gtkRadioButtonGetGroup(object)'
      'gtkRadioButton(group = NULL, label, show = TRUE)'

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

     GObject
        +----GInitiallyUnowned
              +----GtkObject
                    +----GtkWidget
                          +----GtkContainer
                                +----GtkBin
                                      +----GtkButton
                                            +----GtkToggleButton
                                                  +----GtkCheckButton

     +----GtkRadioButton 

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

     GtkRadioButton implements AtkImplementorIface and  'GtkBuildable'.

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

     A single radio button performs the same basic function as a
     'GtkCheckButton', as its position in the object hierarchy
     reflects. It is only when multiple radio buttons are grouped
     together that they become a different user interface component in
     their own right.   Every radio button is a member of some group of
     radio buttons. When one is selected, all other radio buttons in
     the same group are deselected. A 'GtkRadioButton' is one way of
     giving the user a choice from many options.

     Radio button widgets are created with 'gtkRadioButtonNew', passing
     NULL as the argument if this is the first radio button in a group.
     In subsequent calls, the group you wish to add this button to
     should be passed as an argument. Optionally,
     'gtkRadioButtonNewWithLabel' can be used if you want a text label
     on the radio button.

     Alternatively, when adding widgets to an existing group of radio
     buttons, use 'gtkRadioButtonNewFromWidget' with a 'GtkRadioButton'
     that already has a group assigned to it. The convenience function
     'gtkRadioButtonNewWithLabelFromWidget' is also provided.

     To retrieve the group a 'GtkRadioButton' is assigned to, use
     'gtkRadioButtonGetGroup'.

     To remove a 'GtkRadioButton' from one group and make it part of a
     new one, use 'gtkRadioButtonSetGroup'.

     The group list does not need to be freed, as each 'GtkRadioButton'
     will remove itself and its list item when it is destroyed.

     _How to create a group of two radio buttons._


     # Creating two radio buttons
     create_radio_buttons <- function() {

       window <- gtkWindow("toplevel", show = F)
       box <- gtkVBoxNew(TRUE, 2)

       ## Create a radio button with a GtkEntry widget 
       radio1 <- gtkRadioButton()
       entry <- gtkEntry()
       radio1$add(entry)

       ## Create a radio button with a label
       radio2 <- gtkRadioButtonNewWithLabelFromWidget(radio1,
                                                      "I'm the second
     radio button.")

       ## Pack them into a box, then show all the widgets
       box$packStart(radio1, TRUE, TRUE, 2)
       box$packStart(radio2, TRUE, TRUE, 2)
       window$add(box)
       window$showAll()
     }
      When an unselected button in the group is clicked the clicked
     button receives the "toggled" signal, as does the previously
     selected button. Inside the "toggled" handler,
     'gtkToggleButtonGetActive' can be used  to determine if the button
     has been selected or deselected.

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


     '_G_t_k_R_a_d_i_o_B_u_t_t_o_n' Contains only private data that should be read
          and manipulated 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:

     'gtkRadioButton' is the result of collapsing the constructors of
     'GtkRadioButton' ('gtkRadioButtonNew',
     'gtkRadioButtonNewFromWidget', 'gtkRadioButtonNewWithLabel',
     'gtkRadioButtonNewWithLabelFromWidget',
     'gtkRadioButtonNewWithMnemonic',
     'gtkRadioButtonNewWithMnemonicFromWidget') and accepts a subset of
     its arguments matching the required arguments of one of its
     delegate constructors.

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


     '_g_r_o_u_p-_c_h_a_n_g_e_d(_s_t_y_l_e, _u_s_e_r._d_a_t_a)' Emitted when the group of radio
          buttons that a radio button belongs to changes. This is
          emitted when a radio button switches from being alone to
          being part of a group of 2 or more buttons, or vice-versa,
          and when a button is moved from one group of 2 or more
          buttons to a different one, but not when the composition of
          the group that a button belongs to changes.  

          Since  2.4

          '_s_t_y_l_e' ['GtkRadioButton']  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:


     '_g_r_o_u_p' ['_G_t_k_R_a_d_i_o_B_u_t_t_o_n' : _W_r_i_t_e] Sets a new group for a radio
          button.


_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/GtkRadioButton.html>

