From: Jon Cruz <jon@...18...> Subject: Re: [Inkscape-devel] Embed Python script engine Date: Mon, 13 Dec 2010 19:49:47 -0800
On Dec 13, 2010, at 3:20 PM, Yu-Chung Wang wrote:
2010/12/13 Thinker K.F. Li <thinker@...2486...> From: Yu-Chung Wang <wycc@...2510...> Subject: Re: [Inkscape-devel] Embed Python script engine Date: Mon, 13 Dec 2010 19:55:05 +0800
- There is no API to create new element.
For the UI part, use action is a good idea. It will separate the extension from the base code.
It is not enough to provide a flexible environment. We still need a way to make it possible to insert a widget defined by an extension to a specified position. Firefox does it well (XUL overlay), but it is complex to implement it.
XUL is, in my opinion, exactly the wrong approach for extensions. It really leverages the pixel-tweaking of detailed graphical UI construction, whereas we should be focusing on logical and functional constructs.
You had mentioned about XForms, and favor it. So, why is XForms right and XUL wrong?
Everybody likes logical (conceptual) and functional constructs. It makes things easy. But, it also means limitations while you can not define a flexible language to satisfy requests. It is a kind of over-designed/-engineered.
We all know that Inkscape supports types of input, output, ..., etc, with current extension API. I think it is also what Jon want to support with new API. (right?) I think the problem is about whether Inkscape want to provide a restricted, and high-level, extension API for only specific types of extensions or to provide a flexible, but primitive, extension API for various types of extensions?
I think Inkscape has the potential be a reusable software/component with a flexible, but primitive, extension API, but it is not ncessary to be.
That is a bit of why it's tricky to do good XUL for such approaches.
The inkscape use menu.xml which can be used to define a menu with actions. Once the actions is defined, we can use it to construct a menu. However, it deos not support dynamic menu change(in my understanding) now.
Not yet.
However, the tool code that constructs the toolbars is a good example of where our code is moving towards. The adaptive UI work will greatly expand upon that.