User Manual

59
CATC SCRIPTING LANGUAGE 1.0 CHAPTER 14
Reference Manual FireInspector-Specific Primitives
Comments
BitfieldDialog brings up a dialog box in which the user can view the fields
that were parsed for a particular protocol-dependent data structure. The primitive
returns when the user hits the 'OK' button on the dialog box, which causes the box
to close. BitfieldDialog is not usually called directly while parsing, but
instead is handed off in a menu descriptor when constructing a cell (see AddCell
-- Supplementary additional_info constants” on page 59).
Example
See “Example for FireInspector-Specific Primitives” on page 60.
AddCell -- Supplementary additional_info
constants
The AddCell additional_info parameter contains a supplementary,
optional, constant value in FireInspector that builds a menu cell: _MENU. It’s used
to create a cell that, when left-clicked upon, will bring up a menu.
The descriptor _MENU serves as the head of a list that defines a menu:
[_MENU, <menu_name string>, <menu_items list>]
The first item, _MENU, identifies the list as containing a description of a menu. The
second item, menu_name, is the name that appears at the top of the menu.
The third item in the list is the menu_items list. It can contain one or more items;
each of those items is a menu_item_elements list. A
menu_item_elements list is structured as follows:
[<menu_action_id integer>, <menu_entry string>,
<menu_action_function string>, <menu_arguments list>]
The value of menu_action_id is an integer that uniquely identifies a menu
command. This should be unique among all of the cells of a transaction.
The value of menu_entry is a text string that appears as an entry on the menu.
When selected, it brings up the dialog identified by the menu_arguments list.
The value of menu_action_function is string that identifies the function to
be called if the menu entry is selected.
The value of menu_arguments is a list of arguments for
menu_action_function.
[<argument_list list>]
For a full description of AddCell, see “AddCell()” on page 45.