[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rgui-dev] API Time
From: |
Tom Sawyer |
Subject: |
Re: [rgui-dev] API Time |
Date: |
23 Aug 2002 16:29:18 -0600 |
to give you an idea of what a yaml gui description might look like here
are two versions. the first uses a parent-child layout, the second uses
named references instead. fyi - i generated this from GUtopIa's
sample1.rb code with the to_yaml method and only needed to make two
modifications by hand: remove a repetion of the window widget (i haven't
figured that one out yet) and to show the use of named references. i
left the more "esoteric" parts in just so you could see them, e.g.
"___events___". they would likely be taken out, or at least cleaned up.
SAMPLE v1:
--- !ruby/object:GUtopIa::Window
caption: Fruity Fun Time
height: 300
body:
-
- !ruby/object:GUtopIa::RadioBox
"___events___":
change:
- !ruby/object:Proc {}
value=:
- !ruby/object:Proc {}
items:
- None
- Apple
- Orange
- Banana
value: None
-
- !ruby/object:GUtopIa::Button
"___events___":
press:
- !ruby/object:Proc {}
text: Quit
width: 200
layout: !ruby/sym grid
SAMPLE v2:
--- &abutton !ruby/object:GUtopIa::Button
"___events___":
press:
- !ruby/object:Proc {}
text: Quit
--- &aradio !ruby/object:GUtopIa::RadioBox
"___events___":
change:
- !ruby/object:Proc {}
value=:
- !ruby/object:Proc {}
items:
- None
- Apple
- Orange
- Banana
value: None
--- !ruby/object:GUtopIa::Window
caption: Fruity Fun Time
height: 300
body:
-
- *aradio
-
- *abutton
width: 200
layout: !ruby/sym grid
On Fri, 2002-08-23 at 14:52, Massimiliano Mirra wrote:
> On Fri, Aug 23, 2002 at 01:19:30PM -0700, Curt Hibbs wrote:
> > > I admit some reluctancy to consider XML. I'd like to imagine a GUI by
> > > just looking at its description, and it's hard with XML where
> > > everything soon becomes flooded with tags.
> >
> > Perhaps I spoke too quickly about pushing for XML, as I really know little
> > about YAML.
>
> And neither do I, plus I have not much experience with XML, so don't
> trust my opinion too much. :-)
>
> > I was viewing it from a developer familiarity and tool availability
> > perspective.
>
> Good points.
>
> Massimiliano
>
>
>
> _______________________________________________
> Gutopia-dev mailing list
> address@hidden
> http://mail.freesoftware.fsf.org/mailman/listinfo/gutopia-dev
>
--
~transami
Re: [rgui-dev] API Time, Tom Sawyer, 2002/08/23
Re: [rgui-dev] API Time, Tom Sawyer, 2002/08/24
- Re: [rgui-dev] API Time, Tom Sawyer, 2002/08/26
- Re: [rgui-dev] API Time, Tom Sawyer, 2002/08/27
- RE: [rgui-dev] API Time, Curt Hibbs, 2002/08/27
- Re: [rgui-dev] API Time, Tom Sawyer, 2002/08/28
- Re: [rgui-dev] API Time, Tom Sawyer, 2002/08/28