\name{createWF} \alias{createWF} \title{A function to specify widget structure for widgetInvoke} \description{ This function will present a widget (currently using Gtk) that will allow the user (in this case, typically a package author or maintainer) to specify the structure of the function widgets used by \code{\link{widgetInvoke}}. } \usage{ createWF(funName) } \arguments{ \item{funName}{The name of the function to create a widget for} } \details{ The package that \code{funName} is in must already be loaded via \code{\link{library}} for this function to work properly. This function will use RGtk to display a widget detailing the arguments of the specified function, and other information to be used for the \code{\link{widgetInvoke}} function. The widget presents a six column table, with the first column detailing each argument name. The arguments themselves are represented by the rows of the table. The \code{Type} column specifies the type of the argument (e.g. \code{character}, \code{logical}, etc). If this field is blank, it is assumed that any type of value may be entered in by the \code{\link{widgetInvoke}} user. A character vector can be entered to specify a set of possible values (e.g. \code{"mean", "median"}) that the argument is allowed to take - to do this use comma separated, quoted strings. The \code{Default} column is used to specify the default value of the argument, if any. Leaving this field blank will imply that there is no default value, otherwise the value in this field must be of the type specified by \code{type}. The \code{Location} column describes where this argument will appear. The widget used by \code{\link{widgetInvoke}} allows for notebook style paning, and this field will specify which pane the argument will appear on. By default, all arguments appear on the "main" pane, but by specifying another string a new pane will be created. \code{WidgetType} allows the user to specify what sort of widget is used by \code{\link{widgetInvoke}} for the entry of this argument. Currently, logical and vector types must use either \code{Radio} or \code{DropDown} and all other types must use \code{TypeIn}. If the \code{Required} check box is marked for an argument, that means that the argument must be filled in with a value by the \code{\link{widgetInvoke}} user. The \code{Reset} button can be used to bring the entire table back to its original state. Any changes the user has made will be reverted. The \code{Check} button will check the validity of all the values stored in the table and report to the user if there are potential problems. The \code{Preview} button will display a window that will be identical to what the \code{\link{widgetInvoke}} user will see. For this sub-window, the \code{Evaluate} window will not actually evaluate the function, but simply close the window. The \code{Save} button will save the information in the table to an XML file in the current directory, of the name \code{FUN.xml}, where \code{FUN} is the name of the function. } \value{ This function is used for its side effect, which is to output a file with the appropriate meta-data. The default filename is \code{funName.xml} (where \code{funName} is the same as the value specified by the parameter) and stored in the current working directory of the \R session. By using the \code{Save As} button, this can be changed, and saved to any file the operator wishes. } \author{Jeff Gentry} \seealso{\code{\link{widgetInvoke}}} \examples{ if (interactive()) createWF("testWIfun") } \keyword{interface}