Mapping from style names as stored in fragment<-style
onto style objects
that determine the actual appearance of a fragment. This separates
semantical information represented by the fragment from visualisation as
achieved in the editor. Setting the style to
@nil deletes
the visual appearance of fragments with this name.
The following skeleton illustrates this. E is an editor. The
final code fragment creates a fragment to turn the current selection
into a title.
:- pce_global(@title_style,
new(style(font :=
font(helvetica, bold, 16)))).
...
send(E, style, title, @title_style),
...
...
get(E, selection, point(Start, End)),
Length is End - Start,
new(F, fragment(E, Start, Length, title)),
...
- See also
- - text_margin-styles
- class fragment