GtkExpander              package:RGtk2              R Documentation

_G_t_k_E_x_p_a_n_d_e_r

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

     A container which can hide its child

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

     'gtkExpanderNew(label = NULL, show = TRUE)'
      'gtkExpanderNewWithMnemonic(label = NULL)'
      'gtkExpanderSetExpanded(object, expanded)'
      'gtkExpanderGetExpanded(object)'
      'gtkExpanderSetSpacing(object, spacing)'
      'gtkExpanderGetSpacing(object)'
      'gtkExpanderSetLabel(object, label = NULL)'
      'gtkExpanderGetLabel(object)'
      'gtkExpanderSetUseUnderline(object, use.underline)'
      'gtkExpanderGetUseUnderline(object)'
      'gtkExpanderSetUseMarkup(object, use.markup)'
      'gtkExpanderGetUseMarkup(object)'
      'gtkExpanderSetLabelWidget(object, label.widget = NULL)'
      'gtkExpanderGetLabelWidget(object)'
      'gtkExpander(label = NULL, show = TRUE)'

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

     GObject
        +----GInitiallyUnowned
              +----GtkObject
                    +----GtkWidget
                          +----GtkContainer
                                +----GtkBin
                                      +----GtkExpander 

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

     GtkExpander implements AtkImplementorIface and  'GtkBuildable'.

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

     A 'GtkExpander' allows the user to hide or show its child by
     clicking  on an expander triangle similar to the triangles used in
     a 'GtkTreeView'.

     Normally you use an expander as you would use any other descendant
     of 'GtkBin'; you create the child widget and use 'gtkContainerAdd'
      to add it to the expander. When the expander is toggled, it will
     take  care of showing and hiding the child automatically.

_S_p_e_c_i_a_l _U_s_a_g_e:

     There are situations in which you may prefer to show and hide the 
     expanded widget yourself, such as when you want to actually create
      the widget at expansion time. In this case, create a
     'GtkExpander'  but do not add a child to it. The expander widget
     has an  'expanded' property which can be used to monitor  its
     expansion state. You should watch this property with a signal 
     connection as follows:

     expander = gtk_expander_new_with_mnemonic ("_More Options");
     g_signal_connect (expander, "notify::expanded",
                       G_CALLBACK (expander_callback), NULL);

     ...

     static void
     expander_callback (GObject    *object,
                        GParamSpec *param_spec,
                        gpointer    user_data)
     {
       GtkExpander *expander;

       expander = GTK_EXPANDER (object);

       if (gtk_expander_get_expanded (expander))
         {
           /* Show or create widgets */
         }
       else
         {
           /* Hide or destroy widgets */
         }
     }


_G_t_k_E_x_p_a_n_d_e_r _a_s _G_t_k_B_u_i_l_d_a_b_l_e:

     The GtkExpander implementation of the GtkBuildable interface 
     supports placing a child in the label position by specifying
     "label" as the "type" attribute of a <child> element. A normal
     content child can be specified without specifying  a <child> type
     attribute.

     _A UI definition fragment with GtkExpander_


     expander <- gtkExpanderNewWithMnemonic("_More Options")
     gSignalConnect(expander, "notify::expanded", expander_callback)

     ...


     expander_callback <- (expander, param_spec, user_data)
     {
       if (expander$getExpanded()) {
         # Show or create widgets
       } else {
         # Hide or destroy widgets
       }
     }


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


     '_G_t_k_E_x_p_a_n_d_e_r' _undocumented _


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

     'gtkExpander' is the equivalent of 'gtkExpanderNew'.

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


     '_a_c_t_i_v_a_t_e(_e_x_p_a_n_d_e_r, _u_s_e_r._d_a_t_a)' _undocumented _

          '_e_x_p_a_n_d_e_r' ['GtkExpander'] 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:


     '_e_x_p_a_n_d_e_d' [_l_o_g_i_c_a_l : _R_e_a_d / _W_r_i_t_e / _C_o_n_s_t_r_u_c_t] Whether the
          expander has been opened to reveal the child widget.  Default
          value: FALSE


     '_l_a_b_e_l' [_c_h_a_r_a_c_t_e_r : _R_e_a_d / _W_r_i_t_e / _C_o_n_s_t_r_u_c_t] Text of the
          expander's label.  Default value: NULL


     '_l_a_b_e_l-_w_i_d_g_e_t' ['_G_t_k_W_i_d_g_e_t' : _R_e_a_d / _W_r_i_t_e] A widget to display in
          place of the usual expander label.


     '_s_p_a_c_i_n_g' [_i_n_t_e_g_e_r : _R_e_a_d / _W_r_i_t_e] Space to put between the label
          and the child.  Allowed values: >= 0  Default value: 0


     '_u_s_e-_m_a_r_k_u_p' [_l_o_g_i_c_a_l : _R_e_a_d / _W_r_i_t_e / _C_o_n_s_t_r_u_c_t] The text of the
          label includes XML markup. See pango_parse_markup().  Default
          value: FALSE


     '_u_s_e-_u_n_d_e_r_l_i_n_e' [_l_o_g_i_c_a_l : _R_e_a_d / _W_r_i_t_e / _C_o_n_s_t_r_u_c_t] If set, an
          underline in the text indicates the next character should be
          used for the mnemonic accelerator key.  Default value: FALSE


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


     '_e_x_p_a_n_d_e_r-_s_i_z_e' [_i_n_t_e_g_e_r : _R_e_a_d] Size of the expander arrow. 
          Allowed values: >= 0  Default value: 10


     '_e_x_p_a_n_d_e_r-_s_p_a_c_i_n_g' [_i_n_t_e_g_e_r : _R_e_a_d] Spacing around expander arrow.
           Allowed values: >= 0  Default value: 2


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

