> I had a look at your wrapper code. It is extremely well-organized and readable, btw.
> On the one hand, you're giving users/devs a much improved API with which > to create > and maintain GUI externals. I've been porting Pd to a different toolkit > (and completely > away from tcl/tk), so I am intimately familiar with the many, many > reasons you don't > want to use or add to the existing widgetbehavior callbacks. Thanks ! > On the other, your improved API ends in Tk canvas subcommands, and thus > inherits > all the limitations and bugs of Tk canvas. For simple/limited GUI > widgets it's possible to > workaround these problems-- in most cases the external developer can > hide the > problems completely from the end user. But for complex things like a > drawing surface > those bugs and limitations are exposed fairly directly to the end user. 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...). * I tried to mix Tk with Juce but on Mac we can't retrieves the window's pointer from tk so this is useless. > Practically speaking, what is Pierre's alternative? What tradeoffs for > user and developer are there in choosing a GUI alternative? For devs, I'll try to explain quickly what the CICM Wrapper does for graphics and interactions. - Instead of drawing directly in the canvas, it creates a tk window widget and draws inside this "fake" window (that allows to clip the shapes within the boundaries of the box and to bind the object to all the interactions). - 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). - 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). - 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 small stuffs like popup). In fact, there're a lot of stuffs in the Wrapper but I think that the code is well documented : http://cicm.github.io/CicmWrapper/. And for user, you should explore Cream and look at c.help.gui.pd subpatch in the help files :) Cheers
_______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list