[GUI] Recent threads

David Sankel camio@yahoo.com
Tue, 15 Apr 2003 17:09:32 -0700 (PDT)


Hello All,

  I've been silently listening to the recent threads. 
I feel like some of these conversations are going back
to issues discussed a month or two ago.  So here is a
concrete proposal.  Yay or nay.  I suggest merging
this with the standard and then changing it with other
proposals.  This seems to be an effective way of
getting things done.

1.)  class Widget where
    -- Some operations on widgets such as getHeight
getWidth (the units of these are not yet specified)

2.)  Widgets have several types of variables
  a) r/w variables are handled by attributes
  b) write only variables are passed to the
constructor before the attribute list.
  c) read only variables are handled by functions such
as (getWidth :: Widget a => a -> Int).  For read only
variables that do not fit into an obvious class will
have their own class ( class HasGetFoobar where ... )

3.) callbacks are not variables.  Signal is a more
appropriate descriptor than variable.  For a given
signal <A> with parameters (a1, a2, ... ) :

  class EmitsSignal<A> a where
    doOn<A> :: a -> ( a1 -> a2 -> . . . -> IO() ) ->
IO()

  The doOn<A> function returns a function which can be
used to disconnect the signal.

4.) A widget <A> with (a1, a2, ...) write only
variables is created with:
   mk<A> :: a1 -> a2 -> ... -> [Prop <A>] -> IO <A>

5.) Issues to push back for discussion for a future
CGA release:
   a.) Resource files.
   b.) Internationalization.
   c.) GUI designer.

6.) Position, width, and size will be able to be
programmed
   a.) Dynamically, and
   b.) Concretely

This proposal maintains the original goals of being
typesafe and fully dynamic.

As I said above, lets ratify this (yay or nay) and
then consider proposals for changes and additions.

Sincerely,

David J. Sankel