syntax:styles

Action unknown: addtobook

STYLES

<STYLES>
...
</STYLES>

This node described styles that used as for colorizing of the text as for some UI element as editor indicator margin for example. Inheritable from the parent.

Style

<Style id="number" name="Numbers" dbkclr="false" bold="0" italic="0" underline="0" clr="Number" bkclr="#FFFFFFFF">
    <Containers>
        <Open id="xml_open_tag"/>
    </Containers>
</Style>

This node describes specific style.

Attributes (everything is case sensitive):

Unique id of the style, used to be referenced from other areas of schema. If not provide name attribute is used as id.

Value: any string, preferable low case, without spaces and symbol :
Default: if not given uses value from name attribute

Human name of the style, displayed in Options dialog etc. If id is empty, then obligatory.

Value: any string

If the attribute is set, the style would not be visible in user settings. Can be used, for example, if you only want to define visibility range for some another style, and do not want to syntax highlight it.

Value: true|false
Default: false

Technical attribute, which informs HippoEDIT (HE) that back color selection should be disabled.

Value: true|false
Default: false

Technical attribute, which informs HippoEDIT (HE) that style changing should be disabled (bold, italic, underline).

Value: true|false
Default: false

Style attributes of the text.

  • 0 - false
  • 1 - true
  • 2 - undefined, that means, inherit from underling style (not parent syntax, but style in document).

Value: 0|1|2
Default: 2

HippoEDIT would show hand cursor, when hovering over this style with Ctrl, and would try to navigate to it, if clicked.

  • 0 - false
  • 1 - true
  • 2 - undefined (inherited).

Value: 0|1|2
Default: 2

Tells HE to show or not this style in overview bar.

  • 0 - false
  • 1 - true
  • 2 - undefined (inherited)
  • 3 - disable check box Syntax Settings

Value: 0|1|2|3
Default: 2

Technical attribute, which tells HE that parent style should not be overridden but only extended by some properties. The default is false. If extended = true, then style with the same id should exist in some parent syntax. In UI you would see that style still belongs to parent syntax. If you have defined style with the same name as already defined in some parent, and don't use extend=true then on UI as the owner of the style would be current syntax, and all changes would be applied to it, but not to parent.

Value: true|false
Default: false

Technical attribute, which tells HE that parent style should not be inherited and used in the current and all child schemes. Default = false. Can be used if you do not want to inherit some style from parent syntax.

Value: true|false
Default: false

Technical attribute, mostly same as extend, but only resets inherited keywords, blocks, and words. Default = false. Can be used if you want to completely overwrite definitions for style from parent schema.

Value: true|false
Default: false

Technical attribute, which tells HE that style should embed another style, or from this syntax (rare case) or from another existing syntax. Can be used if you want to embed another existing syntax in your syntax. As example JavaScript or CSS in HTML or CDATA in XML etc.

Value: any id of existing style with/without syntax prefix
Default: nothing

Technical attribute, which tells to copy information from another style to this one. Copied are keywords, blocks, settings, but not containers. This is a better way than duplicate keyword sets. An example can be found in css_spec.xml (inherit=“html:elements”)

Value: any id of existing style with/without syntax prefix
Default: nothing

Technical attribute, which tells HippoEDIT engine that style should be treated as not source. Used for string or comment styles, for example. HippoEDIT uses this information, to skip collection of statistics for such style (used for completion), spell checking and some other purposes.

Value: 0|1|2
Default: 0

Text (clr) or background (bkclr) color of the style. As for color, you can use as an explicit value in RGB or RGBA (with alpha) format. Like #FFAAFF (RGB, no transparency) or #FFFFFFFF (RGBA, transparent, last FF is value of color transparency 0 - opaque, FF - 100% transparent). Transparency of color is used, when you have one style on top of another; for example current line style on top of search results on top of … You can also use System color. It can be specified as this $0500 (Windows Text color, opaque), where first 05 is value system (correspond to Windows system color constants) color and second 00 is transparency. Because there is no list of the system color yet published, better to use configuration dialog for selecting. And a preferable way is to use Palette colors. Then the value of clr or bkclr should correspond to some named color from current color scheme (can be found in HE data\colors, for example, color_default.xml ). In the case of using palette colors, you can be sure that you would not get black on black if somebody would select color scheme with a black background for document…

Value: RGB|RGBA|Palette color|System color
Default: inherited from parent schema or hard-coded default (as window text or background color)

Underlining color. The values are same as for clr.

Value: RGB|RGBA|Palette color|System color
Default: inherited

Color of the box, surrounding style fragment. The values are same as for clr.

Value: RGB|RGBA|Palette color|System color
Default: inherited

Background color of the box, surrounding style fragment. The values are same as for clr.

Value: RGB|RGBA|Palette color|System color
Default: inherited

Kind of underlining, applied to style block.

  • 0 - no underlining
  • 1 - solid, single line underlining
  • 2 - diagonal underlining
  • 3 - squiggle/wave underlining
  • 4 - T-like underlining

Value: 0|1|2|3|4 Default: 0, or inherited

Style of surrounding decoration, applied to style block.

  • 0 - no decoration
  • 1 - rectangle
  • 2 - rounded rectangle
  • 3 - vertically bounded decoration
  • 4 - horizontally bounded decoration

Value: 0|1|2|3|4 Default: 0, or inherited

Image associated with text style. Image can be displayed in Font & Colors dialog and in Completion List.

Value: enumeration from 5 till 20
Default: none or 0

The option controls, if escaping rules shall be used for the style. Make sense if EsapeChar is defined.

Value: true or false
Default: true

To control, scope of the styles or other syntax elements (in which other style, this style can be used), you can use Containers. If no containers for the style defined (also in parent syntax), then editor assumes, that style can appear only inside normal (defined in def syntax) style.

<Containers>
    <Open id="normal" exclude="true"/>
    <Open id="string"/>
     ....
</Containers>     

Here <Open ..> says where style can start, and <Close …> where style can end. Normally it is sufficient to only define Open containers, if no Close containers defined, editor assumes that style can be closed in same style where it starts (this is not the case for embedded syntaxes).

If you want to exclude some parent definition of container, you can add to the list container with id defied in parent syntax and add attribute exclude:

<Open id="string" exclude="true"/>
The style can be used as container ONLY if it has defined text ranges → blocks with start and end tag.

It is also possible to address style from another existing syntax, for this add syntax id before style id separated by :, like this:

<Close id="js:normal"/>

You can define rules for syntax highlighting ins several ways. These ways can be also combined:

To find out which styles applied for text position, you can check style stack.