In terms of style numbers, this is just a case of plowing through
SciLexer.h and Scintilla.h in the scintilla source (in the include
folder).

Just to get you started, there are 3 things you need to look at:

1.  Which lexer to use - for C# you can use the CPP lexer - so looking
in SciLexer.h you'll find SCLEX_CPP with a value of 3.  So setting
your lexer to 3 means the lexer is enabled - this lexer will apply any
styles that are set and sets folding flags for you.

2. Setting your styles.  SciLexer is logically laid out - your
relevant C styles are all prefixed SCE_C_*.  The best way to work out
what each of these is, is to install Scite, and open the relevant
properties file.  The properties files are well documented and you can
see what each of the relevant style numbers is used for.

3.  Keyword groups - this is the bit that catches a lot of people. 
You need to look in the individual lexers to see which keywords to
assign to which group.  In your example, looking in LexCPP.css, go to
the bottom and look for the cppWordLists array.  Looking at the array,
you can see keyword group 0 is for "Primary keywords and identifiers",
keyword group 1 is for "Secondary keywords and identifiers", etc. 
It's up to you to set the keywords - the lexer just provides "space"
needed to store those.

Hope that helps,
Matt

On 22/02/06, Steve Donovan <[EMAIL PROTECTED]> wrote:
> >>> [EMAIL PROTECTED] 22/02/2006 01:34 >>>
> >Trouble is, I'm having a bit of difficulty configuring it.
> Don't we all ;)  I think I only developed a grip on it because I know
> the Scintilla API from SciTE.
>
> > 1) Make the margin a different colour to the editing screen
>
> sc.StyleSetBack(33,colour)
>
> > 2) Display a folding margin and manage folding
> This takes some work. Look at ScintillaEx.boo in the sciboo source,
> around line 400.  You will have to catch notifications from the
> folding margin as well.
>
> > 3) Implement some form of auto-indenting
> ditto - you have to look for line feeds.
>
> >4) Show indentation guides
> >5) Optionally, show whitespace characters
>
> sc.IsIndentationGuides = true
> sc.ViewWhitespace = true
>
> >6) Be able to highlight lines
> This makes the cursor line a different colour.
> sc.CaretLineBack = colour
> To highlight lines arbitrarily, you create a marker with
> MarkerSymbol.background.
>
> >7) Know what all the different Style numbers are for.
> The scintilla documentation remains your best bet,
> it's all there.
>
> at the risk of plugging my own stuff once too many,
> have a look at the annotated ScintillaNET source in
> Sciboo:
> http://mysite.mweb.co.za/residents/sdonovan/sciboo.zip
> The methods and properties have comments inserted
> with the orginal Scintilla IDS, e.g the StyleSetFore()
> function has a comment SCI_STYLESETFORE, which
> you can use to look up in the regular Scintilla reference.
>
> steve d.
>
>
>
>
> --
> This message is subject to the CSIR's copyright, terms and conditions and
> e-mail legal notice. Views expressed herein do not necessarily represent the
> views of the CSIR.
>
> CSIR E-mail Legal Notice
> http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html
>
> CSIR Copyright, Terms and Conditions
> http://mail.csir.co.za/CSIR_Copyright.html
>
> For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
> Legal Notice send a blank message with REQUEST LEGAL in the subject line to
> [EMAIL PROTECTED]
>
>
> This message has been scanned for viruses and dangerous content by 
> MailScanner,
> and is believed to be clean.
>
>
> _______________________________________________
> Scintilla-interest mailing list
> [email protected]
> http://mailman.lyra.org/mailman/listinfo/scintilla-interest
>

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

Reply via email to