hi i'm a newby to TK and also to LTK. I have a program
which has its own internal event handling and event
dispatching mechanism.. Is it possible for me to use
LTK for its graphical ability without given it control
of the event loop?
I want to draw shapes onto a TK canvas and move them
around and change their coordinates and various
attributes.
Does anyone know how i can do this?
-jim
Le 30-10-2004, Jim Newton <·····@rdrop.com> a �crit�:
> hi i'm a newby to TK and also to LTK. I have a program
> which has its own internal event handling and event
> dispatching mechanism.. Is it possible for me to use
> LTK for its graphical ability without given it control
> of the event loop?
>
> I want to draw shapes onto a TK canvas and move them
> around and change their coordinates and various
> attributes.
>
> Does anyone know how i can do this?
Have a look at the mainloop function in ltk.scm. It is not very long
(~30 lines of code), and could be easily embedded in your own event
mechanism.
Skal
Jim Newton wrote:
> hi i'm a newby to TK and also to LTK. I have a program
> which has its own internal event handling and event
> dispatching mechanism.. Is it possible for me to use
> LTK for its graphical ability without given it control
> of the event loop?
>
> I want to draw shapes onto a TK canvas and move them
> around and change their coordinates and various
> attributes.
The macro with-ltk mainly consists of a call to start-wish, then executing
the user code and finally calling mainloop to perform the event handling,
so the way to achieve your goal is just to call start-wish and then run any
code to create/modify Ltk widgets (which is also nice to try out things
from your Lisp REPL)
Peter
--
pet project: http://dawn.netcologne.de
homepage: http://www.peter-herth.de
lisp stuff: http://www.peter-herth.de/lisp.html
get Ltk here: http://www.peter-herth.de/ltk/