io7m | single-page | multi-page | JSycamore User Manual
2.1. Introduction
Previous
2. Model
Up
2.3. Screens
Next

# 2.2. Architecture

1
The top-level object in the jsycamore package is the screen. Screens act as containers for all UI elements, and individual screens are effectively isolated UI instances. Most applications will only create a single screen.
2
Within a screen, the top-level objects are windows. Windows provide all the typical windowing system actions such as opening, closing, maximizing, and resizing.
3
Inside each window is a content area within which is placed a tree of components. Components provide a standard set of UI elements such as buttons, text fields, images, etc.

### 2.2.4. Screens, Windows And Components

5
The visual appearances of windows, and the components contained within, are completely decided by configurable themes. Components and windows decide how UI elements behave and where they are placed, whilst themes are solely responsible for determining how UI elements look.
6
User interaction is implemented using events. The application hosting the screens is responsible for delivering events to screens, and the screen instances will relay those events to the relevant windows and components contained within.
7
The positions of UI elements are specified as values in strongly-typed coordinate systems, and the jsycamore package as a whole works entirely in terms of platform-independent coordinates. The jsycamore UI can be embedded into operating systems and used with graphics standards that use completely different conventions as long as events are submitted to the UI using the jsycamore coordinate systems; extensive static typing is used to make it difficult to use values in the wrong coordinate system at any point.
2.1. Introduction
Previous
2. Model
Up
2.3. Screens
Next
io7m | single-page | multi-page | JSycamore User Manual