Howto:  Implement a new Gnocl widget.

A) Files from the GTK Widget Set.
B) Gnome widgets.
C) Third Party Widgets
D) Tcl scripted Widgets.


A) Files from the GTK Widget Set.

1.  a) Create a new source file, named after the Gtkwidget itself: e.g. GtkButton -> button.c
    b) Edit the Makefile to include the object filed created by thge compiler to the makefile variable GTK_OBJ.

2.  a) Edit the widget source to add:

    #include "gnocl.h"

    Then, add static array to hold list of possible widget options and their handlers. Reference needs
    to be made to the GTK API documentation to identify properties and signals are native to the widget type
    and whether other desired options are available through inheritace.

    In the following example sample options are taken from from button.c:

    static GnoclOption buttonOptions[] =
    {
    /* widget specific options */
	{ "-text", GNOCL_OBJ, NULL },    /* 0 */
	{ "-icon", GNOCL_OBJ, NULL },    /* 1 */

	/* GtkObject Properties */
	{ "-data", GNOCL_OBJ, "", gnoclOptData },
	{ "-hasFocus", GNOCL_BOOL, "has-focus" },
	{ "-heightGroup", GNOCL_OBJ, "h", gnoclOptSizeGroup },
	{ "-name", GNOCL_STRING, "name" },
	{ "-normalBackgroundColor", GNOCL_OBJ, "normal", gnoclOptGdkColorBg },
	{ "-activeBackgroundColor", GNOCL_OBJ, "active", gnoclOptGdkColorBg },

	/* GtkButton specific signals */
	{ "-onEnter", GNOCL_OBJ, "E", gnoclOptOnEnterLeave },
	{ "-onLeave", GNOCL_OBJ, "L", gnoclOptOnEnterLeave },
	{ "-onClicked", GNOCL_OBJ, "clicked", gnoclOptCommand },
	{ "-onButtonPress", GNOCL_OBJ, "P", gnoclOptOnButton },
	{ "-onButtonRelease", GNOCL_OBJ, "R", gnoclOptOnButton },

	/* GtkWidget signals */
	{ "-onPopupMenu", GNOCL_OBJ, "popup-menu", gnoclOptCommand },
	{ "-onRealize", GNOCL_OBJ, "realize", gnoclOptCommand },
	{ "-onShowHelp", GNOCL_OBJ, "", gnoclOptOnShowHelp },

	{ "-prelightBackgroundColor", GNOCL_OBJ, "prelight", gnoclOptGdkColorBg },
	{ "-relief", GNOCL_OBJ, "relief", gnoclOptRelief },
	{ "-sensitive", GNOCL_BOOL, "sensitive" },
	{ "-sizeGroup", GNOCL_OBJ, "s", gnoclOptSizeGroup },
	{ "-tooltip", GNOCL_OBJ, "", gnoclOptTooltip },
	{ "-visible", GNOCL_BOOL, "visible" },
	{ "-widthGroup", GNOCL_OBJ, "w", gnoclOptSizeGroup },

	{ "-backgroundImage", GNOCL_OBJ, "", gnoclOptBackgroundImage },

	/* inherited GtkWidget properties */
	{ "-heightRequest", GNOCL_INT, "height-request" },
	{ "-widthRequest", GNOCL_INT, "width-request" },

	{ NULL },
    };

from above it can be seen that four items are associted with
