Greg Smith:

> Currently, the following folding flags are defined:
>
> #define SC_FOLDLEVELBASE 0x400
> #define SC_FOLDLEVELWHITEFLAG 0x1000
> #define SC_FOLDLEVELHEADERFLAG 0x2000
> #define SC_FOLDLEVELBOXHEADERFLAG 0x4000
> #define SC_FOLDLEVELBOXFOOTERFLAG 0x8000
> #define SC_FOLDLEVELCONTRACTED 0x10000
> #define SC_FOLDLEVELUNINDENT 0x20000
> #define SC_FOLDLEVELNUMBERMASK 0x0FFF

   As of 1.67, SC_FOLDLEVELBOXHEADERFLAG, SC_FOLDLEVELBOXFOOTERFLAG,
SC_FOLDLEVELCONTRACTED, SC_FOLDLEVELUNINDENT, and SC_FOLDFLAG_BOX are
deprecated. They either never worked or stopped working a long time
ago.

   The line number mask 0x0FFF is mirrored as 0x0FFF000 for lexers
like the cpp lexer that use current / next levels and as a long term
plan I expect more folders will move to this system. I tried to make
this a bit more regular a few months ago but couldn't make it work
well enough.

   There is a good chance that some more bits will be required in the future.

> This leaves 14 flag bits for the future. If I could have 1 flag bit for my own
> use, I could use my language lexer folding settings to make setting indents 
> and
> the like very much easier. Otherwise I have to reproduce much of the folding
> code in the container. Could I propose that we define:
>
> #define SC_FOLDLEVELUSERMASK 0xf0000000
> or even
> #define SC_FOLDLEVELUSERMASK 0xff000000

   If you only need one bit I'd say define one bit for now. There is
always line state where you get your very own 32 bits for every line
that Scintilla won't try to interpret at all.

   Neil

_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to