GtkTooltips              package:RGtk2              R Documentation

_G_t_k_T_o_o_l_t_i_p_s

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

     Add tips to your widgets

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

     'gtkTooltipsNew()'
      'gtkTooltipsEnable(object)'
      'gtkTooltipsDisable(object)'
      'gtkTooltipsSetDelay(object, delay)'
      'gtkTooltipsSetTip(object, widget, tip.text = NULL, tip.private =
     NULL)'
      'gtkTooltipsDataGet(widget)'
      'gtkTooltipsForceWindow(object)'
      'gtkTooltipsGetInfoFromTipWindow(object)'
      'gtkTooltipsGetInfoFromTipWindow(object)'
      'gtkTooltips()'

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

     GObject
        +----GInitiallyUnowned
              +----GtkObject
                    +----GtkTooltips 

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

     Tooltips are the messages that appear next to a widget when the
     mouse pointer is held over it for a short amount of time. They are
     especially helpful for adding more verbose descriptions of things
     such as buttons in a toolbar.

     An individual tooltip belongs to a group of tooltips. A group is
     created with a call to 'gtkTooltipsNew'. Every tooltip in the
     group can then be turned off with a call to 'gtkTooltipsDisable'
     and enabled with 'gtkTooltipsEnable'.

     The length of time the user must keep the mouse over a widget
     before the tip is shown, can be altered with
     'gtkTooltipsSetDelay'. This is set on a 'per group of tooltips'
     basis.

     To assign a tip to a particular 'GtkWidget', 'gtkTooltipsSetTip'
     is used. *PLEASE NOTE:* Tooltips can only be set on widgets which
     have their own X window and receive enter and leave events. To
     check if a widget has its own window use 'gtkWidgetNoWindow()'. To
     add a tooltip to a widget that doesn't have its own window, place
     the widget inside a 'GtkEventBox' and add a tooltip to that
     instead.   The default appearance of all tooltips in a program is
     determined by the current GTK+ theme that the user has selected.

     Information about the tooltip (if any) associated with an
     arbitrary widget can be retrieved using 'gtkTooltipsDataGet'.

     _Adding tooltips to buttons._


     ## Let's add some tooltips to some buttons
     button_bar_tips <- gtkTooltips()

     ## Create the buttons and pack them into a GtkHBox
     hbox <- gtkHBox(TRUE, 2)

     load_button <- gtkButton("Load a file")
     hbox$packStart(load_button, TRUE, TRUE, 2)

     save_button <- gtkButton("Save a file")
     hbox$packStart(save_button, TRUE, TRUE, 2)

     ## Add the tips
     button_bar_tips$setTip(load_button,
                            "Load a new document into this window",
                            paste("Requests the filename of a
     document.",
                                  "This will then be loaded into the
     current",
                                  "window, replacing the contents of
     whatever",
                                  "is already loaded."))
     button_bar_tips$setTip(save_button,
                            "Saves the current document to a file",
                            paste("If you have saved the document
     previously,",
                                  "then the new version will be saved
     over the",
                                  "old one. Otherwise, you will be
     prompted for",
                                  "a filename."))


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


     '_G_t_k_T_o_o_l_t_i_p_s' *WARNING: 'GtkTooltips' is deprecated and should not
          be used in newly-written code.* Holds information about a
          group of tooltips. Fields should be changed using the
          functions provided, rather than directly accessing the
          struct's members.


     '_G_t_k_T_o_o_l_t_i_p_s_D_a_t_a' *WARNING: 'GtkTooltipsData' has been deprecated
          since version 2.12 and should not be used in newly-written
          code. * 'tooltips' is the 'GtkTooltips' group that this
          tooltip belongs to. 'widget' is the 'GtkWidget' that this
          tooltip data is associated with. 'tip_text' is a string
          containing the tooltip message itself.  'tip_private' is a
          string that is not shown as the default tooltip. Instead,
          this message may be more informative and go towards forming a
          context-sensitive help system for your application. (FIXME:
          how to actually "switch on" private tips?)


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

     'gtkTooltips' is the equivalent of 'gtkTooltipsNew'.

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

