GtkAccelLabel             package:RGtk2             R Documentation

_G_t_k_A_c_c_e_l_L_a_b_e_l

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

     A label which displays an accelerator key on the right of the text

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

     'gtkAccelLabelNew(string = NULL, show = TRUE)'
      'gtkAccelLabelSetAccelClosure(object, accel.closure)'
      'gtkAccelLabelGetAccelWidget(object)'
      'gtkAccelLabelSetAccelWidget(object, accel.widget)'
      'gtkAccelLabelGetAccelWidth(object)'
      'gtkAccelLabelRefetch(object)'
      'gtkAccelLabel(string = NULL, show = TRUE)'

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

     GObject
        +----GInitiallyUnowned
              +----GtkObject
                    +----GtkWidget
                          +----GtkMisc
                                +----GtkLabel
                                      +----GtkAccelLabel 

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

     GtkAccelLabel implements AtkImplementorIface and  'GtkBuildable'.

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

     The 'GtkAccelLabel' widget is a subclass of 'GtkLabel' that also
     displays an accelerator key on the right of the label text, e.g.
     'Ctl+S'. It is commonly used in menus to show the keyboard
     short-cuts for commands.

     The accelerator key to display is not set explicitly. Instead, the
     'GtkAccelLabel' displays the accelerators which have been added to
     a particular widget. This widget is set by calling
     'gtkAccelLabelSetAccelWidget'.

     For example, a 'GtkMenuItem' widget may have an accelerator added
     to emit the "activate" signal when the 'Ctl+S' key combination is
     pressed. A 'GtkAccelLabel' is created and added to the
     'GtkMenuItem', and 'gtkAccelLabelSetAccelWidget' is called with
     the 'GtkMenuItem' as the second argument. The 'GtkAccelLabel' will
     now display 'Ctl+S' after its label.

     Note that creating a 'GtkMenuItem' with 'gtkMenuItemNewWithLabel'
     (or one of the similar functions for 'GtkCheckMenuItem' and
     'GtkRadioMenuItem') automatically adds a 'GtkAccelLabel' to the
     'GtkMenuItem' and calls 'gtkAccelLabelSetAccelWidget' to set it up
     for you.

     A 'GtkAccelLabel' will only display accelerators which have
     'GTK_ACCEL_VISIBLE' set (see 'GtkAccelFlags'). A 'GtkAccelLabel'
     can display multiple accelerators and even signal names, though it
     is almost always used to display just one accelerator key.

     _Creating a simple menu item with an accelerator key._


     ## Creating a simple menu item with an accelerator key.

     ## Create a GtkAccelGroup and add it to the window.
     accel_group = gtkAccelGroup()
     window$addAccelGroup(accel_group)

     ## Create the menu item
     save_item = gtkMenuItem("Save")
     menu$add(save_item)

     ## Now add the accelerator to the GtkMenuItem. 
     ## It will be activated if the user types ctrl-s
     ## We just need to make sure we use the "visible" flag here to
     show it.
     save_item$addAccelerator("activate", accel_group, .gdkS, 
                              "control-mask", "visible")


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


     '_G_t_k_A_c_c_e_l_L_a_b_e_l' The 'GtkAccelLabel' struct contains private data
          only, and should be accessed 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:

     'gtkAccelLabel' is the equivalent of 'gtkAccelLabelNew'.

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


     '_a_c_c_e_l-_c_l_o_s_u_r_e' ['_G_C_l_o_s_u_r_e' : _R_e_a_d / _W_r_i_t_e] The closure to be
          monitored for accelerator changes.


     '_a_c_c_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] The widget to be
          monitored for accelerator changes.


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

