Here's a summary of the classes in dig.
Controls
A Control is a visual widget. The usual top-level control is the Frame. Here are the subclasses of Control:
-
Button - Push button with text label.
-
Canvas - User-drawn control.
-
CanvasGL - OpenGL control.
-
CheckBox - Label with an on/off button.
-
ComboBox - Selects between multiple text values.
-
EditText - Single or multiple-line input text editor.
-
Frame - Window.
-
GroupBox - Labelled border around a set of controls.
-
Label - Single line text control.
-
ListBox - Multiple-column list.
-
Pane - Gridfitting organizer.
-
RadioButton - Sets of these allow selecting between multiple values. RadioGroup can be used to easily manage sets of this control.
-
ScintillaText - Interface to a Scintilla text editing control.
-
Spinner - Numerical input.
-
TreeBox - Multiple-column tree view.
Dispatchers
For handling events, you register delegates with dispatchers - lists of delegates. The normal dispatcher type is Dispatcher. You add a delegate using add; it takes these forms:
void delegate () func;
void delegate (Event event) func;
Dispatcher *reference;
The "Event" structure has many fields, most of which aren't used for any one event type. When I list the dispatchers I'll type out what fields they use in parentheses. The field "flags" refers to the control, lbutton, mbutton, rbutton, and shift fields.
Here are the main dispatchers to control. First, the general dispatchers:
-
onDrop - Files have been dropped onto the control. This uses the #DropDispatcher object.
-
onHelp - Help has been requested for this control. If this delegate is empty, the message is passed to the control's parent.
-
onHScroll (scrollType, scrollPoint) - A horizontal scrollbar action has been requested. If this delegate is empty, it will change the hscrollPoint according to the horizontal scroll page and range settings.
-
onPaint (left, top, right, bottom) - Painting has been requested. This event is only spawned with Canvas and CanvasGL subclasses.
-
onVScroll (scrollType, scrollPoint) - A verical scrollbar action has been requested. If this delegate is empty, it will change the vscrollPoint according to the horizontal scroll page and range settings.
-
onSizeChanged (x, y) - The dimensions of the control have changed. x and y contain the previous width and height.
Here are the keyboard-related dispatchers:
-
onChar (keyCode, keyRepeat, keyPrevious) - The character has been pressed on the keyboard and this control has focus.
-
onLostFocus - The control no longer has keyboard focus.
Here are the mouse-related dispatchers:
-
onLButtonDown (x, y, flags) - The left mouse button has been pressed while over the control.
-
onLButtonUp (x, y, flags) - The left mouse button has been released while over the control.
-
onMButtonDown (x, y, flags) - The middle mouse button has been pressed while over the control.
-
onMButtonUp (x, y, flags) - The middle mouse button has been released while over the control.
-
onMouseLeave - The mouse cursor has moved off the control.
-
onMouseOver (x, y) - The mouse cursor has moved over the control.
-
onMouseWheel (x, y, flags, wheel) - The mouse wheel has been spun while the control has the keyboard focus.
-
onRButtonDown - The right mouse button has been pressed while over the control.
-
onRButtonUp - The right mouse button has been released while over the control.
Standard Dialogs
There are a set of standard dialog classes for performing common operations. These dialogs are:
Bitmaps
The Bitmap class manages an image you can use to draw onto a Canvas. You can load bitmaps from files using the BitmapLoad function. You can also draw onto bitmaps using a set of classes starting with Brush, which returns a color. Its sub-classes are:
Brushes and bitmaps can both be convolved. When applied to brushes, convolutions change the sample position. When applied to bitmaps, convolutions distort shape points. The convolutions are:
Mathematics
There are a large number of mathematics structures with names typecasted after OpenGL 2.0. These are:
-
box2 - Two-dimensional axis-aligned bounding box.
-
box3 - Three-dimensional axis-aligned bounding box.
-
mat2 - Two-by-two matrix.
-
mat3 - Three-by-three matrix.
-
mat4 - Four-by-four matrix.
-
obb3 - Three-dimensional oriented bounding box.
-
plane3 - Three-dimensional half-space equation.
-
quat3 - Three-dimensional rotation quaternion.
-
ray3 - Three-dimensional ray (source plus direction).
-
sphere3 - Three-dimensional sphere.
-
vec2 - Two-dimensional vector.
-
vec3 - Three-dimensional vector.
-
vec4 - Four-dimensional vector.
Generated on Thu Sep 4 13:12:53 2003 for dig by
1.3.2