Re: gtkScintilla
| From: | Alan Knowles | Date: | Wed, 05 Jun 2002 23:39:20 +0000 |
| Subject: | Re: gtkScintilla | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-2085@lists.php.net to get a copy of this message | ||
-- Thats one of the more confusing bits (not as bad as folding though):
first step in colourizing is setting the lexer:
$this->scintilla <http://docs.akbkhome.com/phpmole/classes/scintilla_editor.html#$scintilla>->set_lexer($application->langs->get_val($this->URL <http://docs.akbkhome.com/phpmole/classes/scintilla_editor.html#$URL>,"lexer")*1);the lexer values are in phpmole/languages/phpide_language.inc - this however uses the 'defines' may be in phpmole/config/defines.inc Scintilla works with styles for for each 'highlighting element' for example - setting the background color of style $this->scintilla <http://docs.akbkhome.com/phpmole/classes/scintilla_editor.html#$scintilla>->style_set_back($style,$color); The list of styles is in the phpmole/languages/phpide_language.inc - this however uses the 'defines' to connect the Name to a number.. In the Lanuguages file the 'user prefered'/'default' settings are stored. eg. style_125_fore=8355711 style_124_fore=8421504 style_123_fore=21504 style_122_fore=9204544 style_127_font=-*-*-bold-*-*-*-*-*-*-*-*-*-*-* style 125 maps to SCE_HPHP_COMMENTLINE *from the gtkscintilla/scintilla/includes/Scintilla.iface the color then is a BGR (not RGB from what I remember) =( B * 256 * 256)+(G * 256) +R the font is overlayed on the 'default font to give you the correct font name' then finally you 'colorize' the document $this->scintilla <http://docs.akbkhome.com/phpmole/classes/scintilla_editor.html#$scintilla>->colourise(0, -1); in phpmole most of the work is done here. http://docs.akbkhome.com/phpmole/classes/scintilla_editor.html#set_language regards alan epplestun wrote:
hello Alan, I have problems to coloreated me sintax, and how can i do this?¿ i read all of your code but i don't understand very well :-( if you can help me or send me a small example ?¿? pls?¿? ;-) thx