Red GUI Architecture
VID stands for Visual Interface Dialect. It is a dialect of Red, providing the simplest possible way to specify graphic components with their properties, layouts and even event handlers. VID code is compiled at runtime to a tree of faces suitable for displaying.
The GUI code engine contains several parts:
Platform-independent faces management engine
Reactive actions events
Draw dialect interpreter
Reactive actions can be defined from VID dialect or specified directly using the REACT function.
Draw is a Red dialect for 2D vector drawing. It can be specified in different ways:
in VID layouts
directly in the
drawproperty of any face object
using the DRAW function to draw directly onto an image
An internal API allows multiple backends (OS/graphic system combinations) so that the View engine can be implemented in different environments. Each backend must be capable of extensive 2D drawing for complete support of Draw dialect.
The initial designs of VID, Draw and most of View (except for the reactive parts) were created by Carl Sassenrath and implemented in Rebol. Red View is a completely new, independent implementation providing similar features with some desirable improvements. Reactive actions being a prime example.