Wednesday, February 20, 2013

Automating the widget creation process.

I spent a couple of hours this morning working out a Tcl script that will create the basic components for custom widgets. There are so many repetitive elements converting a few hundred lines of C code which, if one has to edit it all by hand, takes up too much time. I'm also quite notorious for being unable to spot spelling and grammar errors and so any extra help is always welcome. The way in which the module generator works is create create a sub-directory in the src folder, create the necessary *.h, *.c and readme (working on the autodocs pages next) and then patches the Makefile and the files gnocl.c and gnocl.h in readiness for the first compile.

When I've got this to work properly, moving the whole lot into a separate, standalone Tcl/Gnocl app would be the best next move. In this case the main gnocl package can give bindings to the core Gtk+ widget set and any custom extras in a unique package that can be loaded as required.

No comments: