gutopia-dev
[Top][All Lists]
Advanced

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

Re: [rgui-dev] project design proposal


From: Tom Sawyer
Subject: Re: [rgui-dev] project design proposal
Date: Sat, 14 Dec 2002 04:33:11 -0700
User-agent: KMail/1.4.3

quick question:

        is the message supposed to appear in the statusbar? is that the idea?

-transami

On Friday 13 December 2002 06:38 pm, Thorsten Roggendorf wrote:
> Hi,
>
> I have a first draft of how to design the API. I'll show you the steps
> required of the client programmer in defining his interface.
> First he puts the following in a file metaDesign.rb:
>
> interface = \
>   [toplevel,
>     [menu,
>       ["File", "save", "open", seperator, "exit"],
>       ["Help", "Help", seperator, "About"]
>     ]
>     [container,
>       [container,
>         entry("Day",   integer(Time.now.day,     1..31  ) ),
>         entry("Month", integer(Time.now.mon,     1..12  ) ),
>         entry("Year",  integer(Time.now.year, 1900..2050) )],
>       [container, button("Ok"), button("Apply"), button("Cancel")],
>     callback(
>       button("Action"),
>       message(
>         "Next eclipse ist at ",
>         string(???),
>         "day the ",
>         integer(1..31),
>         ". of ",
>         integer(1..12),
>         " ",
>         integer,
>         "."
>       )
>     statusbar
>   ]
>
> This will create a simple Interface for some App that calculates the
> next eclipse or something.
> The whole thing is a nested ruby Array. Every element that not itself an
> Array or a String is a function call.
> The first element of each nested Array is the container of further
> nested elements. If the container is specified layout is up to the user,
> otherwise the backend tries to make good choices.
> A simple script can be run over this file and will replace the ??? with
> a complete and informatively named argument list.
> Another script call generates a couple things:
> - metaDesign.gui.rb: the GUI-Code in GUItopia API
> - metaDesign.xml: XML definition of possible parameter files
> - metaDesign.COR: CORBA interface definition
> - metaDesign.callback.rb: callback skeletons for the buttons and menus
> - ...
>
> metaDesign.callback.rb will start with "require 'metaDesign.gui.rb'".
> The "Action" button will automatically display a message window. In
> CORBA interfaces the constant strings will be removed from the return
> message and an array of ints returned. In parameter file execution the
> message will be printed to standard out.
> Integer entries will automatically be labled spinbuttons and so on.
> In metaDesign.callback.rb you can do things like:
> $toplevel.container.container1.hide
> $toplevel.container.container2.deactivate
> $toplevel.button.deactivate
> $topleve.statusbar = \
>   "I don't want to calculate eclipses anymore, get me another job!"
>
> Cheers
>
>    Thorsten
>
>
>
> _______________________________________________
> Gutopia-dev mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/gutopia-dev




reply via email to

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