Version 6.3.8 for Windows
 —  Programming Guide  —

Basic Terminology

Event-driven Natural uses the following basic terminology:


Attribute

A property of a dialog or a dialog element which can assume specific values.

Example: If the HAS-STATUS-BAR attribute is set to TRUE for a dialog, then the dialog contains a status bar.

The following operations may be made on attributes:

Operation Result
Query In event handler code, you can query an attribute's value at runtime. Example:
#L:= #DLG$WINDOW.HAS-STATUS-BAR
Set In event handler code, you can set an attribute to a value in the global attribute list before you create a dialog element dynamically. Example:
#PUSH.STYLE:= 'O'
PROCESS GUI ACTION ADD WITH #W
PUSHBUTTON #PUSH
Modify In event handler code, you can modify an attribute value of an existing dialog element at runtime. Example:
#PUSH.STYLE:= 'C' 

Top of page

Base Dialog

This is the main dialog of an application. It is started from the command line or via the object list. When this dialog is closed, all other dialogs of the application are closed as well.

Top of page

Control

A type of dialog element. Examples: edit area control, push button control, list box control.

Top of page

Dialog

A Natural object similar to a map or a program that represents a window in an event-driven application, plus all event handlers and attributes directly attached to the window. It can be a window, a modal window, a dialog box, an MDI child window, and an MDI frame window. The window as such is identified by its handle, the whole dialog is represented by the value of the system variable *DIALOG-ID.

Top of page

Dialog Box

A special kind of dialog that is exclusively processed in an application. While this dialog is active, all other dialogs of the application are disabled and do not accept any user input. If a dialog invokes a dialog box with an OPEN DIALOG statement, the dialog returns from the OPEN DIALOG statement only after the dialog box is closed. This allows the application to return parameters from the dialog box to the dialog.

Top of page

Dialog Editor

The Natural editor with which you create and maintain dialogs.

Top of page

Dialog Element

Dialog elements are (in most cases) graphical elements inside a window that enable the end user to interact with the event-driven application. After a dialog has been created, and its attributes have been set, the programmer places the dialog elements inside the window; usually, this comprises a menu control, possibly a toolbar, and other elements, such as push button controls and input field controls. There are two types of elements: controls and items.

Top of page

Event

Occurs when a user interacts with a dialog element. An event may also be sent from within a piece of code (user-defined event). Example: a click event occurs when the user uses the mouse to click on a push button control for which a piece of click event handler code has been specified. The system variable *EVENT contains the event name.

Top of page

Event Handler

Programming code that is connected with a dialog element, and is triggered when a particular type of event occurs.

Top of page

Handle

Identifies a dialog element in code and is stored in handle variables. Example: #PB-1.

Top of page

Item

A type of dialog element that is part of a control. Example: selection box item, which is part of a selection box control.

Top of page

MDI - Multiple Document Interface

Allows an application to manage several different documents or several views of the same document within the main application window (MDI frame window). These views or documents are displayed in separate MDI child windows.

Top of page

MDI Child Window

Displays a view of a document within the MDI frame window of an MDI application.

Top of page

MDI Frame Window

The parent window to all other child (document) windows in an MDI application.

Top of page

Modal Window

Similar to a dialog box, except that if a dialog invokes a modal window with an OPEN DIALOG statement, the dialog returns from the OPEN DIALOG statement immediately after the modal window has completed opening.

Top of page

SDI - Single Document Interface

As opposed to MDI applications, SDI applications do not have an MDI frame window that contains the document windows. Only a single view of a single document is displayed.

Top of page

Popup

A dialog with style Popup is modeless and can be moved anywhere on the desktop.

Top of page

Window

The basic type of window.

Top of page