dollar.GtkObject            package:RGtk            R Documentation

_F_i_n_d _m_e_t_h_o_d_s _f_o_r _a_n _S-_G_t_k _o_b_j_e_c_t

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

     These accessor functions find the appropriate method for a Gtk
     object based on its class hierarchy information. This allows one
     to invoke a method such as 'show' on a Gtk object without having
     to remember for which parent class it was defined (e.g.
     GtkWidget). So 'w$Show' will find the method. The function
     exploits the naming convention used in Gtk and the R-Gtk interface
     to find S functions of the form 'gtk<Type>FunctionName', and it
     searches for the most appropriate function given the object's
     class.

_U_s_a_g_e:

     obj$name
     "$.GtkObject"(obj, name)
     "$.GtkType"(obj, name)
     "$.GdkEvent"(obj, name)

_A_r_g_u_m_e_n_t_s:

     obj: the GtkObject whose classes are to be used to find the method
          of interest.

    name: the shortened name of the method of interest. This is
          combined with the appropriate class of Gtk object to produce
          the full name.

_D_e_t_a_i_l_s:

     This searches for an appropriate S function by combining the name
     of the function with each of the elements in the class vector of
     'obj'. This can be expensive. A more classical OOP mechanism would
     be more efficient and will likely be implemented in the future.

_V_a_l_u_e:

     The return value is a function which has access to the 'obj' value
     so that it can call the real S function with that object as the
     first argument. One typically invokes the function directly, as in
     'w$Show()' and it is not intended that one assigns the result of
     the '$' operation for later use.

_N_o_t_e:

     In the future, the RGtk interface may use a more traditional
     object oriented class mechanism provided by the <URL:
     http://www.omegahat.org/OOP> in which case the dispatching will be
     done internally from the definitions of the Gtk class rather than
     using this ``home-made'' mechanism.

_A_u_t_h_o_r(_s):

     Duncan Temple Lang <duncan@research.bell-labs.com>

_R_e_f_e_r_e_n_c_e_s:

     Information on the package is available from <URL:
     http://www.omegahat.org/RGtk>.

     Information on Gtk is available from <URL: http://www.gtk.org>.

_S_e_e _A_l_s_o:

     '[[.GtkObject' '.getAutoMethodByName' '.getAutoElementByName'

_E_x_a_m_p_l_e_s:

      gtkInit()

      w <- gtkButton("My button", show = FALSE)
      w$Show()
      w$Hide()
      w$Destroy()

