This chapter provides some brief notes to help user's who wish to add their own primitive blocks to the toolkit.
Before you add your own blocks to CTK you have to make your own local version of the CTK binaries. This is done by following the steps:
setenv CTKLOCAL /home/jon/CTK
If your shell is bash, ksh, zsh or sh then edit your .profile to include the line:
cp -r \$CTKROOT/local/* \$CTKLOCAL
cd \$CTKROOT/src make
The within $CTKLOCAL/src there are files named ctk_NEW_BLOCK_TEMPLATE.cpp and ctk_NEW_BLOCK_TEMPLATE.hh. These files provide an annotated template for the code you need to implement when writing your own inbuilt blocks. The files my_blocks.cpp and my_blocks.hh contain code for a few simple example blocks. Further examples are in the $CTKROOT/src directory.
More detailed CTK developers documentation should eventually be available.
Once you have written the .cpp and .hh files for the block you wish to add you need to perform the following three steps:
Once these steps have been completed move to the directory $CTKROOT/src and type `make' and the local CTK binaries should now be rebuilt to include your new block in the CTK library. To check that the rebuild has been successful you can type `ctk' to start up the GUI and check that your block appears correctly in the pull-down block menu.