Personal tools
You are here: Home / cmgui / Zinc / Developing GUIs for zinc applications

Developing GUIs for zinc applications


Once you have installed the zinc extension it is possible to run the various applications that have been developed for zinc. It is also possible to custom build your own applications, providing a nice graphical user interface (GUI) that will allow you to run various cmgui commands.

The GUI is created using an XML language called XUL and the implementation of the actual behaviour is provided by writing JavaScript. JavaScript code can be used to call functions from the zinc extension and hence communicate with the cmgui plugin.

XUL is what what is used to define the GUIs for any firefox extensions. Is is also what mozilla and firefox use to define their own GUIs so it is a well developed technology. By writing XUL code it is easy to create a web page with buttons, radio buttons, sliders, etc and position them nicely on the page.

To develop your own zinc applications you will need to have at least a basic understanding of:

  • XUL
  • Javascript
  • Cmgui com files


To get started on learning XUL you should read through the XUL tutorial. I recommend using the more up to date wiki version available at the mozilla development centre. The original tutorial can be viewed or downloaded here:

Basic single web page applications are comparatively easy to write. Applications which require opening windows or dialogs can be more complicated depending on what you want to do. See Using Windows and Dialogs with zinc applications. One of the main strengths of XUL is the ability to extend GUIs through the use of XUL Overlays. Overlays allow you to overlay content onto an existing page. This means you can add content without having to edit the page and the same overlay can be applied to several pages, improving code readibility and reusability.

Because mozilla is open source you can look at the code and see lots of real life examples of xul in use. Goto and click on sea monkey to see the most up to date version of the mozilla source (updated hourly). You can use this site to search the entire source and examine various files.

Producing scrolling windows in xul is poorly documented. See Scrolling xul windows for info on how to do this.


There are plenty of books and online tutorials available on learning JavaScript.