.HTMLObjectTypeHandlers     package:RGtkViewers     R Documentation

_F_u_n_c_t_i_o_n_s _f_o_r _h_a_n_d_l_i_n_g _d_i_f_f_e_r_e_n_t _M_I_M_E _t_y_p_e_s _f_o_r _O_B_J_E_C_T _n_o_d_e_s _i_n _H_T_M_L

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

     This is a collection of S functions that are used when processing
     OBJECT tags in HTML documents by 'viewHtml' and 'docView'. For
     each OBJECT node, its 'type' attribute is extracted and matched to
     the names in this list of handler functions. The corresponding
     element for the matching name is called to process the node. These
     functions are used by 'embeddedObjectHandler'.

     This list can be modified and extended to add handlers for new
     MIME types using 'addMIMEObjectHandler'.

     This is a named list of functions. Each function should accept
     three arguments. The first is the GtkHTML widget in which the
     OBJECT node is encountered. The second argument is the
     GtkHTMLEmbedded object to be processed. And the third argument is
     optional and is the environment in which any S-language
     evaluations should be evaluated. The default value of this
     argument should be 'globalenv'.

     The initial elements are:

     _a_p_p/_x-_b_u_t_t_o_n creates a button (GtkButton) using the 'label'
          parameter for the text to display and the 'clicked' parameter
          to provide a callback.    

     _a_p_p/_x-_s_l_i_d_e_r creates GtkScale and GtkAdjustment objects to use as
          a scrollable slider. The parameter 'vertical' is used to
          indicate whether a vertical or horizontal scale is desired.
          If this is missing or is FALSE, a horizontal scale is used.
          It retrieves the minimum, maximum and current values from the
          'min', 'max' and 'value' parameters. The 'value-changed'
          parameter is taken to be a callback  for the slider. 

     _a_p_p/_x-_R-_d_e_v_i_c_e create an embedded R graphics device using a
          GtkDrawingArea and 'asGtkDevice'. An 'init' parameter is
          evaluated and can draw into the device. This returns the
          device index which can be used with 'dev.set' to make this
          the active device.

     _a_p_p/_x-_R-_t_e_x_t_e_n_t_r_y create a text entry widget (GtkEntry). A 'value'
          parameter is used to provide the initial content. A 'size'
          parameter is interpreted as the number of characters the
          entry should display.

     _a_p_p/_x-_R-_l_a_b_e_l creates a GtkLabel object by evaluating any 'call'
          parameter or simply an empty label. If a parameter 'label' is
          specified, this is used as the default text for the label.
          Alternatively, if a 'size' parameter is specified, this is
          used to provide an string of this length made up of spaces to
          use as the text to ensure a particular width.  

     _a_p_p/_x-_R-_w_i_d_g_e_t create an arbitrary Widget

     _a_p_p/_x-_R-_g_e_n_e_r_i_c a generic embedded OBJECT handler for R code that
          evaluates an 'init' parameter and if the result is a
          GtkWidget, it adds that to the GtkHTMLEmbeded object. This
          can be avoided by specifying FALSE for the 'addWidget'
          parameter. The the result of evaluating the 'init' parmeter
          is a function, this is called with both the GtkHTML and
          GtkHTMLEmbedded objects as arguments and the function is
          responsible for performing the appropriate processing and
          initialization. 

     _a_p_p/_x-_R-_c_o_m_m_a_n_d this is intended to evaluate S code but not create
          a visible embedded object. So its primary purpose is for side
          effects such as loading a library or dataset, initializing
          some variables, etc. The 'init' tag is evaluated. This is
          used as the default handler, i.e. when no other name matches
          the given MIME type. 

     _a_p_p/_x-_c_o_l_o_r a simple example that creates a color selection
          widget.

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

     data(.HTMLObjectTypeHandlers)

_F_o_r_m_a_t:

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

     <URL: http://www.omegahat.org/RGtkHTML> <URL:
     http://www.omegahat.org/IDocs> <URL: http://www.statdocs.org>

