Re: Euphoria Windows Editor...
- Posted by Jacques Deschenes <desja at QUEBECTEL.COM> Feb 18, 1997
- 1169 views
At 12:15 18-02-97 CST, you wrote: >I wish to parse the text.. to be able to color code it. Just like the >Euphoria editor (ed.ex) does. I want to, also, include the >auto-formatting. What do you mean by auto-formatting: do you mean automaticaly identing text inside of statements blocks, or auto completion of structure like ED do? As you are working in VB3 you probably keep the text file in a redimensionnable array. But is your editor based on character or line? The syntax colorisation has to be done by the procedure which update the screen or a procedure called by it. I think that the simplest would be to adapt the code from syncolor.e There would be a procedure: DisplayColorLine(hwin as integer, line as string, r as integer, c as integer) where hwin is the window handle and line the line to display r an c are the coordinates (row and column) for the position inside the window for the line. It's hard for me to visualise what you really need because I don't know how your code is organized. Would you be satisfied with a sub that receive a line of text and return a list of words with a color associate with each one. a type could be define like that: type coloredWord word as string color as integer end type global dim ColoredLine() as coloredWord ' array to containt the list colored words. sub ParseLine(TheLine as string) ' parse TheLine with syntax check and load each word in ColoredLine end sub If this is the kind of procedure that you want I could code it and e-mail it to you. >(P.S. I would also like to include support for your sound blaster >routines.. if you'll let me!! :) > All my code available from the euphoria official homepage is public domain, you are free to use it and improve it. Jacques Deschenes Baie-Comeau, Quebec Canada desja at quebectel.com