Welcome! Log In Create A New Profile

Advanced

cScintilla

Posted by BLS 
BLS
cScintilla
February 19, 2009 07:57PM
Heureka,
have just finished the complete wrapper around Scintilla.
approximate 450 methods, Jeez what a job

Bjoern
Now, let's build the OOP framework around cScintilla... [[5]]
BLS
Re: cScintilla
February 19, 2009 08:22PM
I am not sure where to handle the ON_XXX Event stuff.
ATM, I think the event handling should not be part of the class. Why not implementing the ON_XXX stuff as local procedure (Internal Window / Control Template )

what do you think ?
Bjoern
Alexandre Leclerc
Re: cScintilla
February 19, 2009 08:45PM
Hi Björn,

If you plan to have an internal window or control template, and that they will use your class, so that you are building more or less a kind of component that way: put the events in the window/etc.

If you want your class to be the final component so that it is used as an object, handle the more events as you can directly in the framework. Avoiding an useless extra layer is always the best way to go.

It's all a matter of imagining how the class user will use it and how he will be able to tailor the behaviour. If one can't adapt the behaviour without changing the model, it not the best way to can. On the other side, if you can change the behaviour by calling methods or doing inheritance, that's probably better.

Best regards.
BLS
Re: cScintilla
February 21, 2009 01:21AM
Thanks, Alexandre

I think I've made a huge step forward during the last hours/days smiling smiley
The current design is extreme simple from a "click and deploy" generation's view, but nevertheless extreme flexible.

Simple because :
Drag the Internal window on the Host-Window and write a single line of code :
// Window Init Code
WI_Scintilla.Init( WI_Scintilla..Name, SCLEX_XML ) // Your point


Flexible because :
//global decaration
gpclED is object cScintilla dynamic

//Init code
WI_Scintilla.Init( WI_Scintilla..Name, SCLEX_SQL )

gpclED = WI_Scintilla.GetInstance()  // and access one of the approx. 450 methods 

// for instance
gpclED:autoCactive()  // switch on autocomplete 
 
// OR !! use WI_Scintilla meta functions.

Ultra flexible :
Attach and detach event handler(s) like you need them.
In other words : Your Window(s) ABC and XYZ is interested in the CHAR_ADDED EVENT
just tell WI_Scintilla about it:

ATM I am working at the GUI (setup keywords, colouring, use tabs or whitespace, indention 4 or 8) and so on.

Hope I can show you the results Sunday evening.

Kind regards, Björn Lietz-Spendig





BLS
Re: cScintilla / Syntax highlighting
March 05, 2009 01:38AM
Honk,
just an intermediate update for those ....
Contains the complete! Scintilla API wrapper and some nice ideas.

If you don't have the previous source, a download does not make too much sense
(well, in order to use the current source you need at least basic Scintilla API know-honk to create something usefull.) In case that you are willing to spend an hour for investigation ... nothing should stop you from create syntax highl. for language xxx.

Don't Panic. I'll finish the project asap. In other words : You just have to plug in this stuff into your project and that's it.

to understand the code.. have a look at the global procedure collection.. and the classes.

WD12 sources at :
[www.file-upload.net]

Björn Lietz-Spendig
Alexandre Leclerc
Re: cScintilla / Syntax highlighting
March 05, 2009 02:42PM
Hi Björn,

I'm glad to hear from you on this project. I've downloaded it and hope to find time this week or next week to play a bit with it. I'll keep you informed in this thread.

Best regards.
Ruben Sanchez Peña
Re: cScintilla
March 05, 2009 04:10PM
Thank you very much Bjorn. Nice and useful job


Rubén
BLS
Re: cScintilla
March 06, 2009 10:14PM
Thanks smiling smiley

I have to make a side-step create a WLanguage binding to PCRE : [www.pcre.org]

PCRE - Perl Compatible Regular Expressions

Why ? My primary goal is to create a full featured IDE for the D programming language
( [digitalmars.com] ) and a language of my own atm called Modul 4D. Full featured means intellisense, wizard support etc. These features are depending on regular expressions and Windev's RE engine is too weak.

However, also the SQL/XML/WLangage stuff will depend on this stuff : F.I. RegEx based serach and replace, Wizards etc.

Bjoern
beside, the current code requires some clean-up work, I 'll publish cleaned sources together with the WLanguage Syntax Highlighting source within the next days...
--
It is interesting 'cause we have to use a generic Lexer, (Scintilla has of course no buildin support for the WLanguage)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: