Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

XUL, Gtk2, Perl and other thoughts

by turo (Friar)
on Feb 17, 2006 at 14:24 UTC ( [id://531046]=perlquestion: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.

turo has asked for the wisdom of the Perl Monks concerning the following question:

These days i've played a lot with Gtk2 ... I remember i said some time ago, that i didn't like to program GUIs, because of the tedious and you must write an enourmous program for getting what you want ...
I think, i was no fully right then, because learning is anything but tedious (curiosity needs to eat ... whatever you feed) ...
That is, Gtk2 for perl, is like an adventure for me and I suppose I will be charmed by this Library during a long time from now... But, like love, it will turn tedious soon.

So i'm thinking in the next stage: how can I automate this task?
I mean, there is any tool (like Glade) for linux to generate perl code, or even better to generate XML code (Something like XUL, or the resources used by C#) which can be compiled and interpreted for generate widgets? ... Some of you, my ($fellowship, $brothers), knows how to do this task with an impartial tool (linux, windows)?

It would be funny, to implement some perl platform independent library (i've heard that GTK2 is supported under windows) for build GUIS using a simple XML spec on the fly; if it not exists.
and
to program an ide (platform independent tool) for generating this XML :-) (something like, extending the mason tags for make widgets) (uff, i've remembered that there is a tool called entity to do the first task (from XML to Code), ... but i never used)

some ideas?, thoughts?, some voluntaries to make a crazy tool for doing this task?

At the moment, this weekend i swear i'll study the Gtk2 specs ...

Cheers

turo

perl -Te 'print map { chr((ord)-((10,20,2,7)[$i++])) } split //,"turo"'

Replies are listed 'Best First'.
Re: XUL, Gtk2, Perl and other thoughts
by phaylon (Curate) on Feb 17, 2006 at 14:41 UTC
    Well, from http://glade.gnome.org/

    "By using libglade, Glade XML files can be used in numerous programming languages including C, C++, Java, Perl, Python, C#, Pike, Ruby, Haskell, Objective Caml and Scheme."

    And for Perl there would Gtk2-GladeXML. Though, I've never used any of those. Was just a quick lookup.

    Ordinary morality is for ordinary people. -- Aleister Crowley
Re: XUL, Gtk2, Perl and other thoughts
by zentara (Cardinal) on Feb 17, 2006 at 17:17 UTC
    Check out the "gpsketcher" script in Gtk2-GladeXML-Simple. It will take a sample Glade XML file, and sketch it out to a .pl file. It could be the basis for making a high level glade gui designer.

    I'm not really a human, but I play one on earth. flash japh
Re: XUL, Gtk2, Perl and other thoughts
by turo (Friar) on Feb 18, 2006 at 08:10 UTC

    Seems like the Glade project has become a real GUI development tool (i have tried it a lot of time ago (5 years, i think, for programming a gui for an ADA95 program)).
    phaylon, zentara, this sound really good.

    But it will be better if the XML generated by Glade were a kind of standard for making GUIs ... I thought XUL were the same, but more standard ...

    perl -Te 'print map { chr((ord)-((10,20,2,7)[$i++])) } split //,"turo"'
Re: XUL, Gtk2, Perl and other thoughts
by Aristotle (Chancellor) on Feb 19, 2006 at 22:31 UTC

    You don’t want to generate code. You really don’t want to generate code. Repetition is the bane of programming. You want to abstract it away, not make it more efficient by making the computer do the typing for you.

    Indeed, the code generation stuff in Glade is deprecated.

    The recommended usage for Glade2 is to link against libglade (ie Gtk2::GladeXML in Perl) and load the XML files at runtime. You can then access widgets by the names you gave them in the Glade2 GUI editor.

    Makeshifts last the longest.

      Abstract and Automate, both are nice words :-)

      perl -Te 'print map { chr((ord)-((10,20,2,7)[$i++])) } split //,"turo"'

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://531046]
Approved by saberworks
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.