PHPDeveloper.orghttp://www.phpdeveloper.org
Up-to-the Minute PHP News, views and communityen-usTue, 31 Mar 2015 17:04:48 -050030http://www.phpdeveloper.org/news/6930http://www.phpdeveloper.org/news/6930
There's a new tutorial posted on the PHP-GTK Community site today - a quick one showing how to use GtkSourceview to create a simple PHP editor with syntax highlighting.

This widget is nearly usable as a real php-gtk IDE. It extends GtkSourceView widget and internally manages both a text buffer and language object classes.

They provide the code, but not too much in the way of explanation for it. Thankfully, most of it is pretty straight-forward. There are a few things that the script has to manage to make the it work - a text buffer for the data, a viewer (window), and the syntax highlighting component. For the view, there are a few handy functions already built in so you won't have to create them - undos, the syntax highlighting, line numbering, markers, and bracket highlighting.