<div dir="ltr"><span style="font-size:12.8000001907349px">> I had a look at your wrapper code.  It is extremely well-organized and</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">readable, btw.</span><br><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">> On the one hand, you're giving users/devs a much improved API with which</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">to create</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">and maintain GUI externals.  I've been porting Pd to a different toolkit</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">(and completely</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">away from tcl/tk), so I am intimately familiar with the many, many</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">reasons you don't</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">want to use or add to the existing widgetbehavior callbacks.</span><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Thanks !</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">On the other, your improved API ends in Tk canvas subcommands, and thus</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">inherits</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">all the limitations and bugs of Tk canvas.  For simple/limited GUI</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">widgets it's possible to</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">workaround these problems-- in most cases the external developer can</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">hide the</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">problems completely from the end user.  But for complex things like a</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">drawing surface</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">those bugs and limitations are exposed fairly directly to the end user.</span><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">I'm totally agree with you about the fact that TK has annoying limitations but I didn't notice any real bug and we can't avoid Tk if we want to be compatible with pd-vanilla (for the moment the only other solution seems to make another distribution like l2ork*). When I call "egraphics_line(g, 0, 0, 10, 10)" for example TK draws a line from 0, 0 to 10, 10 and it works for every other shapes. I think that GUIs like hoa.map or hoa.3d.scope~ are quite complicated and I didn't encounter any big difficulty during the implementation (perhaps because I convert almost every shape to a bezier curve...).</span><br></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">* I tried to mix Tk with Juce but on Mac we can't retrieves the window's pointer from tk so this is useless.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">Practically speaking, what is Pierre's alternative? What tradeoffs for</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">> </span><span style="font-size:12.8000001907349px">user and developer are there in choosing a GUI alternative?</span><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">For devs, I'll try to explain quickly what the CICM Wrapper does for graphics and interactions.</span><br></div><div><span style="font-size:12.8000001907349px">- Instead of drawing directly in the canvas, it creates a tk window widget and draws inside this "fake" window (t</span><span style="font-size:12.8000001907349px">hat allows to clip the shapes within the boundaries of the box and to bind the object to all the interactions). </span></div><div><span style="font-size:12.8000001907349px">- When you want to draw something, you have to create a layer that will be saved until you invalidate it (to avoid to recompute every time).</span></div><div><span style="font-size:12.8000001907349px">- When you draw a shape (line , curve, rectangle, circle, oval, etc.) it is converted to a bezier curve (that allows to apply matrix transformations for example).</span></div><div><span style="font-size:12.8000001907349px">- All the interface is in C, all the layers are translated to Tk instruction when they should be drawn. So if you want to change the Tk graphic API, you don't have to change the whole interface but only the "translation" function (and some other </span><span style="font-size:12.8000001907349px">small</span><span style="font-size:12.8000001907349px"> stuffs like popup). </span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">In fact, there're a lot of stuffs in the Wrapper but I think that the code is well documented : <a href="http://cicm.github.io/CicmWrapper/">http://cicm.github.io/CicmWrapper/</a>. </span></div><div><span style="font-size:12.8000001907349px">And for user, you should explore Cream and look at c.help.</span><span style="font-size:12.8000001907349px">gui</span><span style="font-size:12.8000001907349px">.pd subpatch in the help files :)</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Cheers</span></div><div><br></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px"><br></span></div></div>