From: Brian P. <br...@va...> - 2001-01-29 18:09:10
|
Jonas Beskow wrote: > > Hi all, > > at > ftp://ftp.speech.kth.se/pub/beskow/tcl/Togl.tar.gz > > there is now a first version of an updated Togl entirely free from > dependencies on Tcl/Tk's internal functions. It uses the public stubs > interface, witch means that the same binary works with any stubs-aware > wish (i.e. version >= 8.1) > > It's based on the latest Togl sources from SF and is tested on Windows > NT and Linux. I haven't been able to test the Mac port, it propably > needs mending but I can't see why it shouldn't work in principle. > > There are two things missing however: overlays and font support under > windows. I've never used overlays and I don't quite understand how it > works, so I just left that part out for now. Same thing with the bitmap > fonts on windows, they required some Tk internal stuff, so I left that > out as well. > > Implementation wise, the main thing is that the old > Togl_MakeWindowExist() is replaced by Togl_CreateWindow(), a function > that gets registered in Tk as a callback for window creation. It's > really a lot cleaner and works very well. In the current CVS sources of > Tk, there is a new public API call Tk_SetClassProcs() to register this > callback, but for earlier versions of Tk one needs to do this using some > pointer magic. There is a run-time check to determine which method to > use, hence the same binary runs on all versions of Wish from 8.1 and up. > (One problem here - the runtime check looks for version 8.4a2, which is > the current CVS version, but there is also a released 8.4a2 that > _doesn't_ have the new API, so if this is used it will probably crash. > Once there is a new release out, the run-time check should be changed to > check for 8.4b1 or whatever that release is called) > > I also changed the demos to be loadable extensions rather than > statically linked wishes. The demos are now started by running the > corresponding tcl script. > > I hope that people find this update useful, it should make it _much_ > easier to use togl with different Tcl/Tk releases. Hopefully the missing > features overlays and win-fonts can be fixed. Anyone who wants to take a > stab at this? > > All comments are welcome > regards > > -Jonas Thanks, Jonas. With minor changes, I got things working with Tcl/Tk 8.0 (RedHat 6.2). I'll check in your changes soon. I encourage other people to try this out too. Jonas, I'd appreciate it if you'd update the Togl.html file to describe how things are organized, loaded and initialized. For example, how the togl.so file is made and used, how the .c demos make .so shared libraries which are loaded by the Tcl code, etc. -Brian -Brian |