setCallFunc              package:iSPlot              R Documentation

_S_e_t _a _c_a_l_l_b_a_c_k _f_u_n_c_t_i_o_n _t_o _a_n _e_v_e_n_t

_D_e_s_c_r_i_p_t_i_o_n:

     setCallFunc sets a callback function to an event.  This allows the
     user to change what will happen in response to an event. 
     getEvents returns all possible events that the user can set a
     callback function to. getDescForEvents returns what callback
     functions are available for a certain event.  So the order of
     calling these functions is: 1. First call getEvents to find out
     which events are available 2. Then call getDescForEvents to find
     out what callback functions are available for a particular event
     3. Finally call setCallFunc to set a callback function to an
     event.

_U_s_a_g_e:

     setCallFunc(event, shortName = "")
     getDescForEvent(event)
     getEvents()

_A_r_g_u_m_e_n_t_s:

   event: the character string that refers to the event (all possible
          events can be determined using the function getEvents) 

shortName: the description of the callback function; the callback
          function will be called in response to the event; if this
          parameter is left as an empty string, then no function will
          be called in response to the event (this value can be found
          by calling the function getDescForEvent) 

_V_a_l_u_e:

     getEvents will return all events that can be set to a callback
     function. These are stored in the environment variable,
     possEvents, in mvcEnv.  

     getDescForEvent will return the descriptions of all possible
     callback functions for a certain event.  It is this character
     string (the description) that is used as the shortName parameter
     in the setCallFunc function.

_A_u_t_h_o_r(_s):

     Elizabeth Whalen

_E_x_a_m_p_l_e_s:

       if (interactive())
       {
         loadData("USArrests")
         setActiveMVC("USArrests")
         createSPlot(varx="Murder", vary="Assault")
         getEvents()
         getDescForEvent("leftButtonClick")
         setCallFunc("leftButtonClick", "highlight a point")
       }

