From owner-freebsd-hackers Mon Dec 1 19:04:26 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id TAA18434 for hackers-outgoing; Mon, 1 Dec 1997 19:04:26 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from rhiannon.clari.net.au (rhiannon.clari.net.au [203.27.85.9]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id TAA18414 for ; Mon, 1 Dec 1997 19:04:17 -0800 (PST) (envelope-from peter@rhiannon.clari.net.au) Received: (from root@localhost) by rhiannon.clari.net.au (8.8.5/8.8.5) id OAA17066; Tue, 2 Dec 1997 14:04:04 +1100 (EST) Date: Tue, 2 Dec 1997 14:04:04 +1100 (EST) From: Peter Hawkins Message-Id: <199712020304.OAA17066@rhiannon.clari.net.au> To: jkh@time.cdrom.com, peter@rhiannon.clari.net.au Subject: Re: GUI wizard interface Cc: danny@hilink.com.au, freebsd-hackers@FreeBSD.ORG, j@uriah.heep.sax.de Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Hmmm. This sounds very promising, though without a bit more detail >it's hard for me comment any more significantly on it. Strangely >enough, I've also been working on a "wizard" tool these last couple of >days since I managed to hand Mike Smith my package & installer hat a >few weeks back and am now free to think about different problems in >that same general region of the system. Perhaps we can work together >on some aspect of this? Sure! How about you send me the code to your back end (the ppp thing which calls it) so I can get a feel for your contexts concept? In my case, the interface you'd write would be a finite state machine but it sounds sort of similar. The alpha will be out (I hope) within a week. I had envisaged that 1.1 would have an improved interface which I'd write using lex and define a syntax to be an alternative to direct calls. Perhaps I could encompass your contexts that way? The finite state machine doesn't push or pop states as it is; here is a crude example... exithandle() { cvend(); } display( char *result) { cvprintf("user added",result,"ok",mainmenu,"back",mainmenu,"cancel",exithandle); } adduser( char *result) { cvdialoglist( "Add an account", "type in up to 4 values", "enter username", "enter account name", "enter uid", "home directory", "back", mainmenu, "next", display ); } mainmenu() { cvbuttonlist( "Account manager", "press your button", "add new account", adduser, "delete account", deluser, "cancel", exithandle ); } main() { cvinit( stuff ); mainmenu(); } items are buttons or dialogs. buttons are followed by a handler routine name and the names "ok" "next" "back" and "cancel" are special - always buttons and are placed in the navigation bar at the bottom of the screen. cvprintf() is used to display messages and results. I am planning to add cvmatrix() which will combine all the above into a single call defining a state matrix. Peter Peter