Discussion:
GetStyleFromSubStyle
Neil Hodgson
2013-09-03 09:18:50 UTC
Permalink
Another substyles API has been added, GetStyleFromSubStyle along with a corresponding ILexer method, StyleFromSubStyle. This should make it easier for applications to consider all substyles of a particular style equivalent to that style. For example, an application may treat all identifiers as equivalent for spell-checking even though some are coloured differently.

Since substyles is a provisional feature, the version number of the interface was not increased. Lexers implementing ILexerWithSubStyles will need to add the new method. There is a BaseStyle method on the SubStyles class that can be used for this.

I did want to finalise the ILexerWithSubStyles interface for the next version but more functions may be needed by client code.

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Neil Hodgson
2013-09-05 06:48:05 UTC
Permalink
Another API, GetPrimaryStyleFromStyle, added to convert from a secondary style (such as the cpp lexer's inactive styles) to a primary style.

This helps with substyles. While the distance between secondary and primary styles is always a constant (found through DistanceToSecondaryStyles), the style numbers allocated to substyles may not be next to normal styles or other substyles. This makes it more difficult to determine whether a style number is secondary or primary.

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Loading...