\HeaderA{setCallFunc}{Set a callback function to an event}{setCallFunc}
\aliasA{getDescForEvent}{setCallFunc}{getDescForEvent}
\aliasA{getEvents}{setCallFunc}{getEvents}
\keyword{data}{setCallFunc}
\begin{Description}\relax
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.
\end{Description}
\begin{Usage}
\begin{verbatim}
setCallFunc(event, shortName = "")
getDescForEvent(event)
getEvents()
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{event}] the character string that refers to the event (all possible
events can be determined using the function getEvents) 
\item[\code{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) 
\end{ldescription}
\end{Arguments}
\begin{Value}
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.
\end{Value}
\begin{Author}\relax
Elizabeth Whalen
\end{Author}
\begin{Examples}
\begin{ExampleCode}
  if (interactive())
  {
    loadData("USArrests")
    setActiveMVC("USArrests")
    createSPlot(varx="Murder", vary="Assault")
    getEvents()
    getDescForEvent("leftButtonClick")
    setCallFunc("leftButtonClick", "highlight a point")
  }
\end{ExampleCode}
\end{Examples}

