Version 6.3.13 for Windows
 —  Programming Guide  —

Results Interface

This document covers the following topics:


Purpose of the Results Interface

The Results Interface enables programmers to display data within the results window of Natural Studio. See also Results Window in the Using Natural Studio documentation.

Note:
The results of the menu commands Find Objects and Cat All are not affected by the Results Interface.

The design and the usage of a tab in the results window can be determined via application programming interfaces (API). In general, a detailed view with columns and lines is used.

A context menu can be created for each entry, so that after the user-defined tab is shown it can be used for further processing.

This processing has to be defined within two programs:

  1. In an update command handler before a context menu is shown.

  2. In a command handler if an item is selected.

The application programming interfaces for the Results Interface are USR5001N - USR5017N and can be found in the library SYSEXT.

An example of the various functions is available in USR5001P with the update command handler in USR5001A and the command handler in USR5001B.

Notes:

  1. Modifications of the pre-defined tabs (for example, the tabs with the labels Find Objects and Cat All) are not possible with this interface.
  2. The results window and the Results Interface can be accessed only from Natural Studio.

Top of page

Results Window Control Bar Access

The following application programming interface can be used to access the results window control bar.

Interface Functionality
USR5001N Turns results window on/off. Checks visibility of the results window.

Top of page

Tab Handling

The application programming interfaces listed below can be used to define the general layout of a tab.

A tab can contain all or one of the following:

A tab can be defined with the following attributes:

Interface Functionality
USR5004N Add, replace, delete and maintain layout of a tab.
USR5005N Set and get active tab. Set tab active and set the focus on this tab

Top of page

Image Handling

The following application programming interface can be used to specify bitmaps (*.bmp) and icons (*.ico) for a previously defined tab.

Interface Functionality
USR5002N Add and delete bitmaps and icons for a specified tab.

Top of page

Context Menu Handling

The following application programming interfaces can be used to specify user-defined context menus.

Interface Functionality
USR5003N Add, remove and delete context menus of a tab.
USR5007N Set and get checked/enabled state of context menu items.

The hierachy of the context menu must be defined manually.

The following array components can be defined:

Array Component Value Description
Type 1 to 4

1 - Context menu handling.
2 - Separator line.
3 - Begin of submenu.
4 - End of submenu.

Command ID 1 to 255 Free selectable number to identify a certain item in a context menu (used within the command handler).
Label alphanumeric text Text for the context menu items of type 1 and 3. A text for the status bar can be separated with H'0'A.
Image Handle of image Handle of a previously defined image (bitmap or icon). The image will be placed before the text of the context menu item.

Top of page

Command Handling

A program can be assigned as an update command handler or as a command handler.

User-defined data can be saved/restored in the internal work area of the command handlers.

For example: handles of tabs.

The following application programming interfaces are available:

Interface Functionality
USR5006N Define update command handler and command handler.
USR5016N Set and get data for the command handler work area.

Top of page

Column Handling

The following application programming interfaces can be used to define the general layout of a column.

A column can contain all or one of the following:

In addition, the default width and specified width of the column can be set up individually.

Interface Functionality
USR5008N Add, insert and delete columns of a tab.
USR5009N Count number of columns.
USR5010N Set and get default column width and width for specified columns.

Top of page

Row Handling

The following application programming interfaces can be used to define the rows with images and context menus.

Interface Functionality
USR5009N Count number of rows.
USR5011N Add, insert and delete rows of a tab.
USR5015N A row can be scrolled into the visible area of the result window.

Top of page

Data Handling

The following application programming interfaces can be used to write user-defined data into defined columns/rows.

If check boxes have been defined for a tab, they can be activated/deactivated for every row.

Interface Functionality
USR5012N Set and get data into a tab.
USR5013N Set and get checked state of a row.

Top of page

Selection Handling

The following application programming interfaces can be used to select rows individually.

Interface Functionality
USR5014N
  • Set, reset and get selected rows.

  • Count amount of selected rows.

  • Set and reset row selection.

USR5015N Set and get row of focus.
USR5017N Copy selected rows to the Clipboard.

Top of page