On 17/06/2013 22:23, Mark Morgan Lloyd wrote:
I don't claim to have anything like the expertise to do all of the
work (I've never tackled a component in either Delphi or Lazarus), but
it might be worthwhile kicking ideas around.
Almost everything I do ends up having at least one terminal pane, at
the very least for status/debugging output. This needs to be
scrollable, with a limit on the number of history lines, and
(optionally) for the insertion point to be forced visible when there's
fresh output. Copy to clipboard, save as text etc. are desirable,
paste etc. not.
I've hooked into TSynEdit.KeyDown to get full control of the keyboard,
and injected Unicode characters using IntfUTF8KeyPress(). This allowed
me to put APL characters etc. into text I was editing, there was
nothing from a tty line etc. in this case and I didn't need colour.
.....
As Marc says, some tweak to Synedit might be viable provided that it
was able to handle colours etc. properly. The basic control would
probably have two modes (cell-addressable and extensible) with
provision for attaching keyboard and escape-sequence handlers.
From memory:
I would (if I had time) start a new component, not inheriting, but
starting on a copy of SynEdit
Or even throwing out most of it, except
Keeping
- the textbuffer (keep bidi-view, but get rid of folding and trim space
[those are wrappers around the textbuffer])
- LazSynSurface (which paints the text)
- caret
- create a markup module for highlight (must also store the color info)
then copy stuff for selection and clipboard, if needed
Some of that code is still under redesign in SynEdit, so that may mean
some maintenance later.
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus