I have built a "mini-IDE" for Objective Caml using a Scintilla widget
(GTK is employed for its "cross-platform" capabilities)... it is nice
enough, but I want to add "multiple tabs" functionality.
Right away, I am faced with the old "one editor and multiple
documents" OR "multiple editors and multiple documents" question.
The first is straightforward, with the issue that the GTK "notebook"
widget does not offer a separate "tab control" as in Windows-land - so
the using obvious approach of making the same [Scintilla] editor
widget appear in each tab does not work, because GTK does not like to
have a single widget have multiple parents... so great, just use a
do-nothing widget as a placeholder with ONE editor widget, and be
driven off of the tab-changing events (and switch the active Scintilla
document at that time).
BUT, this seems like it will fail, because we want each of these tabs
to be running in parallel, with each attached to a process that may be
inserting data to be formatted by a Scintilla lexer... and since at
any given instant, only one of the tabs will "own" Scintilla and have
its document set as current, this looks grim (right?).
So the somewhat heavier solution of one Scintilla (with its own
document) per tab is mandated - I think (I have not switched to this
model yet). The point that is still concerning me is an
"implementation detail" with OCaml: *interpreted* programs MAY access
their external libraries as .so/.dll files, but *compiled* programs
MUST have everything statically linked...
SO, in the statically-linked case, will just switching active
documents be enough to maintain instance independence with multiple
Scintilla widgets, or is there non-document statically allocated
memory that will be shared in an undesirable way? Note that I am
happy to share configuration things like fonts, styles, colors, etc.
Robert Roessler
[EMAIL PROTECTED]
http://www.rftp.com
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest