Lexer Folding Function Information

187 views
Skip to first unread message

RaptorX

unread,
Oct 15, 2012, 8:43:24 PM10/15/12
to scintilla...@googlegroups.com
Hi guys...

I am kind of new to the whole scintilla thing and I have been working on creating a lexer of my own and so on.
Now, I have noticed that you can set up a function for folding but while testing by adding a scintilla control I have noticed that it looks like i will have to do the folding on my container code, as in adding markers or setting folding levels manually which I though was handled by the Folding function.

Is there anything I am supposed to do to tell scintilla to use the internal folder function instead of writing my lexer routines in the container all over again?

Thanks in advance for your information.

Neil Hodgson

unread,
Oct 16, 2012, 7:38:41 AM10/16/12
to scintilla...@googlegroups.com
RaptorX:

> I am kind of new to the whole scintilla thing and I have been working on creating a lexer of my own and so on.
> Now, I have noticed that you can set up a function for folding but while testing by adding a scintilla control I have noticed that it looks like i will have to do the folding on my container code, as in adding markers or setting folding levels manually which I though was handled by the Folding function.

The folder just sets the fold level of each line. Turn on line numbers and call SCI_SETFOLDFLAGS(SC_FOLDFLAG_LEVELNUMBERS) to see if the fold levels are being set.

Your container has to do all the work of responding to margin clicks and requests to show lines. Copy SciTE's implementation.

Neil

RaptorX

unread,
Oct 19, 2012, 1:45:28 PM10/19/12
to scintilla...@googlegroups.com, nyama...@me.com
Ok thanks for the info.

Is anyone working on the documentation of scintilla? I think it can be greatly improved by adding more clear examples for some of the most common scintilla tasks.
and things like this as well. I am sure a lot of people use scintilla because of its Lexing / Folding capabilities but the examples have proven to be very obscure some times (specially for beginners)

If there is no one working on that i can volunteer myself... I guess I can learn more about it if I start writing examples of how to use it :P

Neil Hodgson

unread,
Oct 20, 2012, 12:16:48 AM10/20/12
to scintilla...@googlegroups.com
RaptorX:

> Is anyone working on the documentation of scintilla?

There are additions when new features are added but no effort to improve the overall quality.

Neil

Reply all
Reply to author
Forward
0 new messages