gutopia-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rgui-dev] Idea for binding to the low level api


From: Tom Sawyer
Subject: Re: [rgui-dev] Idea for binding to the low level api
Date: 30 Aug 2002 06:32:36 -0600

Interesting idea. Funny thing, it, along with massimilinao's reply, is
quite reminiscent of something i started prior to GUtopIa and had
actually helped bring me to this whole endeavor.

do you recall from any my previous posts on ruby-talk, my mentioning
MiterBox? well, miterbox does something like this. here's how it works
essentially.

take a look at the first attached file, addresses.apt. that's MiterBox's
markup for a gui layout. you'll notice a few things about it. various
brackets represent different types of widgets:
  <Button>
  [Line Text Entry]
  [[Multi Line Text Entry]]  # with two lines
  "Label"
and so on. i originally geared this toward generating html, but later
generated tk too. i had all your major widgets covered. you will also
notice that everything is layed out in a table format. row dividers
using = instead of - meant that the content was "detail" and would thus
be repeated a number of times. how many times? well each of those
widgets have a name and a class seperated by a period. ex-
<button.btnstyle> in your program you make a big data hash that contains
all the data to be displayed. ex- data['button'] = 'Click Me'. thus our
button widget would showup saying 'Click Me'. you also had a style hash,
so style['.btnstyle'] = 'font-color=red font-size=24' would give every
widget of class btnstyle those features. and of course there are a few
other things you can do with it as well. oh but to get back the question
of how many: data['aDetailWidget'] = ['and_a_one', 'and_a_two', ... ] so
you'd just use an array to get a number of the same sections with
different data.

this worked pretty well actually. i was able to make these template
files and feed in the hashes and generate gui in html and tk. but then
it started to get hairy when i decided to make a gtk version. seems that
the third gui is the charmer ;-) i started to run into compromising
issues, where the differnt tookits didn't lend to acting similiarly.
that was the root of my frustration and thus i abandoned the whole deal,
hoping only that perhaps one day i would find a good gui and perhaps
make my ascii templates for it. upon looking for such a gui, i discoverd
Rouge and that's how this whole ball got rolling.

but back to your idea.... in a later a post.

~tom

Attachment: addresses.apt
Description: Text document

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]