A peep from the sidelines: Maybe what you want is not so much that the
objects contains layers, but that it can be connected to different layers?
In which case, the Layers dialog already allows that, by toggling which
layers connections can go to.

-Lars

On 5 August 2011 12:43, Arigead <[email protected]> wrote:

> Hello all,
>    hopefully the answer to this question is no ;-) or that there is an
> alternative to the direction I'm looking at. I previously asked a question
> on
> "Adding a New Diagram type" which is cleverly not an exercise in
> programming,
> but rather an exercise in drawing. Much good!
>
> I'll try to explain what I'm trying to do in terms of the electronics we
> used
> to do in school, a long time ago. Basically you'd have a banana connection
> which was a hole into which you could put a plug to make a connection.
> You'd
> end up with a circuit that looked like an old telephone operators
> switchboard
> desk with cables running everywhere.
>
> The thing about the banana connector cables was that each one, in addition
> to
> having the "male" connector part had another hole so that you could plug
> any
> amount of connectors back to back to interconnect say 5 wires together into
> one original female banana connector.
>
> I'm being a bit long winded here but I'm trying to outline the motivation
> behind how I'm thinking. If I'm not clear you could too easily dismiss my
> ramblings ;-)
>
> Right so I want to make a diagram of the above arrangement. I have one
> original banana female connector but I can connect an unlimited number of
> cables. I was thinking that to do this diagrammatically you could divide
> the
> drawing into "pages" which are more or less like the "layers" of Dia. You
> would have an overall diagram "mess" but it would be subdivided into
> "pages/layers". So one female banana might be on 5 "pages/layers" as it's
> connected to 5 different circuits. It's only shown on the master diagram
> once
> with a lot of interconnections but for clarity you can view just the
> "page/layer" you're interested in to figure out what you're looking at.
>
> The big problem with the above in terms of Dia is that it is the complete
> opposite of the hierarchy of the Dia data structure when saved to file
> diagram.dia. At present the <objects> of the diagram are children of the
> <layer>. So layer one has five children objects.
>
> <dia:layer name="Background" visible="true" active="true">
>    <dia:object type="Circuit - Vertical Resistor" version="1" id="O0">
>     </dia:object>
>    <dia:object type="Circuit - Vertical Resistor (European)" version="1"
> id="O1">
>     </dia:object>
>    .
>    .
>    .
> </dia:layer>
>
> The way I'm talking the object is the parent and has a list of layers on
> which
> it can be seen:
>
> <dia:object type="Circuit - Vertical Resistor" version="1" id="O0">
>      <dia:attribute name="layers">
>          <dia:layer val="background"/>
>          <dia:layer val="Heating Circuit"/>
>      </dia:attribute>
>
> That is a major change in how things are done, and humans hate change. I'm
> new
> here so I'm not seeing the bigger picture. There is obviously a reason why
> things are the way that they are, even if I'm too green to see it. In
> addition
> there might well be a very good reason why what I have suggested is
> complete
> madness in a drawing package like Dia.
>
> I'd be interested in hearing the experts opinions. I've not started looking
> into the code to see how much would have to be changed. I'd imagine a fair
> bit
> but it's not going to effect the core of the Dia drawing code. The load and
> save routines which read and write the ".dia" files and the code for
> viewing
> layers. Instead of a layer having a list of visable objects the code would
> have to check all objects to see if they're on a visable layer. Slower I
> know
> but hopefully not too slow.
>
> As an aside when I think of my "pages" I think a tabbed window of the pages
> might be logical. That's another days work though ;-)
>
> Any thoughts gratefully received.
> _______________________________________________
> dia-list mailing list
> [email protected]
> http://mail.gnome.org/mailman/listinfo/dia-list
> FAQ at http://live.gnome.org/Dia/Faq
> Main page at http://live.gnome.org/Dia
>
>
_______________________________________________
dia-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia

Reply via email to