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

Last modified: Wed Nov 5 03:17:00 2025.

# Directory Listing of Routines

# spedas_gui/api_examples/plugin_menu

- YYY_UI_PLUGIN[1]
- YYY_UI_PLUGIN[2]
- YYY_UI_PLUGIN[2]
- YYY_UI_PLUGIN_ADD
- YYY_UI_PLUGIN_DELETE
- YYY_UI_PLUGIN_RANDOMIZE

# Routine Descriptions

## YYY_UI_PLUGIN[1]

[Next Routine] [List of Routines]

    Procedure:
      yyy_ui_plugin

    Purpose:
      A basic example menu plugin for the SPEDAS GUI API.

    Calling Sequence:
      See instructions in spedas/gui/resources/spd_ui_plugin_config.txt
      to enable the plugin in the GUI.

    Input:
      gui_id:  The widget ID of the top level GUI base.
      loaded_data:  The GUI loaded data object.  This object stores all
                    data and corresponding metadata currently loaded
                    into the GUI.
      call_sequence:  The GUI call sequence object.  This object stores
                      a list of calls to external routines.  These calls
                      are replicated when a GUI document is opened to
                      reproduce those operations.
      history_window:  The GUI history window object.  This object
                       provides a viewable textual history of GUI
                       operations and error reports.
      status_bar:  The GUI status bar object.  This object displays
                   informational messages at the bottom of the main
                   GUI window.
      data_tree:  The GUI data tree object.  This object provides a
                  graphical tree of all loaded data variables.
                  A copy of this object can be used to create a
                  tree display within the plugin.
      time_trange:  The GUI's main time range object.  This object
                    stores the current time range for the GUI and
                    may be used/modified by the plugin.

    Input/Output:
      data_structure: This keyword may be used to return a data structure
                      that will be saved by the GUI and passed back to
                      the plugin the next time it is called.  This can be
                      used to save any information that could be needed
                      on subsequent calls (e.g. time ranges, previous
                      operations, plugin specific option selections, etc.)

    API Requirements:
      -Plugins must accept the GUI top widget ID, loaded data object,
       call sequence object, history window object, and status bar object
       (in that order) and must include the _extra keyword.
      -The GUI data tree and time range objects may also be accessed
       via the corresponding keywords, but are not required.
      -Information for subsequent calls can be stored using the
       data_structure keyword (described above).
      -All operations performed by a plugin must be executed in separate
       helper routines to be compatible with GUI document files.  See
       yyy_ui_plugin_add, yyy_ui_plugin_delete, and yyy_ui_plugin_randomize
       for examples.

    Notes:

    $LastChangedBy: egrimes $
    $LastChangedDate: 2015-05-22 15:25:24 -0700 (Fri, 22 May 2015) $
    $LastChangedRevision: 17678 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/spedas_gui/api_examples/plugin_menu/yyy_ui_plugin.pro $

(See spedas_gui/api_examples/plugin_menu/yyy_ui_plugin.pro)

## YYY_UI_PLUGIN[2]

[Previous Routine] [Next Routine] [List of Routines]

    Purpose:
      Get the names of all currently selected variables from the tree widget.

(See spedas_gui/api_examples/plugin_menu/yyy_ui_plugin.pro)

## YYY_UI_PLUGIN[2]

[Previous Routine] [Next Routine] [List of Routines]

    Purpose:
      Example plugin event handler.

(See spedas_gui/api_examples/plugin_menu/yyy_ui_plugin.pro)

## YYY_UI_PLUGIN_ADD

[Previous Routine] [Next Routine] [List of Routines]

    Procedure:
      yyy_ui_plugin_add

    Purpose:
      This is an example of a helper routine for GUI plugins.
      Plugin helper routines perform operations on GUI data
      and allow those operations to be reproduced when loading
      GUI documents (see API requirements below).

      This example demostrates adding a new variable to the
      loaded data object.

    Calling Sequence:
      yyy_ui_plugin_add, loaded_data, history_window, status_bar

    API Required Input:
      loaded_data:  GUI loaded data object
      history_window:  GUI history window object
      status_bar:  GUI status bar object

    Other Input:
      none

    Output:
      none

    API Requirements:
      -GUI objects must be passed by keyword.
      -Routine must include the _extra keyword.

    See Also:
       yyy_ui_plugin
       yyy_ui_plugin_randomize
       yyy_ui_plugin_delete

    Notes:

    $LastChangedBy: aaflores $
    $LastChangedDate: 2014-03-18 18:27:19 -0700 (Tue, 18 Mar 2014) $
    $LastChangedRevision: 14584 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/spedas_gui/api_examples/plugin_menu/yyy_ui_plugin_add.pro $

(See spedas_gui/api_examples/plugin_menu/yyy_ui_plugin_add.pro)

## YYY_UI_PLUGIN_DELETE

[Previous Routine] [Next Routine] [List of Routines]

    Procedure:
      yyy_ui_plugin_delete

    Purpose:
      This is an example of a helper routine for GUI plugins.
      Plugin helper routines perform operations on GUI data
      and allow those operations to be reproduced when loading
      GUI documents (see API requirements below).

    Calling Sequence:
      yyy_ui_plugin_delete, loaded_data, history_window, status_bar,
                            names=names

    API Input:
      loaded_data:  GUI loaded data object
      status_bar:  GUI status bar object

    Other Input:
      names:  (string) Array of names of specifying which variables in
                       the loaded data object are to be operated on.

    Output:
      none

    API Requirements:
      -GUI objects must be passed by keyword.
      -Routine must include the _extra keyword.

    See Also:
       yyy_ui_plugin
       yyy_ui_plugin_add
       yyy_ui_plugin_randomize

    Notes:

    $LastChangedBy: aaflores $
    $LastChangedDate: 2014-03-18 18:27:19 -0700 (Tue, 18 Mar 2014) $
    $LastChangedRevision: 14584 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/spedas_gui/api_examples/plugin_menu/yyy_ui_plugin_delete.pro $

(See spedas_gui/api_examples/plugin_menu/yyy_ui_plugin_delete.pro)

## YYY_UI_PLUGIN_RANDOMIZE

[Previous Routine] [List of Routines]

    Procedure:
      yyy_ui_plugin_randomize

    Purpose:
      This is an example of a helper routine for GUI plugins.
      Plugin helper routines perform operations on GUI data
      and allow those operations to be reproduced when loading
      GUI documents (see API requirements below).

      This example demostrates retrieving a loaded data variable,
      performing an operation, and storing as a new variable
      with identical metadata.

    Calling Sequence:
      yyy_ui_plugin_randomize, loaded_data, history_window, status_bar,
                               names=names, trange=trange

    API Input:
      loaded_data:  GUI loaded data object
      history_window:  GUI history window object
      status_bar:  GUI status bar object

    Other Input:
      names:  (string) Array of names of specifying which variables in
                       the loaded data object are to be operated on.
      trange:  (double) Two element array specifying a time range [tmin,tmax].

    Output:
      none

    API Requirements:
      -GUI objects must be passed by keyword.
      -Routine must include the _extra keyword.

    See Also:
       yyy_ui_plugin
       yyy_ui_plugin_add
       yyy_ui_plugin_delete

    Notes:

    $LastChangedBy: aaflores $
    $LastChangedDate: 2014-03-18 18:27:19 -0700 (Tue, 18 Mar 2014) $
    $LastChangedRevision: 14584 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/spedas_gui/api_examples/plugin_menu/yyy_ui_plugin_randomize.pro $

(See spedas_gui/api_examples/plugin_menu/yyy_ui_plugin_randomize.pro)