I'm in the middle of creating a custom lexer. Then I found StyledTextCtrl.StartStyling() is the method to use to start applying style to text, but I have no idea what the mask is. I typed StartStyling.__doc__
and got this
StyledTextCtrl.StartStyling(self, int pos, int mask)
Set the current styling position to pos and the styling mask to mask.
The styling mask can be used to protect some bits in each styling byte from modification.
How does the styling mask applied here and how to choose what mask number should we give?
This page explains most of it:
http://www.yellowbrain.com/stc/styling.html
You probably want your mask to be 0x1f (low 5 bits), this is by convention. The low 5 bits are used for styles (up to 32 different styles) while the high 3 bits are used for indicators.