Chapter 2. GLAM Architecture

Table of Contents

Overview
Core Classes
Decorators
Primitives
Event Handling
User Events
Widget Actions & Listeners
Containers
Animation

Overview

It is very important that developers realize that GLAM is a meta-toolkit. It does not define a final look and feel for the interface, rather it provides a framework for a very flexible UI. It is up to the developer to specify a component's graphical qualities as well as what animation occurs on a keyboard event, or mouse-over.

GLAM provides most common user interface windowing toolkit functionality such as primitives, layout managers, mouse input, user events, and widget actions and a very flexible layout and navigation scheme. Its primary purpose is to enhance OpenGL visualization applications by closely melding the user interface with the visualization. Due to the varying nature of visualization applications, a design decision was made to make GLAM as light-weight and flexible as possible.

GLAM also provides more advanced UI features such as integrated animation and complete visual scalability. It is vital for completely scalable visual interfaces to provide output resolution independent components. GLAM is 100% scalable, and should display on any visual device, be it 2 inches in size, or 10 meters in width. All GLAM components can be animated as well, empowering the developer with a very sophisticated toolkit in a fast, simple to implement package.

The GLAM architecture is broken into several sub-systems, namely; core, decorators, primitives, user events, widget actions & listeners, containers, and animation.

GLAM architecture sub-systems

Core

The core subsystem defines all GLAM base classes, the core subsystem is contained in the src/libglam/base directory.

Decorators

Decorators are used in GLAM to provide visual markers or non-interactive components meant purely for ornamentation. The decorator sub-system is contained in the src/libglam/decorators directory.

Primitives

The primitive sub-system contains all atomic user interface components that GLAM supports. Buttons, labels, text fields, text areas, bar meters, list items, menu items, hyperlinks and sliders are all examples of GLAM primitives. The primitive sub-system is contained in the src/libglam/primitives directory.

User Events

The user event sub-system handles all user-based communication within GLAM. Events are used as a message passing mechanism between user input and other components. GLAM supports user events from input devices such as mouse and keyboard. The user event sub-system is contained in the src/libglam/event directory.

Widget Actions & Listeners

The widget action & listener sub-system handles all communication that originates from widgets. This includes widget-to-widget and widget-to-application interaction. The core classes for widget actions and their respective listener interfaces are contained in the src/libglam/event directory.

Containers

The container sub-system supports robust grouping and organizing of primitive GLAM widgets. Some supported container types include menus, menu bars, scrollable panels, radio button groups, tables, and dialogs. The container sub-system is contained in the src/libglam/containers directory.

Animation

The animation sub-system handles all visual component translation, rotation and scaling. Animation can occur on any event or as part of a widgets idle render loop. GLAMs animation sub-system is robust enough to provide most forms of traditional and next generation animation capabilities. The animation sub-system is contained in the src/libglam/animation directory.