[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Sep 30 17:15:46 1999 
Subject:re guis. 
From:Robin Popplestone 
Volume-ID:990930.02 

I'm currently dusting off some old code I had for the AutoWeb system
(not to be confused with the organisation that sells motor cars. Ugh!)

	THIS IS NOT A SPECIFICATION... [I'll probably change quite a lot]

The FIRST thing I'm doing is what I hope is a flexible stand-alone
system that will create a structure of Poplog widgets from a
simple specification. For example the procedure-call:

	make_Widgets([Button 'hello' ^(npr(%'hello world'%))],
          procedure(shell,comp,layout); end);


will create a shell window, with an enclosed composite widget and
a single "button" (which is actually a XpwGraphic widget). On
the button is the inscription 'hello'. When the button is pressed,
'hello world' is printed in the terminal window.

If we replace the string 'hello' by a procedure, it will be called
when the widget is created, and can do anything it likes to it,
such as draw a little picture, or make it purple.


	make_Widgets(
        [Row
			[Button 'hello' ^(npr(%'thisis run na mara'%))]
			[Button 'bye' ^(npr(%'run na mara out'%))]
        ],
          procedure(shell,comp,layout); end);

	make_Widgets(
        [Graphic 'Main' 100 100]
          procedure(shell,comp,layout); end);


will create a row of two buttons. With Row  and Column to provide
horizontal and vertical adjacency relationships, one should be
able to create a range of layouts of widgets within a shell.

The procedure argument to make_Widgets allows the user to finish
off building the widget set, by adding call-backs not included
in the layout specification. Access to these widgets will
be by using the layout structure provided as argument which
has been augmented by putting the actual widget records
in the last place (ok I know you can do it thro' the
widget-structure-navigation capabilities, but it's
easier to have it as an ordinary list structure as a
description of what you've got in my opinion. Robin.