Skip to content

Concepts

The Dyalog APL GUI is based upon four important concepts; objects, properties, events and methods.

Objects

Objects are instances of classes that contain information and provide functionality. Most Dyalog APL objects are GUI objects that may be displayed on the screen and with which you can interact. An example of an object is a push-button (an instance of class Button) which you may press to cause the program to take a particular action. Objects are defined in hierarchies.

Objects are also namespaces and may contain functions, variables, and indeed other namespaces. This allows you to store the code and data that is required by a given object within that object. Functions and variables stored in an object are hidden and protected from conflicts with functions and variables in the outside workspace and with those in other objects.

Properties

Each object has an associated set of properties which describe how it looks and behaves. For example, a Button has a property called Caption which defines the character string to be displayed in it. It also has a property called Type which may be Push (the button appears to move in and out when it is pressed), Radio (the button has two states and may be toggled on and off); and so forth.

Events

During interaction with the user, an object is capable of generating events. There are essentially two types of event, raw events and object events. Raw events are typically associated with a particular hardware operation. Pressing a mouse button, pressing a key on the keyboard, or moving the mouse pointer are examples of raw events. An object event is generated by some action that is specific to the object in question, but which may typically be achieved by a variety of hardware operations.

An example is the Select event. For a Button object, this event is generated when the user presses the Button. In MS-Windows, this can be done in several ways. Firstly, the user may click the left mouse button over the object. Secondly, under certain circumstances, the Select event can be generated when the user presses the Enter key. Finally, the event will occur if the user presses a "short-cut" (mnemonic) key that is associated with the Button.

Methods

Methods are effectively functions that an object provides; they are things that you may invoke to make the object do something for you. In Dyalog APL, the distinction between methods and events is tenuous, because events also make objects perform actions and you may generate events under program control. For example, a Scroll event is generated by a scrollbar when the user moves the thumb. Conversely, you can make a scrollbar scroll by generating a Scroll event. Nevertheless, the concept of a method is useful to describe functions that can only be invoked by a program and are not directly accessible to the user.

Objects

The following objects are supported.

System Objects
Root system-level object
Printer for hard-copy output
Clipboard provides access to Windows clipboard
Container Objects
CoolBand represents a band in a CoolBar
CoolBar a container for CoolBand objects
Form top-level Window
MDIClient container for MDI windows
SubForm acts as an MDI window or a constrained Form
Group a frame for grouping Buttons and other objects
Static a frame for drawing and clipping graphics
StatusBar ribbon status bar
TabBar contains TabBtns (tabs)
TabControl contains TabButtons (tabs)
ToolBar ribbon tool bar
ToolControl standard Windows tool control
PropertySheet contains PropertyPages
PropertyPage tabbed or paged container for other controls
Splitter divides a container into panes
Menu
MenuBar pull-down menu bar
Menu pop-up menu
MenuItem selects an option or action
Separator separator between items
Action
Button selects an option
ToolButton performs an action or selects an option
TabBtn selects a tabbed SubForm
TabButton selects a tabbed SubForm
Scroll scroll bar
UpDown spin buttons
Locator graphical (positional) input device
Timer generates events at regular intervals
Information
Label displays static text
StatusField displays status information
MsgBox displays a message box
TipField displays pop-up context sensitive help
ProgressBar displays the progress of a lengthy operation
Input & Selection
Calendar displays a month calendar control
Grid displays a data matrix as a spreadsheet
Edit text input field
RichEdit text input with word-processing capabilities
Spinner input field with spin buttons
List for selecting an item
ListView displays a collection of items for selection
Combo edit field with selectable list of choices
TreeView displays a hierarchical collection of items
TrackBar a slider control for analogue input/output
FileBox prompts user to select a file
Resource
Font loads a font
Bitmap defines a bitmap
Icon defines an icon
ImageList defines a collection of bitmaps or icons
Metafile loads a Windows Metafile
Cursor defines a cursor
Graphical Output
Circle draws a circle
Ellipse draws an ellipse
Marker draws a series of polymarkers
Poly draws lines
Rect draws rectangles
Image displays Bitmaps, Icons and Metafiles
Text draws graphical text
Miscellaneous
ActiveXContainer represents the application hosting a Dyalog ActiveXControl
ActiveXControl represents an ActiveX control written in Dyalog
HTMLRenderer displays HTML content
NetClient provides access to .NET Classes
NetControl instantiates a .NET Control.
NetType exports an APL namespace as a Net Class
OCXClass provides access to OLE Custom Controls
OLEClient provides access to OLE Automation objects
OLEServer enables APL to act as an OLE Automation server
SM specifies a window for ⎕SM (character mode interface)
TCPSocket provides an interface to TCP/IP sockets

Implementation Overview

The Dyalog APL GUI is implemented by the following system functions :

⎕DQ Dequeue processes user actions, invoking callbacks
⎕NQ Enqueue generates an event under program control
⎕WC Create Object creates new object with specified properties
⎕WG Get Properties gets values of properties from an object
⎕WN Object Names reports names of all children of an object
⎕WS Set Properties sets values of properties for an object

GUI Objects are a special type of namespace and have a name class of 9. They may therefore be managed like any other workspace object. This means that they can be localised in function headers and erased with ⎕EX. GUI objects are saved with your workspace and reappear when it is loaded or copied.