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

Announce: generic user interfacing tool (was: Re: A Qt alternati

[ CC to debian-user left in, but I don't read it, so please preserve 
  a CC to me if you respond to it on there ]

On  3 Apr 97, Lars Hallberg Micro++ wrote:

> What do You think of a Wrapper Class Libary that makes it easy to
> write code that runns on diferent widget sets? If it makes it
> posably to chose real interface "runtime" it be real cool. One app,
> run it in KDE, xform, MooTiff, Athena widget set, Tcl/tk, thin Java
> clients ... whatever. The basic funktions (inputfield, menus etc)
> could also be available on textterminals (thru curses, termcap,
> slang ...). That makes it a perfect choice fore system tools...

I had been thinking along the same sort of lines as the last part of
this: wouldn't it be great to have a version of `dialog' which is
(a) fast, and (b) uses whatever method of interfacing is available?
Obviously, this isn't such a big project, as it would be of
absolutely no use as a general widget set, but it on the other hand 
it would make adding new parts rather easier.

My original plan was to come up with some sort of possible framework 
for this, and then send it to debian-devel and see what everyone said 
--- it has obvious uses for making much nicer configuration scripts 
etc, which would be a big bonus --- but one night I was bored, and 
got sidetracked into writing half of it. I am currently finishing off 
a `proof of concept' version, which I was going to announce here in a 
week or so, but given that it's come up I thought I'd better put my 
oar in now! When I've got it in a testable state, I'll probably 
upload it into experimental.

The system is called Giggle, for Generic Interactive Information Gathering 
Library (yes, I know that doesn't quite fit, but I liked the name :).

Here follows a description of where I see it going. Obviously this is 
open to comments, and (especially if you want to start using it for 
installation scripts at some point) I am more than happy to make 
fairly major changes to this outline. If you think it's not suitable 
for this, I shall still go ahead and do at least the dialog part, so 
don't worry about hurting my feelings or wasting my work!

The core of the system is a shared library, libgiggle. This contains 
code to load interface modules dynamically and work out which one to 
use, and code to allow the application to request various sorts of 
information. At the moment, it is designed to handle the following 
types of input and output:
  o messages to the user (message boxes)
  o displayed, scrollable text, for the user to read
  o text input boxes, including user-defined validation of input
  o menus
  o some-of-many and one-of-many choices (checkboxes and radio 
  o progress meters (thermometer bars, or similar)
  o access to an actual text console, for example running an xterm 
    for you or just going back to normal console mode, both in the 
    foreground and the background.
And possibly some other things which I've forgotten about (the 
computer which I email from is unfortunately not the same one I'm 
writing it on). It also includes full support for i18n, and full 
context-sensitive online help. It is configurable in a file in the 
user's home directory (~/.gigglerc), and a system-wide file 
(/etc/giggle.conf), with provision for the imodules to use the same 
configuration. In fact, there is a generic interface for configuration 
files, which can be used by programs which use it as well, but that 
is only there because it was almost there anyway!

Having got the C library working, I believe it's possible to provide 
a Perl interface to it as well.

There are a few programs which can be written using the library. One 
is a dialog `clone'[1], which will hopefully be rather faster 
(initial testing indicates this) as well as using native X graphics 
when running under X. I am also wondering if a better interface is 
possible, but that's a more long-term project.

Another idea was to have some way to specify a template saying what 
information a package needs for congfiguration, and write a 
giggle-based parser for that which will read the information. 
That is something which would have to undergo a lot of discussion, 
though, especially since it would seem to fit in fairly well with 
some of the other `configuration database' proposals which are 
floating around.

And, of course, it has the potential to include lots of different 
interface modules. Ideas I have so far include SLang-based (already 
mostly implemented, but there is absolutely no reason to just stick 
with one), raw tty, SVGAlib, various X toolkits, disc file ... the 
list goes on.

So, tell me what you think. Unfortunately I don't want to release it 
to the public yet, but if somebody wants to write an X-based 
interface module to demonstrate that, they would be more than welcome 
(my X experience is limited to once having read a book about X11R3!) 
Mostly, though, I'm just asking for coments, and letting anyone else 
who was thinking about it know what I'm doing.



[1] I can't actually clone it exactly, as I have put in no way of 
specifying window positions and sizes. But I can provide a 
command-line-equivalent version, I believe; the library was designed 
to have all the features which Dialog has.

.sig to follow

Reply to: