Next Previous Up Top Contents Index

7 A Tour of the DUIM Libraries

7.3 A tour of layouts

Layouts determine how the elements that make a GUI are presented on the screen. Together with gadgets, layouts are an important type of sheet that you need to be familiar with in order to develop basic DUIM applications. Support for layouts is provided by the DUIM-Layouts library.

You can think of layouts as containers for gadgets and other layouts. They have little or no physical substance on the screen, and simply define the way in which other elements are organized. The sheet at the top of the sheet hierarchy will always be a layout.

Any layout takes a number of children, expressed as a sequence (usually a vector), and lays them out according to certain constraints. Each child must be an instance of a DUIM class. Typically, the children of any layout will be gadgets or other layouts.

There are six main classes of layouts, as follows:

<column-layout>

This lays out its children in a single column, with all its children left-aligned by default.
<row-layout>

This lays out its children in a single row.

<pinboard-layout>

This does not constrain the position of its children in any way. It is up to you to position each child individually, like pins on a pinboard.
<fixed-layout>

This class is similar to pinboard layouts, in that you must specify the position of each child. Unlike pinboard layouts, however, you must also specify the size of each child.

<stack-layout>

This lays out its children one on top of another, with all the children aligned at the top left corner by default. It is used to design property sheets, tab controls, or wizards, which contain several layouts, only one of which is visible at any one time.

<table-layout>

This lays out its children in a table, according to a specified number of rows and columns.

7.3.1 - Row layouts and column layouts
7.3.2 - Stack layouts
7.3.3 - Pinboard layouts and fixed layouts
7.3.4 - Using horizontally and vertically macros

Building Applications Using DUIM - 26 May 1999

Next Previous Up Top Contents Index