nanogui: Comments on NanoWidgets


Previous by date: 5 Oct 1999 22:25:50 -0000 Re: Request for comments - Microwindows, Darran D. Rimron
Next by date: 5 Oct 1999 22:25:50 -0000 Re: Windows in Windows - debate, Greg Haerr
Previous in thread:
Next in thread: 5 Oct 1999 22:25:50 -0000 Re: Comments on NanoWidgets, Vidar Hokstad

Subject: Comments on NanoWidgets
From: Greg Haerr ####@####.####
Date: 5 Oct 1999 22:25:50 -0000
Message-Id: <01BF0F4D.F48A0E50.greg@censoft.com>

: In that case I suggest you look at my NanoWidgets widget set, and comment
: on it if there are specific things you need in order to be able to use
: it. It would be nice avoiding duplicate efforts.

	I  have comments on NanoWidgets.  

	I am concerned about the api's used to set various
characteristics of each widget.  Although I like the new mechnism
to get an NOBJECT *, I don't like that there are separate api's to, say,
resize a widget.  This is system endemic.  Say we want to resize a button (b1)
and a radio (r1).  We have to:

	b1 = NEW_NOBJECT(button);
	r1 = NEW_NOBJECT(radio);
	// very cool so far
	n_button_init(b1, parent, title);
	n_radio_init(r1, parent);
	// geez, why do we have separate nobject init calls?  Both require
parents, why not specify them in the NEW?  Also, radio's could use a title
too.

	In general, there ought not be a separate api for each object type.
The general n_widget_xxx ought to handle standard initializations.  I can see
where someday you might want special widget calls, but not for basic stuff like
setting titles (text) and default handlers.

	In this way, people less inclined to architecture can add new widgets
without over-extending the api such that you have to know everything about 
the specific object to do anything with it.  Take the case of a dialog editor
application.  You mean it's got to be coded specially for each object that
it wants to place.  Bad design.

	Anyway, these are my $.02 worth (I don't have any SKs). I like
the overall class design madness that Vidar has built, but I'm kindof an api
nut and I think this should be sorted out early.  This also lets a standard
api to be used, while letting others reimplement the widget.  In other words,
the widget implementation doesn't come across in the api.

	The following ought to be available (changeable by standard api's)  for any widget:

	class, x, y, cx, cy, title, parent, style, callback

	Widgets that need more than this can have extension api functions, 
but the standard ones can then be used for most.

Greg
	

Previous by date: 5 Oct 1999 22:25:50 -0000 Re: Request for comments - Microwindows, Darran D. Rimron
Next by date: 5 Oct 1999 22:25:50 -0000 Re: Windows in Windows - debate, Greg Haerr
Previous in thread:
Next in thread: 5 Oct 1999 22:25:50 -0000 Re: Comments on NanoWidgets, Vidar Hokstad


Powered by ezmlm-browse 0.20.