| Did you know ... | Search Documentation: |
| Fonts and images |
XPCE browsers support multiple fonts and images indicating the type
of the item. Each item can only be displayed in one font. Font and icon
specification use the style
object based mechanism to specify the appearance of a dict_item
object of specified style. For example, to make a browser for files and
directories, where the directories are printed purple and using the dir.bm
icon, use the following code as a starting point:
...
new(B, browser),
send(B, style, directory,
style(icon := 'dir.bm', colour := purple)),
send(B, style, file,
style(icon := 'file.bm')),
...
append_directory(B, Name) :-
send(B, append,
dict_item(Name, style := directory)).