REBOL
Docs Blog Get-it

REBOL/View Graphic System Reference

Describes lower-level graphical compositing and event handling system.

Technical Documentation

This is a low level technical document for programmers, developers, and engineers. It does not describe higher level user interface methods such as VID (visual interface dialect), but many parts of this document apply equally to the components used within VID.

These concepts are useful to both experts and beginners who require a deeper understanding of REBOL user interfaces of all kinds. It is recommended that you read this document carefully if you plan to build more sophisticated types of user interfaces in REBOL.

Design Objectives

The REBOL/View engine was designed to be powerful yet minimal. Rather than build a user interface system based on static interface elements (buttons, fields, and other "widgets"), we decided to design a system for building interface systems. We engineered the system to be:

Architecture

The View graphics system is a two dimensional compositing engine. It takes a hierarchy of graphical objects and combines them in layers to create displays and interfaces.

REBOL uses a single face object for all graphics. A face can be used to show images, create buttons, generate text, detect mouse events, or group multiple faces together within a single pane. User interfaces consist of multiple faces arranged in panes. A typical application may be hundreds of faces that create its final display.

Each face object handles its own image, text, alignment, clipping, edges (borders), special effects, and event processing. In addition, a face can contain sub-faces and act as its own coordinate system.

How VID Relates to View

VID, the Visual Interface Dialect, provides an easy-to-use descriptive method of creating user interfaces. It allows programmers to concentrate more on results, and less on the programming details.

VID is really just a translator. When you create interfaces with VID, you are actually using the View graphics system indirectly. As a dialect, VID converts simple descriptive expressions into sets of faces and panes that are processed by the View graphics system.


VID is just one of many possible ways to create an interface. You can also write programs that use the View graphics system directly, bypassing VID. Or, more typically, you use a combination of both VID and the graphics system. VID creates the same face object(s) you would if you used the graphics system directly; it just reduces the amount of code you have to write for common scenarios, while still providing access to the low-level system for those times you need total control. This deep level of integration is powerful, flexible, and easy to use.

In addition, you can create your own interface dialect on top of the View graphics system. For instance, some REBOL users have created dialects that are more efficient at expressing presentations, plotting graphs, and producing games.

About Examples

Most of the examples in this document have been tested and verified to work properly in REBOL/View 1.3.1 (and higher). If you are using an older version of REBOL, you should upgrade.

To try an example for yourself, cut and paste it into a text file, then add a REBOL header such as this to the top of the file:

REBOL [Title: "Example"]

Many of the examples will also work if you simply past them into REBOL at the console prompt.

If you discover an example that does not work, please let us know by clicking on the contact link above.

Document Sections

Related Documents

About | Contact | PrivacyREBOL Technologies 2024