NZ Text Editor

eXtended Styled Text Control Is a wrapper/extender for wxScintilla/wxStyledTextCtrl. I originally started a text editor to learn how to use wxWidgets. Originally I used wxTextCtrl but found it was a royal pain to color. I looked for an alternative and came across wxSTC. It was clearly more powerful and I didn't need to color it even. Folding support and bookmarks where very nice too. So I started using it and I soon realized that there was a lot of repedative work involved with the coloring aspect. So I wrote a wrapper that was meant to set up the basics that one would probably do over in any application using Scintilla and also make the coloring part easier.

The first version was poorly written and not a likely choice by many. Its been completely rewritten and is bugfree to my knowledge. Except that in my test build the brace matching was broken, It may be due to some event related changes in Scintilla I have not been able to look at and update wxScintilla yet. It may not be a problem using an earlier version of Scintilla than 3.03, or I may find that its the function after I address the other things.

What XSTC provides over wxScitnilla/wxStyledTextCtrl:
Mouse activated bookmarks
0-9 keyboard activated bookmarks, only one of each number so goto is very fast
Folding is ready to use and easy to set up the margin symbols
Theme based coloring that keeps the various lexers similar in appearance
Brace matching ready to go
All styles (for every lexer) can be defined via config file.
Styles for languages can be set independantly of lexers and an apropriate lexer bound
File extensions will automatically set the appropriate lexer/language
Keywords can be automatically applied for each lexer via configs

There is one extension for XSTC and at least 2 more are planned. Scintilla Document Manager (SciDocMan) is a small class that will handle document switching in Scintilla for you. It stores all of the documents and binds an int handle for each of them. The handle is uniqe and used to select the respective document back into the editor. Also some of the information Scintilla forgets during a swap is restored (optionally) when the document goes back into scope. The restoring code is not there yet but the doc-switcher works well.

A simple macro record-save-load extension is planned. It will use Scintilla's build in macro facility and allow you to save the macros that you record.

The default keywords feature is a bit weak since one language will span several files since the keyword list would have to be loaded from just one file and you'd end up with several files for just one language. This can be a real pain on the file system so an XML based extension will handle this detail. It will load the keywords for one language from a single file. In the config the first keyword entry will tell it what file to load, the rest will be done automatically. UPDATE: I need to look at this further, Since it will only affect the wxWidgets version of XSTC I may just make it handle multiple wxConfig instances to support either ini or sml.

I am also going to look into multi-editing. Scintilla supports it but I don't know how to use it. I can put a simple tutorial here to make it easier to understand. Or it might be automatic but i kinda doubt it since nothing else in the api is.
UPDATE: I've looked into autocomplete just a little a nd I decided not to do anything with it. also when I activate multiple selections in wxScintilla the selecting works but nothing useful comes of it. I will make sure that NZTE supports multiline editing, (more than just rectangualr selections) something similar to 'E' text editor. It may be wxScintilla event problems or it may take more work than that.