Re: Lines in GtkScintilla
| From: | Alan Knowles | Date: | Wed, 15 May 2002 01:23:15 +0000 |
| Subject: | Re: Lines in GtkScintilla | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-1968@lists.php.net to get a copy of this message | ||
this is the example,
http://docs.akbkhome.com/phpmole2/classes/scintilla_editor.html#load_from_data
$scintilla->set_data($string)
and it's counterpart
http://docs.akbkhome.com/phpmole2/classes/scintilla_editor.html#save_to_data
$string = $scintilla->get_data();
at present there is not much php documentation for scintilla, i kind of promised to write some, but have yet to find time...
the best approach (apart from reading that scintilla editor file, is to look at www.scintilla.org, the documentation page http://www.scintilla.org/ScintillaDoc.html describes the API, this api maps roughly like this,
SCI_GETTEXT(int length, char *text) maps to $string = $scintilla->get_text();
SCI_GETLINE(int line, char *text) maps to $string = $scintilla->get_line($line);
it's usually possible to guess what the commands will be. the only bit that is very complex is the folding and markers stuff...
the colour highlighting is also very complex, and relys on alot of CONSTANTS that are not set up by gtk_scintilla or phpgtkscintilla.
here are some of the more relivant data structures
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmole-ide/phpmole/languages/phpide_language.inc
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmole-ide/phpmole/languages/LanguageModes
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpmole-ide/phpmole/config/defines.inc
regards
alan
epplestun wrote:
Hello, I'm trying to put the lines in the GtkScintilla widget but I can't, what can I do tu put the lines?¿ Other question is how can I count the lines of GtkText widget?¿?. Answer me pls