Indicators are used to display additional information over the top of styling. They can be used to show, for example, syntax errors, deprecated names and bad indentation by drawing underlines under text or boxes around text. Originally, Scintilla stored indicator information in the style bytes but this has proved limiting, so now up to 32 separately stored indicators may be used.
Indicators may be displayed as simple underlines, squiggly underlines, a line of small ‘T’ shapes, a line of diagonal hatching, a strike-out or a rectangle around the text.
The gtkscintilla.Scintilla.indicator_set_style() method allow you to get and set the visual appearance of the indicators. They all use an indicatorNumber argument in the range 0 to INDIC_MAX(31) to set the indicator to style. To prevent interference the set of indicators is divided up into a range for use by lexers (0..7) and a range for use by containers (8=INDIC_CONTAINER .. 31=INDIC_MAX).
This method set the style properties of indicators. You can pass an instance of gtkscintilla.IndicatorStyle or keyword arguments:
Parameters: |
|
---|
Symbol | Value | Visual effect |
---|---|---|
INDIC_PLAIN | 0 | Underlined with a single, straight line. |
INDIC_SQUIGGLE | 1 | A squiggly underline. |
INDIC_TT | 2 | A line of small T shapes. |
INDIC_DIAGONAL | 3 | Diagonal hatching. |
INDIC_STRIKE | 4 | Strike out. |
INDIC_HIDDEN | 5 | An indicator with no visual effect. |
INDIC_BOX | 6 | A rectangle around the text. |
INDIC_ROUNDBOX | 7 | A rectangle with rounded corners around the text using translucent drawing with the interior more transparent than the border. The default alpha value is 30. |
The default indicator styles are equivalent to:
>>> s.indicator_set_style(0,type=INDIC_SQUIGGLE)
>>> s.indicator_set_style(1,type=INDIC_TT)
>>> s.indicator_set_style(2, INDIC_PLAIN)