GtkToggleButton            package:RGtk2            R Documentation

_G_t_k_T_o_g_g_l_e_B_u_t_t_o_n

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

     Create buttons which retain their state

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

     'gtkToggleButtonNew(show = TRUE)'
      'gtkToggleButtonNewWithLabel(label, show = TRUE)'
      'gtkToggleButtonNewWithMnemonic(label, show = TRUE)'
      'gtkToggleButtonSetMode(object, draw.indicator)'
      'gtkToggleButtonGetMode(object)'
      'gtkToggleButtonToggled(object)'
      'gtkToggleButtonGetActive(object)'
      'gtkToggleButtonSetActive(object, is.active)'
      'gtkToggleButtonGetInconsistent(object)'
      'gtkToggleButtonSetInconsistent(object, setting)'
      'gtkToggleButton(label, show = TRUE)'

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

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

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

     GtkToggleButton implements AtkImplementorIface and 
     'GtkBuildable'.

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

     A 'GtkToggleButton' is a 'GtkButton' which will remain
     'pressed-in' when clicked. Clicking again will cause the toggle
     button to return to its normal state.

     A toggle button is created by calling either 'gtkToggleButtonNew'
     or 'gtkToggleButtonNewWithLabel'. If using the former, it is
     advisable to pack a widget, (such as a 'GtkLabel' and/or a
     'GtkPixmap'), into the toggle button's container. (See 'GtkButton'
     for more information).

     The state of a 'GtkToggleButton' can be set specifically using
     'gtkToggleButtonSetActive', and retrieved using
     'gtkToggleButtonGetActive'.

     To simply switch the state of a toggle button, use
     gtk_toggle_button_toggled.

     _Creating two   'GtkToggleButton'   widgets._


     # Let's make two toggle buttons
     make_toggles <- function() {
       dialog <- gtkDialog(show = F)
       toggle1 <- gtkToggleButton("Hi, i'm a toggle button.")

       ## Makes this toggle button invisible
       toggle1$setMode(TRUE)

       gSignalConnect(toggle1, "toggled", output_state)
       dialog[["actionArea"]]$packStart(toggle1, FALSE, FALSE, 2)

       toggle2 <- gtkToggleButton("Hi, i'm another button.")
       toggle2$setMode(FALSE)
       gSignalConnect(toggle2, "toggled", output_state)
       dialog[["actionArea"]]$packStart(toggle2, FALSE, FALSE, 2)

       dialog$showAll()
     }


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


     '_G_t_k_T_o_g_g_l_e_B_u_t_t_o_n' The 'GtkToggleButton' struct contains private
          data only, and should be manipulated using the functions
          below.

          '_d_r_a_w_I_n_d_i_c_a_t_o_r' [logical] 


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

     'gtkToggleButton' is the result of collapsing the constructors of
     'GtkToggleButton' ('gtkToggleButtonNew',
     'gtkToggleButtonNewWithLabel', 'gtkToggleButtonNewWithMnemonic')
     and accepts a subset of its arguments matching the required
     arguments of one of its delegate constructors.

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


     '_t_o_g_g_l_e_d(_t_o_g_g_l_e_b_u_t_t_o_n, _u_s_e_r._d_a_t_a)' Should be connected if you wish
          to perform an action whenever the 'GtkToggleButton''s state
          is changed.

          '_t_o_g_g_l_e_b_u_t_t_o_n' ['GtkToggleButton'] 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_c_t_i_v_e' [_l_o_g_i_c_a_l : _R_e_a_d / _W_r_i_t_e] If the toggle button should be
          pressed in or not.  Default value: FALSE


     '_d_r_a_w-_i_n_d_i_c_a_t_o_r' [_l_o_g_i_c_a_l : _R_e_a_d / _W_r_i_t_e] If the toggle part of
          the button is displayed.  Default value: FALSE


     '_i_n_c_o_n_s_i_s_t_e_n_t' [_l_o_g_i_c_a_l : _R_e_a_d / _W_r_i_t_e] If the toggle button is in
          an "in between" state.  Default value: FALSE


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

