Presentation Classes and Enumerations

The document is organized into the following major sections:

Class Presentation

A presentation defines a component of a display. Presentations can be composed hierarchically through the parts attribute.

A presentation has a name, and a prototype presentation from which the newly defined presentation inherits information (defined via the is_like link). In addition, a presentation has parameters to define its visual appearance (visual_parameters), its layout (layout_parameters), options (primitive_parameters) and parameters that define the application data to be presented (data_parameters).

The replications are used to specify whether a presentation that is used as a part of another presentation should be replicated many times, in order to present variable amounts of data. The conditionals specify alternative ways of adjusting a presentation depending on the current context.

visual_parameters
type: Visual_Parameter
multi valued: Yes
part/whole: Yes
inheritance: Prototype/Instance

The visual parameters are used to specify the visual appearance of a presentation. The values of these parameters can be fonts, colors, etc. (see definition of Visual_Parameter).

layout_parameters
type: Layout_Parameter
multi valued: Yes
part/whole: Yes
inheritance: Prototype/Instance

The layout parameters are used to specify the layout of a presentation. The values of these parameters can be Guides and Grids.

primitive_parameters
type: Primitive_Parameter
multi valued: Yes
part/whole: Yes
inheritance: Prototype/Instance

The primitive parameters are used to specify various options of a presentation whose values are primtive values such as integers, strings, booleans, etc. (see definition of Primitive_Parameter).

data_parameters
type: Data_Parameter
multi valued: Yes
part/whole: Yes
inheritance: Prototype/Instance

The data parameters are used to specify the data to be displayed in a presentation.

point_list
type: Coordinate
multi valued: Yes
inheritance: Prototype/Instance

parts
type: Presentation
multi valued: Yes
part/whole: Yes
inheritance: Prototype/Instance

The parts of a presentation are other presentations, so that presentations are defined as a hierarchy of presentations.

replications
type: Replication
multi valued: Yes
part/whole: Yes
inheritance: Prototype/Instance

A sequence of replications, each (if any) corresponding to a different part of the presentation, defining a replication for these parts (see documentation on Replication).

conditionals
type: Collection
multi valued: Yes
part/whole: Yes
inheritance: Prototype/Instance

The conditionals support the specification of alternative presentations depending on characteristics of the data being displayed, or on characteristics of the display, such as the amount of space available. Conditionals can override any element of the specification where they appear (e.g., the position of grids, the prototype for a part), and can also add and remove parts.


Class Visual_Parameter

Derived from: Parameter
Inherited attributes: label, documentation
Sub-classes: Color_Parameter, Line_Style_Parameter, Fill_Style_Parameter, Font_Parameter, Magnitude_Parameter


Class Color_Parameter

Derived from: Visual_Parameter
Inherited attributes: label, documentation

value
type: Color
inheritance: Prototype/Instance


Class Color

Sub-classes: RGB_Color, HSV_Color, Named_Color

Color models colors of graphical objects. All colors must be modeled as sub-classes of Color: RGB_Color, HSV_Color and Named_Color.


Class RGB_Color

Derived from: Color

RGB_Color models colors in the Red/Green/Blue format.

red
type: Double
inheritance: Prototype/Instance

A real number between 0 and 1.

green
type: Double
inheritance: Prototype/Instance

A real number between 0 and 1.

blue
type: Double
inheritance: Prototype/Instance

A real number between 0 and 1.


Class HSV_Color

Derived from: Color

HSV_Color models colors in the Hue/Saturation/Value format.

hue
type: Double
inheritance: Prototype/Instance

A real number between 0 and 1.

saturation
type: Double
inheritance: Prototype/Instance

A real number between 0 and 1.

value
type: Double
inheritance: Prototype/Instance

A real number between 0 and 1.


Class Named_Color

Derived from: Color

Named_Color models colors by giving their name. Note: this method of modeling colors might be machine dependent.

name
type: String
inheritance: Prototype/Instance


Class Line_Style_Parameter

Derived from: Visual_Parameter
Inherited attributes: label, documentation

value
type: Line_Style
inheritance: Prototype/Instance


Class Fill_Style_Parameter

Derived from: Visual_Parameter
Inherited attributes: label, documentation

value
type: Fill_Style
inheritance: Prototype/Instance


Class Font_Parameter

Derived from: Visual_Parameter
Inherited attributes: label, documentation

value
type: Font
inheritance: Prototype/Instance


Class Font

A Font is used to represent fonts for text objects.

font
type: String
inheritance: Prototype/Instance

The name of the font, e.g., Helvetica.

available_styles
type: Font_Style
multi valued: Yes
inheritance: Prototype/Instance

The set of styles available for this font. The value of this attribute must be a subset of all the elements of the Font_Style enumeration.

style
type: Font_Style
inheritance: Prototype/Instance

The particular style of this font (e.g., italic).

size
type: Magnitude
inheritance: Prototype/Instance

The size of the font in points. Note: if on a given platform the requested size is not available, and the system will substitute another font.

color
type: Color
inheritance: Prototype/Instance

The color of the font.

underline
type: Underline_Style
inheritance: Prototype/Instance

Whether the text should be underlined.


Class Magnitude_Parameter

Derived from: Visual_Parameter
Inherited attributes: label, documentation

value
type: Magnitude
part/whole: Yes
inheritance: Prototype/Instance


Class Layout_Parameter

Derived from: Parameter
Inherited attributes: label, documentation
Sub-classes: Guide_Parameter, Grid_Parameter


Class Guide_Parameter

Derived from: Layout_Parameter
Inherited attributes: label, documentation

value
type: Guide
part/whole: Yes
inheritance: Prototype/Instance


Class Grid_Parameter

Derived from: Layout_Parameter
Inherited attributes: label, documentation

value
type: Grid
part/whole: Yes
inheritance: Prototype/Instance


Class Grid

A Grid is a set of parallel lines that span an area of the display. Parts of a presentation can be snapped to grid lines to define the layout. Grid lines in a parent presentation are visible in the children of the presentation and their children and so on. This allows deeply nested parts to be aligned with less nested parts.

direction
type: Direction
inheritance: Prototype/Instance

Specified whether the grid is vertical of horizontal.

distance
type: Magnitude
inheritance: Prototype/Instance

The distance between gridlines. The distance between two particular gridlines can be overriden explicitly by specifying exceptions.

If the grid is stretchable, the distance specified here refers to the distance when the grid is not stretched. The actual distance of stretchable grids can vary at run-time depending on how much the grid is stretched.

num_lines
type: Long
inheritance: Prototype/Instance

The number of lines in the grid.

If the grid is not stretchable, then this attribute can be ommitted, and the number of grid lines is computed based on the start and end of the grid: as many gridlines are defined as necessary to span the distance between start and end.

start
type: Magnitude
inheritance: Prototype/Instance

The location of the first grid line. This location can be a constant, or a Magnitude expression that depends on a guide or application data of a presentation. Typically, the expression is just a reference to a guide, which causes the grid to start at the location of the guide.

If the grid is not stretchable, then this attribute can be ommitted, and it will be computed based on the num_lines and end attributes.

end
type: Magnitude
inheritance: Prototype/Instance

The location of the last grid line.

If the grid is not stretchable, then this attribute can be ommitted, and it will be computed based on the num_lines and start attributes.

stretchable
type: Boolean
inheritance: Prototype/Instance

A stretchable grid is one where the distance between the gridlines will be adjusted so that the number of grid lines specified in num_lines can be placed between start and end. Space is proportionally divided between grid spaces, taking into account the excpetions.

If the grid is not stretchable, the number of lines is adjusted.

exceptions
type: Grid_Exception
multi valued: Yes
part/whole: Yes
inheritance: Prototype/Instance

The exceptions allow the specification of irregular grids, where the distance between particular gridlines is different from the distance specified in the distance attribute.


Class Grid_Exception

Grid_Exceptions are used to specify irregular grids. In general, a grid is specified by defining the distance between any two lines in the grid. With Grid_Exceptions it is possible to specify a different distance for a particular pair of lines.

index
type: Long
inheritance: Prototype/Instance

The index of the grid space for which the exception is being defined. The first space has index 1.

distance
type: Magnitude
inheritance: Prototype/Instance

The distance between the two lines that define the gridspace.


Class Primitive_Parameter

Derived from: Parameter
Inherited attributes: label, documentation
Sub-classes: Long_Parameter, Double_Parameter, String_Parameter


Class Long_Parameter

Derived from: Primitive_Parameter
Inherited attributes: label, documentation

value
type: Long
inheritance: Prototype/Instance


Class Double_Parameter

Derived from: Primitive_Parameter
Inherited attributes: label, documentation

value
type: Double
inheritance: Prototype/Instance


Class String_Parameter

Derived from: Primitive_Parameter
Inherited attributes: label, documentation

value
type: String
inheritance: Prototype/Instance


Class Data_Parameter

Derived from: Parameter
Inherited attributes: label, documentation

value
type: Data_Wrapper
inheritance: Prototype/Instance


Class Data_Wrapper


Class Replication

Replications are used to model presentations of collections. When combined with the conditional construct, replications can be used to specify the presentation of heterogeneous collections of information.

replicated_part
type: Presentation
inheritance: Prototype/Instance

Part to which the replication applies. The part belongs to the same presentation that contains the replication.

data_sequence
type: Data_Parameter
part/whole: Yes
inheritance: Prototype/Instance

The data_sequence is a parameter whose value is the collection of elements to be displayed. Typically this value is computed with an expression that invokes an application routine (e.g., a routine that extracts from a mailbox object the collection of messages it contains).

references
type: Reference
multi valued: Yes
part/whole: Yes
inheritance: Prototype/Instance

The references specify how to lay out the multiple replicas of the part using grids or using other parts as a reference.

anchor
type: Presentation
part/whole: Yes
inheritance: Prototype/Instance

The anchor and generic provide an alternative to references for specifying the layout of replicated parts. This mechanism is used for layouts that cannot be defined appropriately in terms of grids or other replications. The basic idea is to define the layout by defining the position of the first element (anchor), and then defining the position of the nth element (generic) based in the position of the nth minus one element (generic). The anchor is a presentation skeleton that defines how the first replica should be laid out. Typically the skeleton presentation only contains definitions for two guides (e.g., left and top), in terms of guides and grids of the parents. The generic is a list of presentation skeletons that defines how all the other elements are laid out. Typically two generic presentations are defined, corresponding to the nth (n) and nth minus one (n-1) replicas. Expressions for guides in the nth presentation define the layout with respect to the guides for the n-1 presentation. More than two generic presentations can be defined to define layouts that depend on the n-1, n-2, etc. replications.

generics
type: Presentation
multi valued: Yes
part/whole: Yes
inheritance: Prototype/Instance

See documentation on anchor.

on_demand
type: Boolean
inheritance: Prototype/Instance

The on_demand attribute specifies whether all replicas of the part should be generated in advance, or only as needed. This attribute gives developers the flexibility to define presentations where all elements of a collection are displayed at once (e.g., in a scrollable window), or presentations where the display of the elements is constructed incrementally (e.g., a display composed of multiple pages, where pages are added only as needed).

conditionals
type: Collection
multi valued: Yes
part/whole: Yes
inheritance: Prototype/Instance

This attribute is used to specify that each element of the replication is a conditional part (the elements of the replication can use different presentations), as opposed to first define a conditional for a part, and then replicate the part (all elements of the replication use the same presentation). To get the latter effect, place the conditional in the containing presentation of the conditional part


Class Reference

References provide a convenient way for specifying the layout for replicated parts by specifying that the replications should fill a grid, or by specifying that the replications should be laid out according to some other replication which is already laid out (e.g., specifying that an icon should be placed to the right of every other element of a list).

It is possible to specify multiple references in a replication object. A common case is to use two references, containing a vertical and a horizontal grid. The effect is that elements are laid out in rows according to the vertical grid. When the columns in the vertical grid are exhausted, the next row in the horizontal grid is used. In general, the use of multiple references supports the specification of a large variety of layouts.

grid_reference
type: Grid
inheritance: Prototype/Instance

Specifies the grid on which the layout is based. The set of parts will be placed on the grid lines according to end_condition and init_procedure attributes.

replication_reference
type: Replication
inheritance: Prototype/Instance

Specifies that the set of parts should be laid out according to the parts of another replication (e.g., to the right of each part in the other replication).

init_index
type: Long
inheritance: Prototype/Instance

The init_index specifies which grid line or replication element should be used to place the first element in this reference, which by default is the first one.

end_condition
type: Expression
inheritance: Prototype/Instance

The end_condition specifies when to stop using this reference for placing objects (e.g., when reaching the last column in a vertical grid).

init_procedure
type: Expression
inheritance: Prototype/Instance

The init_procedure is an advanced feature that provides more flexibility for specifying the init_index by allowing a procedure to be called, rather than always using the same init_index.


Class Conditional

conditionals allow the definition of presentations whose appearance depends on the characteristics of the data to be displayed (e.g., Email messages and voice messages in a messaging application), on the characteristics of the platform (e.g., color display vs. black and white), or on the characteristics of the interface at any given moment (e.g., given a row of buttons, if the window is narrowed, rather than truncating the row, some buttons become pull-down menus, so that all commands remain accessible without scrolling).

A presentation can have several sequences of conditionals. Each sequence act as a case statement, consisting of several conditional clauses. MASTERMIND evaluates each conditional independently: it evaluates the condition expression of each conditional in the sequence until one returns true, and then uses the skeleton associated with the specifications of the successful clause.

condition
type: Expression
inheritance: Prototype/Instance

The condition is an expression that depends on presentation or task parameters, guides and grids of the containing presentation and its ancestors. When it is true, the features of the Presentation specified in the skeleton of each element of the specifications attribute are applied to the presentation being constructed.

When MASTERMIND evaluates conditionals, it records the dependencies of all the condition expressions it evaluates, so that if any of the application data, guides or grids on which the predicates depend changes value, MASTERMIND will re-evaluate the appropriate predicates, re-apply the appropriate specifications, and update the display.

specifications
type: Specification
multi valued: Yes
part/whole: Yes
inheritance: Prototype/Instance

A conditional may affect several components of the display, other than the presentation itself where the conditional is stored. Each specification contains a skeleton to be applied and a pointer to the presentation where the specification has to be applied.


Class Specification

where
type: Presentation
inheritance: Prototype/Instance

Where specifies the part of the display to which the Specification is to be applied.

skeleton
type: Presentation
inheritance: Prototype/Instance

The skeleton is a partially filled in presentation. When the corresponding conditional is true, all the attributes filled in in the skeleton are applied to the presentation beign constructed.


Class Magnitude

A magnitude is used to represent things like the width, height and other magnitudes used in modeling presentations.

Currently a magnitude is simply a real number, but we expect to extend this concept to include additional information, such as stretchability. This information will be used to define the behavior of layouts the during negotiations that can take place for dividing up screen space between multiple parts.

value
type: Double

The value is a real number.

units
type: Magnitude_Unit


Class Guide

A guide is an invisible line used for aligning the parts of a presentation. By default, all presentation have four guides corresponding to their left, right, top and bottom. In addition, a presentation can define as many additional guides as appropriate for the type of presentation being defined. Layouts are often defined by snapping guides to other guides or to grids.

Grids and guides are design time elements, i.e., they are used by developers to define the layout of the display, but they don�t appear in the final interface that the end-user sees. However, it is possible to define tasks that manipulate the guide position, thus giving the end-user a way to adjust the layout of the display.

The positions and margins of a guide can be defined using Expressions that depend on other guides, on Grids, and on Application_Data. These expressions allow the definition of layouts that are dynamically updated when the values of the elements that the expressions depend on change.

direction
type: Direction
inheritance: Prototype/Instance

The direction of a guide specifies whether the guide is horizontalor vertical. Currently oblique directions are not supported.

position
type: Magnitude
inheritance: Prototype/Instance

The position of a guide specifies the offset from the left or top of the presentation where the guide is defined.

margin1
type: Magnitude
inheritance: Prototype/Instance

The margin1 specifies the left margin for vertical guides, or the top margin for horizontal guides. The margins are useful for defining gaps between objects.

margin2
type: Magnitude
inheritance: Prototype/Instance

The margin2 specifies the right margin for vertical guides, or the bottom margin for horizontal guides.


Class Line_Style

Line_Style specifies the style for drawing lines, such as color, thickness, and an array of very technical parameters, which most users will not need to specify.

thickness
type: Magnitude
inheritance: Prototype/Instance

An integer that specifies the thickness of the line.

color
type: Color
inheritance: Prototype/Instance

The color of the line.

cap_style
type: Line_Cap_Style
inheritance: Prototype/Instance

How the end-points of the line look. This parameter is relevent for thick lines.

join_style
type: Line_Join_Style
inheritance: Prototype/Instance

How the elbows of polylines look.

solid_style
type: Line_Solid_Style
inheritance: Prototype/Instance

Whether the line is solid, dashed, dotted, etc.

dash_specification
type: Long
multi valued: Yes
inheritance: Prototype/Instance

Allows the specification of new dash patterns, by specifying the lengths of the line segments and the gaps as a sequence of numbers.


Class Fill_Style

Fill_Style specifies the style for drawing the insides of filled areas, such as rectangles and circles. The fill style supports the specifications of simple parameters such as color, and an array of very technical parameters, which most users will not need to specify.

color
type: Color
inheritance: Prototype/Instance

The color of the fill.

solid_style
type: Fill_Solid_Style
inheritance: Prototype/Instance

The fill can be solid, or defined using a pattern in several different ways.

poly_style
type: Fill_Poly_Style
inheritance: Prototype/Instance

Not documented yet.

stipple
type: String
inheritance: Prototype/Instance

The name of a file that contains a bitmap to be used to fill an area.


Class Coordinate

A point specifies a point to two dimensions.

x
type: Magnitude

The coordinate along the X axis.

y
type: Magnitude

The coordinate along the Y axis.


Class MM_Wrapper

Not documented yet.


Enum Magnitude_Unit

Magnitudes can be specified in a variety of units. Mastermind will make the best effort to make the sizes of the elements on the screen match the measurements specified.

Values

Pixel
Screen pixels
Pica
A pica is equal to ??? inches
Point
A point is equal to ??? inches
Cm
A centimeter is equal to ??? inches
Inch
An inch is equal to 2.54 cm, ??? points

Enum Fill_Poly_Style

Values

Even_Odd
Winding

Enum Fill_Solid_Style

Values

Solid_Fill
Tiled
Stippled
Opaque_Stippled

Enum Line_Solid_Style

Values

Solid_Line
On_Off_Dash
Double_Dash

Enum Line_Join_Style

Values

Miter
Join_Round
Bevel

Enum Line_Cap_Style

Values

Not_Last
Butt
Cap_Round
Projecting

Enum Underline_Style

Underline_Style specifies whether text should be underlined, and how.

Values

None
No underlining.
Single
Underlining with a single thin line.
Dotted
Underlining with a dotted line.

Enum Font_Style

Font_Style specifies styles of a font used to display text.

Values

Regular
Font without any styles applied to it.
Bold
Boldface style.
Italic
Italic style.
Bold_Italic
Bold and italic style.

Enum Guide_Type

Guide_Type specifies the constraints that can be defined on a Guide and the operations that can be performed on it accordingly.

Values

Input
Used to declare that a guide can only be constrained to guides outside the containing part of the guide. In reusable components the input guides are used to position the component in a display.
Fixed
Indicates that a guide is already constrained to inner guides of the containing part.
Adjustable
Non-constrained, non-input guide.

Enum Direction

A Direction is used to specify the direction of Guides and Grids.

Values

Horizontal
Vertical

Object Index


Enumerations Index


Mastermind Home | Documentation Top Level