|File: [cvs.NetBSD.org] / othersrc / dist / cdk / EXPANDING (download)
Revision 220.127.116.11 (vendor branch), Thu Jan 4 19:58:33 2001 UTC (15 years, 9 months ago) by garbled
CVS Tags: HEAD
Changes since 1.1: +0 -0
Initial import of CDK 4.9.9. The work to port this was performed by
Charles Hannum, and that is the version being imported:
Cdk New Widget Guide
Copyright Mike Glover, 1995, 1996, 1997, 1998, 1999
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 requirements are as follows:
* The function names should be like:
newCDKXXX, destroyCDKXXX, setCDKXXX, drawCDKXX,...
Any widgets with functions 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
* If applicable, the next two parameters should be xpos and ypos in
* If applicable, the next two parameters should be the height and
width of the widget.
* If the widget has a title, the next parameter should be a char *
for the title.
* If the widget has a label, the next parameter should be a char *
for the label.
* The last two parameters of the newCDKXXX function should be:
Boolean box, Boolean shadow if the parameters apply.
* The drawCDKXXX function should only have the pointer to the object and
a Boolean box as it's parameters. (in that order)
* 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
* Try to contain anything specific to the widget in a single file. This
keeps the overhead of misc. files from floating around.
* Create a standalone header file which includes cdk.h if needed.
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
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. (ie:
include the newly created 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
* A copy of the new widget file.
* tar this up and send it to me at
firstname.lastname@example.org or at email@example.com
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.
If you want to get a hold of me mail me at one of the following:
The CDK Web page has several homes. They are:
http://www.datasoft.on.ca/~cdk (Sponsored by the nice folks at Datasoft)