* add a set_close_cllback function to the textwindow mini-api to set a callback to be called when the window gets closed.
* fix few issues regarding the closing of the window
svn path=/trunk/; revision=17165
- remove the field_menu altoghether (It was not what I thought)
- move a declaration to the start of a function to allow VC6 to compile
svn path=/trunk/; revision=17161