This page was created by the IDL library routine `mk_html_help2`.

Last modified: Mon Nov 3 18:16:57 2025.

# Directory Listing of Routines

# projects/mms/sitl/eva/source/utility

- MMS_TEXTBOX
- PROGRAMROOTDIR

# Routine Descriptions

## MMS_TEXTBOX

[Next Routine] [List of Routines]

    ////////////////////////
     WARNING (by Mitsuo Oka)
    ///////////////////////
      This is a modified version of "TextBox" created by IDLCoyote.
      I modified a little bit for EVA.
    /////////////////////////

     NAME:
      MMS_TEXTBOX

     PURPOSE:

      This function allows the user to type some text in a
      pop-up dialog widget and have it returned to the program.
      This is an example of a Pop-Up Dialog Widget.

     AUTHOR:

           FANNING SOFTWARE CONSULTING
           David Fanning, Ph.D.
           1645 Sheely Drive
           Fort Collins, CO 80526 USA
           Phone: 970-221-0438
           E-mail: david@idlcoyote.com
           Coyote's Guide to IDL Programming: http://www.idlcoyote.com

     CATEGORY:

      Utility, Widgets

     CALLING SEQUENCE:

      thetext = TextBox()

     INPUTS:

      None.

     KEYWORD PARAMETERS:

      CANCEL: An output parameter. If the user kills the widget or clicks the Cancel
           button this keyword is set to 1. It is set to 0 otherwise. It
           allows you to determine if the user canceled the dialog without
           having to check the validity of the answer.

           theText = TextBox(Title='Provide Phone Number...', Label='Number:', Cancel=cancelled)
           IF cancelled THEN Return

      GROUP_LEADER: The widget ID of the group leader of this pop-up
           dialog. This should be provided if you are calling
           the program from within a widget program:

              thetext = TextBox(Group_Leader=event.top)

           If a group leader is not provided, an unmapped top-level base widget
           will be created as a group leader.

      LABEL: A string the appears to the left of the text box.

      TITLE:  The title of the top-level base. If not specified, the
           string 'Provide Input:' is used by default.

      VALUE: A string variable that is the intial value of the textbox. By default, a null string.

      XSIZE: The size of the text widget in pixel units. By default, 200.

     OUTPUTS:

      theText: The string of characters the user typed in the
           text widget. No error checking is done.

     RESTRICTIONS:

      The widget is destroyed if the user clicks on either button or
      if they hit a carriage return (CR) in the text widget. The
      text is recorded if the user hits the ACCEPT button or hits
      a CR in the text widget.

     MODIFICATION HISTORY:

      Written by: David W. Fanning, December 20, 2001.
      Added VALUE keyword to set the initial value of the text box. 4 Nov 2002. DWF.

(See projects/mms/sitl/eva/source/utility/mms_textbox.pro)

## PROGRAMROOTDIR

[Previous Routine] [List of Routines]

     NAME:
           ProgramRootDir

     PURPOSE:

           The purpose of this function is to provide a portable way of finding
           the root directory of a program distribution. The directory that is returned
           is the directory in which the source file using ProgramRootDir resides.
           The program is useful for distributing applications that have a large number
           of files in specific program directories.

     AUTHOR:

           FANNING SOFTWARE CONSULTING
           1645 Sheely Drive
           Fort Collins, CO 80526 USA
           Phone: 970-221-0438
           E-mail: david@idlcoyote.com

     SYNTAX:

           theDirectory = ProgramRootDir()

     RETURN_VALUE:

           theDirectory:   The directory in which the program module running ProgramRootDir resides.

     ARGUMENTS:

           None.

     KEYWORDS:

           NOMARK: Normally, the directory that is returned contains a path separator at its
                   end, so that the directory can easily be concatinated with other file names.
                   If this keyword is set, the final path separator mark is removed from the
                   directory name.

           ONEUP:  Set this keyword if you want to start your search one directory
                   *above* where your source program resides (i.e., "../Source").
                   This allows you, for example, to put your source files in a Source
                   directory that it at the same level as your Data directory, Utility
                   directory, etc. See the example below.

           TWOUP:  Set this keyword if you want to start your search two directories
                   *above* where your source program resides (i.e., "../../Source").

     EXAMPLE:

           Assume that your application files (and source programs) reside in this root directory:

               ../app

           You have placed a DATA directory immediately under the APP directiory, and a RESOURCES
           directory immedately under the DATA directory. Your directory structure looks like this:

               ../app                    ; Contains your application and source (*.pro) files.
               ../app/data               ; Contains your application data files.
               ...app/data/resources     ; Contains your application resource files.

           The end user can install the APP directory wherever he or she likes. In your
           program, you will identify the DATA and RESOURCES directory like this:

                ; Get icon image in resources directory.
                filename = Filepath(Root_Dir=ProgramRootDir(), Subdirectory=['data','resources'], 'myicon.tif')

                ; Get default image in data directory.
                filename = Filepath(Root_Dir=ProgramRootDir(), Subdirectory='data', 'ctscan.tif')

           Alternatively, you might set up an application directory structure like this:

               ../app                    ; Contains your application files.
               ../app/source             ; Contains your application source (*.pro) files.
               ../app/data               ; Contains your application data files.
               ...app/data/resources     ; Contains your application resource files.

           In this case, you would use the ONEUP keyword to find your data and resource files, like this:

                ; Get icon image in resources directory.
                filename = Filepath(Root_Dir=ProgramRootDir(/ONEUP), Subdirectory=['data','resources'], 'myicon.tif')

                ; Get default image in data directory.
                filename = Filepath(Root_Dir=ProgramRootDir(/ONEUP), Subdirectory='data', 'ctscan.tif')

     MODIFICATION_HISTORY:

           Written by: David W. Fanning, 23 November 2003. Based on program SOURCEROOT, written by
             Jim Pendleton at RSI (http://www.rsinc.com/codebank/search.asp?FID=35).
           Added ONEUP keyword. 10 December 2003. DWF.
           Added TWOUP keyword. 8 June 2007. DWF.
           Added NOMARK keyword. 8 June 2007. DWF.

(See projects/mms/sitl/eva/source/utility/programrootdir.pro)