EControl Ltd. Forum Index EControl Ltd.
VCL libraries and software support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to enable/disable Staple drawing by code ?

 
Post new topic   Reply to topic    EControl Ltd. Forum Index -> EControl Syntax Editor
View previous topic :: View next topic  
Author Message
octal



Joined: 05 May 2007
Posts: 7

PostPosted: Tue Oct 23, 2007 10:15 am    Post subject: How to enable/disable Staple drawing by code ? Reply with quote

Hi,
I defined a lexer for my language (a special basic subset), and I made structures like IF/ELSE/ENDIF or REPEAT/UNTIL to draw a staple.
All works fine.
Now I want to add in my program the possibility for the user to have a config window where he can check for each control structure a check box saying to show/hide the staple to make code visibility better.

How can I do that ?

How can I also do the same (visible/invisible) for code folding for Some structures (rules) only ?

Regards
octal
_________________
http://www.pocketmt.com
Back to top
View user's profile Send private message
econtrol
Site Admin


Joined: 09 Jun 2006
Posts: 202

PostPosted: Tue Oct 23, 2007 5:28 pm    Post subject: Reply with quote

Hello,

All lexer properties are published. You may see that all settings may be changed in Delphi's object inspector.
Any change of lexer properties immediately applied to all connected editors.
Lexers (TSyntAnlyzer) may be saved to file/stream in text DFM format.

So provide customization of lexers you need to make dialog which will change some properties of lexer and save modified lexer to file or to registry (via string stream). When loading application you need load changed resources of lexers.

Main point is that - lexer is resource.

Michael.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    EControl Ltd. Forum Index -> EControl Syntax Editor All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group