VDisplayOutputFilePrompt


 
Name
  VDisplayOutputFilePrompt - displays a switch in the button window that
enables users to save files.
 
Synopsis
  VDisplayOutputFilePrompt(saveswitch, def_name, callback_func)
  PanelCmdInfo *saveswitch;
  char def_name[][MAX_DEFAULT_CHAR];
  int (*callback_func)();
 
Description
  VDisplayOutputFilePrompt displays a switch in the button window that
enables users to save files. VDisplayOutputFilePrompt displays a tablet where 
the filename can be typed in, and a button to initiate the save operation.
The options on the switch can be changed by calling
VCheckEventsInButtonWindow.
 
Structures
  typedef struct {
        short  group;           /*the group number*/
        Char30 cmd;             /*the name of command*/
        short  type;            /*0 - button type; 1 - switch type.*/
        short  num_of_switches; /*the number of switches per command*/
        Char30 *switches;       /*the names of the switches*/
        short  switch_item_displayed; /*the switch item to be displayed*/
  } PanelCmdInfo;

Return Value
  0 - work successfully.
  1 - memory allocation error.
 
Parameters
  saveswitch - a PanelCmdInfo structure that contains the value to 
	be displayed in the switch. If NULL is the value passed, then the 
	switch is not displayed.
  def_name -  a two-dimensional array of saveswitch->num_of_switches default 
	filenames to be displayed in the Text Item area. If NULL is the value 	passed by the user, then "temp" is the filename assumed.
  callback_func - the function to be executed when the SAVE button is pressed;
	if NULL, the SAVE button will not be displayed; no parameters are 
	passed to this function; the return value is ignored.
 
Side Effects
  None.
 
Entry Conditions
  VCreateColormap should be called earlier,else VDisplayOutputFilePrompt
prints an error message to the standard error stream, produces a core dump
file and exits from the current process.
 
Related Functions
VEraseOutputFilePrompt, VGetSwitchValue, VGetSaveFilename, VGetSaveFilenameList, VCheckEventsInButtonWindow.