Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 08 Dec 2019, 21:24
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message

Joined: 11 Apr 2007
Posts: 935

PostPosted: Mon 03 May 2010, 16:29    Post subject:  Gtkdialog-IDE
Subject 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

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".

If you have unresolved errors stemming from incomplete tags, you can click on "Tag Tester" which requires Sunburnt's program "gtkdialog.tester" which can be found here -

There may be some missing or little used tags,properties, or signals and it's easy enough to add or subtract items by
editing the corresponding files to suit.

A Gtkdialog-IDE pet follows and installs to /root/my-applications and appears in the menu under utilities.

There's a screen shot below.

Run Gui, run,
Back to top
View user's profile Send private message 

Joined: 08 Jun 2005
Posts: 5087
Location: Arizona, U.S.A.

PostPosted: Thu 06 May 2010, 01:33    Post subject:  

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 ):
in /tmp/input.file
lbl Do it or not
act refresh TABLE
lbl Click Me
act ckBTN

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...
Back to top
View user's profile Send private message 

Joined: 11 Apr 2007
Posts: 935

PostPosted: Thu 06 May 2010, 18:42    Post subject:  


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 Very Happy )

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

box (1,1) =table+signals+properties+tags
box (1,5)=button+signals+properties+tags

Widget placement and code by simple name.

All your good stuff like backup to last run on error, libraries, incremental build.

Great stuff.

(Don't like to hear that you've been sub-par lately and hope you'll be shooting "Par" very shortly) Very Happy
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

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

Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0448s ][ Queries: 12 (0.0046s) ][ GZIP on ]