GUI Overview
The Dyalog GUI is based upon the concepts of 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.
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.
Events
During interaction with the user, an object is capable of generating events.
An example is the Select
event. For a Button
object, this event is generated when the user presses the Button
. 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.
Object Management Functions
This is a set of system functions used to create objects, set properties, respond to events, and call methods.