Thinlet Helper user's guide

Legal Notice

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no "Invariant Sections", "Front-Cover Texts" or "Back-Cover Texts", each as defined in the license. A copy of the license can be found in the file COPYING.DOC.txt included with jEdit.


Introduction

Thinlet Helper lets developers and GUI designers using the Thinlet GUI toolkit visually keep under control the development of the user interface.
While editing a Thinlet xml document, it is possible to instantly check the visual aspect of the GUI.
Thinlet Helper is NOT a Thinlet RAD. If you need one, I recommend the optimum Theodore from Wolf Paulus at http://www.carlsbadcubes.com/theodore/


The Thinlet Helper window

When started, the plugin will try to parse the current jEdit buffer. If it contains a
valid thinlet xml document, the resulting GUI will be shown in the lower panel of the plugin window.
The "Refresh" button will parse again the active buffer and the "Close" one will close the plugin window.
You can immediately test changes made to the buffer simply clicking "Refresh" on the plugin window.


Minimalistic "Get Started" Tutorial

In jEdit, create a new buffer (you don't need to set its edit mode to xml, but if you do it, you'll have syntax colouring on). Now copy and paste the following minimalistic xml code into your buffer:

<panel columns="2" gap="4" top="4" bottom="4" left="4" right="4"> 
           <label text="Example label"/> 
           <textfield name="myTextField" text="Sample"/> 
           <panel colspan="2" weightx="1"> 
                   <button name="Submit" text="Submit" weightx="1"/> 
           </panel> 
</panel>
The syntax is pretty easy and clear, so we'll not focus on it ( on http://www.thinlet.com you'll find all the docs you need).
Now start the Thinlet Helper pligin from jEdit Plugins menu; it'll automatically parse your buffer. If the syntax is correct you'll se something like this:


Your document has been parsed in the lower panel. Try changing some text in the document and click "Refresh" on the plugin window. You'll immediately see the changes.
If your xml document contains icons, there are 2 possibilities:
In the first case(ie "file:///my/path/image.gif"), the icon will be loaded and displayed anyway. In the second one, you'll have to fill the "Icon Path" text field in the plugin window.
Example :
<button name="Submit" text="Submit" icon="file:///my/path/img/image.gif"/>
The icon attribute of the button element is an absolute URL, so you don't need to set the Icon Path.
But in the following case :
<button name="Submit" text="Submit" icon="/img/image.gif"/>
you'll have to set the Icon Path to : "file:///my/path".

You're free to use both forms, but usually you'll find that the relative form is better.


What's next

I'm currently implementing a "handler code generating" feature. In its first release it will just generate a skeleton class implementing "action methods" defined in the xml document, but if there will be enough interest on it, I plan to add features like automatically generating code for managing tables, lists combobox etc.
As usual, any feedback is much appreciated. Fell free to contact me at: info@beanizer.org


Notes

The plugin contains a copy of the Thinlet code with little modifications for some plugin needs.
This doesn't in any way break compatibility with the original Thinlet Toolkit.