
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.
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.