/* Documentation for the syntax highlighting editor. Many moons ago I had one of the the guys here write a syntax highlighting editor component in Delphi, as a prelude to moving our development tools across from DOS to windows. I think it would be fair to say he wasn't particularly interested and didn't take the process seriously. Whatever the reason, he made a right mess of it; the result was a flaky and awkward component that was a right PITA to use. Rather than throw it away I tried to fix it. Big mistake... I spent several weeks messing about chasing and fixing problems and another couple of weeks adding things like undo that were part of the spec that was ignored. Even after all that it was still not a nice component to use. However, when given a whole shit-load of support code it generally behaves itself. I now use it in my windows development tools set, and it has been reliable there. Since it does most of what I want from an editor I've added it as an option to zeus; to use it set the "use syntax highlighting editor" check box on the config tab and restart zeus... You can put markers in the text by clicking on the marker column (LHS of the edit window), or using ctrl-M or put numbered markers in by using ctrl-shift 1 to 9, and you can jump to a numbered marker using ctrl-1 to 9. To scroll up/down to a marker point the mouse at the marker column and use the scroll-wheel. If you hold control down while doing this you will move to the next marker in any source in the project. Errors will generate error markers in the column to the immediate right of the line-numbers, and the error text will be shown in red superimposed across the line that generated the error. To scroll up/down to the next error point the mouse at the error column and use the scroll-wheel. If you hold control down while doing this you will move to the next error in any source in the project. If you click on an error marker (the E) it will be cleared. Errors will also be cleared before each assembly. To find text use ctrl-f... The OK button will find the first occurance. Once you have found text then ctrl-pageup and ctrl-pagedown will move to the next find position. These will find text in any source in the project. There is no explicit find/replace option - but note how the find works - it leaves the text you are searching for selected. So, a find/replace is quite easily done by using ctrl-up or down to find the next matching text, then a ctrl-v to replace it if you require... Usually a painless operation. In multiple-sourced projects ctrl-left and ctrl-right on the cursor keys will move around in the source files. I know these aren't standard windows keys, but I've been using ctrl-left and ctrl-right to do this for thirty years and it's not something I feel like changing now; the keys are configurable to an extent (have a look at keymap.dat, a file it will create in zeus's working directory). There are a few niggles with this version - I haven't given it all the support code it needs, mainly because it'd be such a pig to extract the whole of the project support code out of the development tools, even if I was prepared to give it away. Without that it misbehaves, in some cases strangely. I must admit I'm a bit disappointed by the way it is behaving here in zeus, I thought I'd got it more sorted out than it appears to be :( Known issues: Sometimes the cursor isn't positioned correctly when the editor loads the file for the first time. Sometimes it throws up occasional "can't focus a [blah, blah]" warnings when a find command changes sources. This is an old problem - every time I think I've nailed it it lies low for a few weeks then resurfaces. Sometimes an editor will not position the horizontal scroll bar properly the first time it is displayed. If you cut and paste more than, oh, 15,000 lines of text or so at a time it seems to take forever - that's because the undo/redo stack I've provided here is primative. But at least it has unlimited undo/redo capability (ctrl-z, shift-ctrl-z)... Oh, the save/load dialogues will let you save/load formatted files. These have the extension "*.dda" instead of "*.asm" and they are not ASCII text files - they contain all sorts of formatting information as well as the text. This means they can be used if you want to preserve the markers, etc, in the files. Alternatively, there's a version of zeus that doesn't have an internal editor at all - "zcl.exe", which (as it happens) is the one I use... */