src/swipl-devel/packages/xpce/man/refmanual/md/style.md

class style {#class-style}

A style object describes the visual appearance of a fragment object in an editor object or dict_item objects in a list_browser object: font, highlighting, underlining, etc. Style objects are associated with editors using the editor ->style: name, style method. Fragments that have fragment <->style equal to name will be displayed according to the associated style.

The online manual uses various styles. E.g.

| title  | Section titles in helvetica bold font       |
| code   | code fragments in a fixed-width screen font |
| active | attribute-bold for links to definitions.    |

An elaborate example of using editors, fragments and styles is the XPCE help browser, whose sources are in the XPCE library file pce_helper.pl. A simple example is in the example Multiple Fonts.

Bugs:

When a style is changed, the corresponding text is not immediately updated. It is adviced to use styles in a read-only fashion.

@see class text_margin @see editor->style @see editor-selected_fragment_style @see class editor @see class fragment

Instance variables {#class-style-instvars}

Send methods {#class-style-send}

Get methods {#class-style-get}



Try the rswipl package in your browser

Any scripts or data that you put into this service are public.

rswipl documentation built on June 16, 2026, 5:07 p.m.