> Chris Colman wrote:
> > I want to use Scintilla to implement an "in built" editor component
of
> > another application but I need a lot of the functionality that seems
to
> > be only in the SciTE editor source code. The functionality I am
> > referring to are things like:
> >  - brace matching,
> >  - auto indentation
> >  - reading a property file to set up appearance of editor under
> > different lexers (eg., C++ or Java)
> >
> > Most of the code that enables these extra features seems to be in
the
> > SciTE application source, not the Scintilla source but SciTE is a
whole
> > application and I don't want to bring the entire SciTE source into
my
> > app. Is there an easy way to bring in functionality that I need to
my
> > app and only include the Scintilla DLL as is?
> 
> Basically, [I think] Neil decided early in the projects' lives which
> things should be in the *component* (Scintilla) and which
> functionality belonged in an/the *application* (SciTE)... while
> clearly both have had functionality added over time, I expect he still
> has fairly definite ideas about the "divide".
> 
> I expect that most people building editors from Scintilla have
> [re-]implemented those application-level pieces that they needed - I
> know *I* have. ;)

Yes, so have I. It sounds like a job for a refactoring session to
produce a reusable component that isn't necessarily part of Scintilla
but which can be added to a project that uses Scintilla with very little
effort. Things that are too application specific, such as the storage of
properties, could have their functionality provided via "interfaces".
The application then provides implementations of these interfaces to the
component.

> 
>  From your list, Neil at one point responded to a query (of mine)
> about having some "interpret this string as a set of style attributes"
> call added to the Scintilla API - he wasn't against the idea, but
> wanted a pretty flexible external format for the attribute "bundle"
> (my terminology), one that would be able to support the features of
> his SinkWorld project...

Yes, if the attribute/property/strings were "provided" to the Scintilla
component via a "PropertyProvider" interface then the implementation of
that interface could store attributes in whatever datastore (file or
otherwise) and format it wants to. Eg, text file (multitude of formats),
binary file, registry, .ini file etc., 

I've created a PropertyProvider interface in our code multiple times and
it works extremely well. The consumer of the properties never has to
care for how they are stored - it just retrieves them whenever it needs
them.

> Robert Roessler
> [EMAIL PROTECTED]
> http://www.rftp.com
> _______________________________________________
> 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