
On Sat, 2004-07-03 at 01:14, bulia byak wrote:
- The "group mode" setting needs to be per-NRArena key, and persist
across hide/show cycles (currently, the change in event handling behavior is global, even though layer activation is per-SPDesktop)
But will it persist across sessions? I don't quite understand your reasons for removing groupmode, I think layers must remain layers when you save the document.
I sort of changed my mind about layers being a special mode.
The ultimate plan now is to make groups behave like either groups or layers depending on whether the user is currently performing group-things or layer-things with them. Ideally, this would be entirely natural, so there would be no obvious "mode-change" to the user.
So, inkscape:layermode was a temporary hack to selectively confer layer-like behavior on groups via the XML editor without writing extra UI code, so I could get some artwork done. I'm repurposing some of its implementation now.
The current "enter group"/"leave group" facility is of course far from ideal (among other things because you have to already have something in the group before you can click on it and get the menu), but once I implement the layers dialog in 0.40 it should be pretty natural.
The initial/default appearance of the layers dialog would show only the top-level objects, ordered in visual z-order (reverse of XML order). In a document structured in a traditional layered fashion, these top-level objects would be groups, and in this setting look precisely like layers to the user.
Clicking in the rightmost column of a particular layer's (group's) row would put a little pencil icon (or similar) next to it, making it the current layer for editing (performing the equivalent of "enter group").
IOW, this (abridged) document:
<svg> <g id="layer-1" sodipodi:insensitive="1"><circle/></g> <g id="layer-2"><rect/><rect/></g> <rect id="blah"/> <g id="new-layer"/> </svg>
...would appear in the layers dialog something like this (assuming #layer-2 were the current layer):
---------------------------- [@] [ ] #new-layer [ ] ---------------------------- [@] [ ] #blah ----------------------------
[@] [ ] #layer-2 [/]
----------------------------
[@] [^] #layer-1 [ ]
----------------------------
[@] = eye icon - visible [^] = lock icon - locked [/] = pencil icon - current layer
= tree expander (to see children)
[ note omission of pencil "slot" on non-groups ]
We might have some thumbnails or something in there too. I expect there would also be a "new layer" button, which would just create an empty top-level group (which, for the user, is essentially a layer), and whatever other layer manipulation buttons/commands seem appropriate.
Normally I expect users are either going to put all their objects at the top level and not group much, or they will put everything in top-level groups (i.e. layers), so a mixed document like this example will be uncommon.
However, this example should give you an idea of what a range of cases would look like.
On the other hand, making it able to differ across desktops does not seem terribly useful to me.
Permitting each desktop to have its own "current layer" will be necessary when I implement the ability to select a different element as the "root" for a particular editing view. That feature will be crucial for editing SVG islands in non-SVG XML documents, and perhaps also handy for e.g. directly editing objects/groups in <defs>.
-mental