viewHtml             package:RGtkViewers             R Documentation

_B_a_s_i_c _R-_G_t_k _H_T_M_L _B_r_o_w_s_e_r

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

     This is a simple browser-like HTML viewer that provides a way to
     display HTML content, create emebedded R ``applets'', and process
     links and forms. It provides a history menu, a text field for
     specifying a file name, and a status bar.

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

     viewHtml(fileName = system.file("examples", "form.html", package = "RGtk"), createWindow = TRUE,
                objectHandler = embeddedObjectHandler, linkHandler = NULL, formHandler = NULL,
                 imageHandler = htmlLoadImage)

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

fileName: the name of the file (or the HTML content directly) to
          display

createWindow: a logical value indicating whether to create a top-level
          window and display the HTML widget there or just create the
          basic HTML widget and return that so it can be included in a
          larger/different GUI.

objectHandler: the function that is to be used for handling '<OBJECT>'
          tags, or more specifically 'object-requested' signals from
          the 'GtkHTML' object.

linkHandler: a function that is used as a callback for handling links
          within the document. It is called with 2 arguments: the
          widget and the name of the link being requested. 

formHandler: the function that is used as a callback for processing
          forms, or more specifically 'submit' signals.

imageHandler: callback for the url-requested signal to load an image.

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

     A list containing the different elements 

     win: the top-level 'GtkWindow' object.

    html: the 'GtkHTML' object used for displaying the content.

callbackIds: the handles/identifiers for the signal handlers for the
          'link' and 'submit' signals. These can be used to remove the
          handlers and/or add new ones.

    load: a function that can be used to load a new file and that takes
          care of adding to the history list, etc.

setStatus: a function that can be used to display a message in the
          status bar. It should be called with the string to display,
          (or a collection of values that are pasted together separated
          by a single space).

_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:

     <URL: http://www.omegahat.org/RGtk>, <URL: http://www.gtk.org>

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

     'embeddedObjectHandler'

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

      viewHtml()

