Re: [Gtk] Fold margin formatting / Folding in the container

"'Robin Haberkorn' via scintilla-interest" <[email protected]> Sun, 27 Apr 2025 18:16:39 +0300 (MSK)
Newsgroups gmane.comp.lib.scintilla.devel
Message-ID <[email protected]>
On Sun, 27 Apr 2025, Neil Hodgson wrote:

> Yes, applications are responsible for choosing the marker symbols and
> colours used for the fold margin.
>
But what are SCI_SETMARGINTYPEN(SC_MARGIN_BACK) and 
SC_MARGIN_FORE supposed to do?

>
>> In a related matter: I found that I couldn't enable folding on a lexer I
>> implemented in the container (ie. by hooking into SCN_STYLENEEDED
>> notifications). It's not sufficient to just set the fold level on lines
>> via SCI_SETFOLDLEVEL.
>
> Indicating fold headers with the SC_FOLDLEVELHEADERFLAG is also needed.
>
Yes, I knew that. I did get it to work. The line with 
SC_FOLDLEVELHEADERFLAG should still have the previous fold level. So for 
instance

SCI_SETFOLDLEVEL(0, SC_FOLDLEVELBASE | SC_FOLDLEVELHEADERFLAG)
SCI_SETFOLDLEVEL(1, SC_FOLDLEVELBASE+1)

appears to work for a one line fold, starting at line 1.

So it does work "from the container".

Thanks!
Robin

-- 
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 [email protected].
To view this discussion visit https://groups.google.com/d/msgid/scintilla-interest/182b0d85-6079-8853-93aa-9d44697f5ba4%40googlemail.com.