[comp.sys.amiga] 3D Gadget library / X Toolkit simulcrum, hopefully PD?

jkh@bambam.pcs.com (Jordan K. Hubbard) (11/26/90)

I've been using MED 2.13 for awhile now and really like the program,
though I would like a nicer look-and-feel; buttons that push in,
slimmer fonts and text areas, etc. Anyway, rather than criticise MED's
interface (which would be unfair, given its low-low price and
otherwise excellent utility), what I'd like to do is hack on it a bit.
Since I'm loath to design a bunch of custom gadgets for only one
purpose, I'm wondering if a more general "toolkit" approach might not
be interesting and/or potentially useful. Has anyone done anything
like this already? I'd hate to reinvent such a massive wheel.

If anyone has used the X Toolkit, what I'd envisoned was something
based along the same lines, but much slimmer and without quite the
same type of functionality since we're talking about a much different
set of goals. It would be nice to have something like the following,
though:

.. various includes ..

main()
{
	AtGadget top, box;
	extern void onButton1(), onButton2(), onButton3();

	AtInitialize( .. )

	/* AtGadgetCreate is VARARGS routine */
	top = AtGadgetCreate( "test_win", OuterWindowGadgetType,
			      "height", 100, "width", 200, NULL );

	box = AtGadgetCreate( "box", BoxManagerGadgetType, NULL );

	AtGadgetCreate("button1", ButtonGadgetType,
		       "callback", onButton1,
		       "3dLook", TRUE, "foreground", "blue",
		       "background", "grey", NULL);

	AtGadgetCreate("button2", ButtonGadgetType,
		       "callback", onButton2,
		       "3dLook", TRUE, "foreground", "yellow",
		       "background", "grey", NULL);

	AtGadgetCreate("button3", ButtonGadgetType,
		       "callback", onButton3,
		       "3dLook", TRUE, "foreground", "white",
		       "background", "grey", NULL);

	AtGadgetMap(top);

	AtMainLoop( ... );
}


It would also be possible to "register" various AmigaDOS events with the
toolkit so that everything could be done via callbacks and event handlers
dispatched from AtMainLoop().

Naturally, the whole thing would be a lot of work and I'm not sure how
far I'd be willing to go with the "managing" gadgets, but as I've been
working with the X toolkit for several years now, I think it would all
be a very interesting challenge. 3 years later, I might even re-write
the MED screens! :-)

					Jordan