Posted: Mon 03 May 2010, 16:29 Post subject:
Gtkdialog-IDESubject description: A development environment written in Gtkdialog of course!

When trying to do a GUI in Gtkdialog, I found that "the faster I could produce an error, the quicker I found the working solution". This led to pasting code into terminals which is ok, but has many limitations and led me to put together the following environment.

Here's Gtkdialog IDE. It's created in Gtkdialog3 and consists of two panes - on the left is where you put basic gtkdialog xml code without the header and footer lines (GUI=' and gtkdialog -p GUI). You can choose starter code from a library (I use the Gtkdialog examples directory, filtering out comments,single quotes, head & foot GUI lines) and then enhance these by picking items under Signals, Properties or Tags on the menubar and pasting (CTRL+V). NOTE: if you have xdotool you can uncomment the xdotool parts in the "clipon" and "tagclipon" functions and get instant paste. You can get xdotool by installing Pastelist.pet found here
http://murga-linux.com/puppy/viewtopic.php?search_id=345450735&t=45327

You can use comments in the XML code and escaping isn't necessary (Yes!). Three data files- "signals" "properties" and "tagsfile"- hold the xml choices and should be installed in the same directory as Gtkdialog IDE.

On the right is the Function Code pane. You can try out code to run with the GUI by clicking "Test Function" and it'll run in a terminal - variables and functions do not need to be exported here.

When you've completed the GUI XML code, you can immediately run it by clicking on "Run GUI" and it'll run in a terminal so you can see errors. When "Run GUI" is clicked, both the XML Code and the Function Code are merged before running.Also, the variable "CHOICES" is set for evaluation.

If you have text markup to add, you can click on "Markup Editor" to try out and add text markup.

When both testing of the GUI XML and Function codes are working as expected, then the complete GUI program can be saved by clicking on "Save GUI".

Hi seaside; Very nice! It`s much like the gtkdialog GUI builder that I started way back.
Except mine didn`t bother to show the tags ( unneeded ). Also I had it running the code active.
So as you made changes, the GUI being built would restart showing the change ( like V.B. ).
If the new code errored it would undo to the last step, pretty simple stuff really...
My right pane was functions also, but the left pane code looked like this ( much thinner ):

You can see how much easier this code is to read and deal with than XML.
Also no closing tags for the controls, they`re not needed, just hbox (/hb) and vbox (/vb).
The only one that does need a closing tag that I can remember is the NoteBook.
That`s XML... All the other tags don`t need closing counter parts ( what a waste...).
The builder accepted full names for the tags as well as the shortened ones.
A library converted this short hand script into fully tagged gtkdialog code.
It`d be interesting to get yours running the GUI actively ( and maybe some pane options ).
I haven`t been up to par recently, so I haven`t had the chance to try your creation yet...

Thanks, and I agree with you that staring at XML code tends to create brain scrambling. (Although, not as bad as trying to decipher Sed random criss-crossing and escaping pickets )

What would really be great is perhaps a 5 X 10 matrix panel consisting of widget placements corresponding to boxes on the GUI screen. (Not sure that's descriptive enough, but perhaps you get the idea)

In this way you could get the placement of widgets (buttons, tables, combobox, etc. ) in the appropriate screen location and just have a name (like combobox) for a particular grid screen box. e.g screenbox col, row

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum