GTK Logo OpenEuphoria Logo

EuGTK 4.11.10

Programmer's Resources

Editors

WEE

I now use Pete Eberlein's WEE editor frequently, since it is cross-platform and designed for Euphoria source code.

  1. Create a folder called "Wee"
  2. Download https://github.com/peberlein/WEE/raw/master/updater.ex
  3. Run "eui updater.ex" to download/update the files for your platform.
  4. Run "eui wee" to run the editor, or compile/bind/shroud it for convenience.
To set up [F1] key pop-up GTK help, follow these directions.


Geany, gedit, pluma, GtkSourceView, etc...

In this folder are files which will add Euphoria and EuGTK syntax highlighting to editors above, and one-click run or compile capability to Geany.

To Install:

For programs using GTK2 -- i.e. Geany, Pluma, etc.

sudo cp euphoria.lang /usr/share/gtksourceview-2.0/language-specs/euphoria.lang
sudo cp gedit_syntax.xml /usr/share/mime/packages/
sudo cp classic.xml /usr/share/gtksourceview-2.0/styles/

For programs using GTK3 -- i.e. EuGTK Sourceview

sudo cp euphoria.lang /usr/share/gtksourceview-3.0/language-specs/euphoria.lang
sudo cp gedit_syntax.xml /usr/share/mime/packages/
sudo cp classic.xml /usr/share/gtksourceview-3.0/styles/

Actually, it doesn't hurt to do both :)

Optional, if you prefer these styles:
sudo cp cobalt.xml /usr/share/gtksourceview-2.0/styles/
sudo cp oblivion.xml /usr/share/gtksourceview-2.0/styles/
sudo cp build.xml /usr/share/gtksourceview-2.0/styles/

sudo cp cobalt.xml /usr/share/gtksourceview-3.0/styles/
sudo cp oblivion.xml /usr/share/gtksourceview-3.0/styles/
sudo cp build.xml /usr/share/gtksourceview-3.0/styles/

For Geany, enter the location of your GTK documentation in Geany's context-action-cmd accessed from the menu: Edit=>Preferences=>Tools=>Commands

Example:
context_action_cmd=firefox -new-tab file:///home/irv/gtk3/%s.html

Once that's done, you can pop up docs on GtkWidgets in your Euphoria source code. Highlight the widget name, e.g. GtkWindow, then right-click and choose context action. You could also set up a geany keybinding for this, such as alt-i. In the example above, you may prefer to use -new-window instead of -new-tab, or perhaps -search in order to use your default on-line search engine.

hint

If you are connected to a local network, but not the internet, links in the GTK docs may try to load images, etc from off-site. This will slow or stop you from getting the help you need.


GtkSourceView

Gtk has its own editor, with syntax highlighting for over 100 programming languages, which now works as a EuGTK plugin (see test201.ex. With EuGTK 4.11.3, I'm now using this for most editing tasks. It uses the syntax highlighting files shown above for GTK3.

The GtkSourceView editor is also used in Bear.ex, which can edit and test run source code as well as view and edit html pages.


Glade

You can use Glade to visually (drag and drop) design your interface. You'll still need to write some 'glue' code to link signals to Euphoria functions, just as you would with VisualBasic™, etc., so a text editor such as WEE will still be necessary. See Glade.html.


Other files here