On Thursday, June 21, 2012 8:40:48 PM UTC-4, Roger Pack wrote:
>
> Hello all. I would like to wish happy birthday to my simple_gui_creator
> gem.
>
> Basically it allows you to design your window layout using
> (opinionated) ASCII art-like text:
>
> ---------------My Window Title--------------------------
> | [Click this button :button1] |
> | [Click this button too! :button2] |
> --------------------------------------------------------
>
> And then bind button actions to ruby code, like:
>
> elements[:button1].on_clicked { puts 'you clicked button1' }
>
> This makes the design part of the GUI much funner than trying to figure
> it out by hand, or "guessing" what swing or shoes are going to actually
> give you in the end. Plus it even comes with its own "GUI Editor" for
> experimenting with designs on the fly.
>
> # if you don't have jruby yet installed:
>
> $ rvm install jruby
> $ rvm use jruby
>
> # now install the gem.
> $ gem install simple_gui_creator
> $ jruby -S simple_gui_creator
>
> Jruby only for now, but I'd be happy to implement another backend like
> Tk or any other toolkit if there were interest. So rvm install jruby
> and then install the simple_gui
> Feedback/feature requests/suggestions welcome.
>
> Complete info:
>
> https://github.com/rdp/ruby_simple_gui_creator/blob/master/README
>
>
Great minds think alike, ey Roger? I worked on something like that years
ago but never followed threw with it. If I recollect correctly I had called
it ArtML. I recall my design originally started off rather complex, in that
the "ascii art" syntax could defined quite a bit. Later on I simplified
things such that each element defined just type, name and optionally
class(es). Then I used some YAML to tie it all together and to flesh it
out. So you might have had something like:
--- !artml-layout
main_window:
+----------------+
| [ button1 ] |
| [ button2 ] |
+----------------+
--- !artml-data
main_window: !window
title: My Window Title
button1: !button
text: Click this button
button2: !button
text: Click this button too!
Anyway, I think it is a great idea (obviously) and Tk and (especially) HTML
targets would be awesome.
-- You received this message because you are subscribed to the Google Groups
ruby-talk-google group. To post to this group, send email to
[email protected]. To unsubscribe from this group, send email
to [email protected]. For more options, visit this
group at https://groups.google.com/d/forum/ruby-talk-google?hl=en