[previous] [up] [next]     [contents] [index]
Next: File Format Up: Basic Organization Previous: Administrators

Styles

A style, an instance of the wx:style% class, parameterizes high-level display information that is common all snip classes. This includes the font, color, and alignment with which an item is drawn. A single style is attached to each snip.

Styles are hierarchical: each style is defined in terms of another style. There is a single root style -- named ``Basic'' -- from which all other styles are derived.

The difference between a base style and a derived style is encoded in a style delta (or simply delta). A delta can encode changes such as

The types of changes which can be described by a delta are limited, but all of the usual style derivations can be described.

Style objects are never created separately; rather, they are always be created through a style list, and instace of the wx:style-list% class. A style list manages the styles themselves -- servicing external requests to find a particular style -- as well as the hierarchical information. A global style list is available, but new style lists can be created for managing separate style hierarchies. For example, a buffer will typically have its own style list.

A new style can be defined in two ways:

In an edit buffer, all snips are assigned styles based on a style called ``Standard'' (unless the style is specifically set otherwise). By default, this style is unmodified from the root style.


[previous] [up] [next]     [contents] [index]
Next: File Format Up: Basic Organization Previous: Administrators

PLT