Cdk new widget guide.
Copyright Mike Glover, 1995
-------------------------------------------------------------------------------

If you want to create a new widget for Cdk, and want it in the standard
dist of Cdk, you will have to follow some requisites that I have. I state
these because Cdk has been worked on for quite some time and I finally
got it to a state where the functions calls are somewhat consistent. Any new
widgets should adhere to this. The requirement are as follows:

	* The function names should be like:
	newCDKXXX, destroyCDKXXX, setCDKXXX, drawCDKXX,...
	Any widgets with function not in this format should be 'private'.
	If this is not the case one of three things will happen:
		1) The widget will not get accepted
		2) I will mail you back asking you to follow the standards.
		3) I will do it myself. (HIGHLY unlikely)

	* The first parameter of the newCDKXXX function should be of type
	CDKSCREEN.
	* If applicable, the next two parameters should be xpos and ypos in
	that order.
	* If the widget has a label, the next parameter should be lpos followed
	by char *label.
	* If the widget has an exchangeable control function, like the entry and
	mentry widgets, then the it should be third from the end of the
	parameter list.
	* The last two parameters of the newCDKXXX function should be:
	boolean box, boolean shadow if the parameters apply.
	* The drawCDKXXX function should have boolean box as it's last
	parameter.
	* The first parameters of any other function relating to the widget
	should be a pointer to the widget type. ie: CDKRADIO *, CDKFSELECT *...
	* A destroyCDKXXX function has to be provided as well as a drawCDKXXX
	function.
	* Try to contain anything specific to the widget in a single file. This
	keeps the overhead of misc files from floating around.

If you follow the guidelines, then the files you need to change to sew the new
widget into Cdk, are:

	cdkscreen.c	So this widget will get refreshed on a refreshCDKScreen
			function call.
	binding.c	To allow key bindings for the widget. If it is possible
			to have key bindings I stress that this be incorporated.
	cdk.h		To add in the function def's to the header file.
	Makefile	Add in the new widget files.

If you have done all of this then what I need from you is the following:

	* A diff of all the files from the dist. that you modified. Use
	patch, I prefer it. If you haven't got it, get it and use it. It makes
	life easy.
	* A copy of the new widget file.
	* tar this up and send it to me at
	glover@tuzo.erin.utoronto.ca
	I will mail you back when I get it and I will tell you if everything is
	OK or not.

I hate to be such a nit pick, but if we follow the above standards, Cdk will
evolve into a very nice library, with a lot of really nice widgets.

ttfn,
	Mike
