Hi list,
I've been investigating other guis as possible replacements for tcl/tk gui. A few reasons:
* tk is slow to redraw
* no anti-aliasing except on OSX
* poor support for theming
* poor support for standard image formats
* binary alpha channel
* limited control of font properties on canvas
* lack of proper canvas zooming
* non-standard file save/open dialogs
* lack of common gui-toolkit tools like tooltips and rich text
* too much bit-rot in third-party libraries to work around all the above
But as it turns out, it's fairly difficult to find a decent replacement for tk canvas:
* Gtk is a moving target and has reportedly poor documentation and poor community attitudes when trying to use it with OSX and Windows
* Qt's "Qt Quick/QML" approach doesn't include Bezier curves or even lines as fundamental items (and they won't benefit from Qt's graphics acceleration if you add them manually). Probably related-- it seems to be geared mainly toward mobile apps. Desktop components seem to have been tacked on as an afterthought.
* Qt's QGraphicsView _seems_ to be deprecated in favor of QML. (Nobody has ever stated that it is deprecated, but it certainly doesn't seem to be getting the same advertising and development effort as QML.) But it looks to have everything needed for a Pd canvas.
* Nearly every other toolkit has cross-platform issues that make it a pain to use with one or more OSes
There's also this:
with a nice short introduction here:
So node-webkit would essentially replace tcl/tk with HTML5 (or any subset of it), plus a javascript API for handling menubars, native file dialogs and other application-level details. Additionally it could leverage any HTML5 graphics framework, of which there are many. (Also, if a patch author wanted to write some insanely complex visualization, they could use any HTML5 framework and easily communicate with Pd.)
Of course the _big_ problem is that node-webkit itself currently weighs in at 99M for linux amd64 (37M zipped). There doesn't seem to be a Debian package for it (and I'm not sure if there could be, given how it wraps around the Chromium browser).
Anyway, the only viable choices I see so far are:
* Qt (through QGraphicsView or QML for tk canvas replacement)
* node-webkit
Personally, I have very little interest in designing a new GUI <--> Pd communication mechanism, and even less interest in coding in c++. So if left to my own devices, I'll probably just try opening an additional socket in Pd to connect to node-webkit and communicate with it similar to how tcl/tk does, using javascript instead of tcl commands. I would start with with Pd -> node-webkit, then adding GUI event-handling later. That way I can keep the tcl/tk GUI and node-webkit one side-by-side as I go.
Of course if someone with the knowledge and energy to do this the "right way" has any suggestions, I'm all ears. I have the inkling that if I could employ a full-time dev to do my bidding then Qt Quick would the "right way" to go-- it's in Debian, is cross-platform, well-documented, and it certainly has enough features for Pd's canvas editing. But I don't know how to retrofit a c program like Pd with Qt, nor how to replace Pd's current string-based communication with whatever one is supposed to use to do that.
-Jonathan