This function returns an output file selection widget that includes the option of output to memory. It returns the base ID of the widget. An interactive ENVI Classic session is required to run this function.

Syntax


Result = WIDGET_OUTFM(Base [, AUTO_MANAGE={0 | 1}] [, DEFAULT=string] [, /FRAME] [, FUNC=string] [, PROMPT=string], UVALUE=value [, XSIZE=value])

Arguments


Base

This is the ID of the base widget.

Keywords


AUTO_MANAGE (optional)

Use this keyword to specify how ENVI Classic auto-manages the widget with AUTO_WID_MNG. The keyword value specifies if the widget must have a defined value. Setting this keyword to a value of 1 requires that the widget has either a default value or a value that you enter. Setting this keyword to 0 does not require a value. Do not use this keyword for user-managed widgets.

DEFAULT (optional)

Use this keyword to specify the default text string to place in the widget.

FRAME (optional)

Set this keyword to place a frame around the widget base.

FUNC (optional)

Use this keyword to specify the name of a function to call with the input string. This allows you to call a custom routine to validate inputs. A value of 1 is returned if the entered filename is valid. Otherwise, a value of 0 is returned.

PROMPT (optional)

Use this keyword to specify the prompt string to be used for the widget.

UVALUE

Use this keyword to assign a “user value” to the widget. This value may be of any data type and organization. The user value exists entirely for your convenience. For widgets managed by the ENVI Classic function AUTO_WID_MNG, UVALUE is a tag name in the returned anonymous structure. For user-managed widgets, you can set and use UVALUE however you wish. You must set UVALUE for all compound widgets.

XSIZE (optional)

Use this keyword to specify the width of the widget, in characters.

Widget Event


When the widget is not auto-managed, widget events set event.result to a structure with two tags: name and in_memory. If in_memory is 0, then name is set to the input string. If in_memory is 1, then the user wants to leave the output in memory and not write the result to a file.

Example


Create a simple compound widget to select output to file or memory. If this is properly selected, then print the result.

PRO ENVI_WIDGET_OUTFM_EX
  compile_opt IDL2
  base = widget_auto_base(title='File/Memory Selection test')
  wo = widget_outfm(base, uvalue='outf', /auto)
  result = auto_wid_mng(base)
  if (result.accept eq 0) then return
  if ((result.outf.in_memory) eq 1) then $
     print, 'Output to memory selected' $
     else $
     print, 'Selected File', result.outf.name
END

API Version


4.3