Re: Creating new shapes with "extra"properties
- From: Hans Breuer <hans breuer org>
- To: dia-list gnome org
- Subject: Re: Creating new shapes with "extra"properties
- Date: Thu, 03 Dec 2009 00:38:03 +0100
At 02.12.2009 21:45, Sarah Mount wrote:
Is it possible when creating a new shape to create new properties that
go with that shape?
Yes, documented in http://git.gnome.org/cgit/dia/tree/doc/custom-shapes
No, there are many shapes implemented in XML - where the above mentioned
documentation does apply. Some other "shapes" are called objects, because
they are implmented in C. UML - Class is one of them. (Actually the bare
metal below the shape facility also is implemented in C. See objects/custom)
For example, would it have been possible to
implement the UML - Class shape in XML?
It depends. If for your use case an extra menu entry and an extra dialog is
acceptable, you could use the currently hidden facility to store arbitrary
string dictionaries (key,value pairs) with the every Dia object.
If not, is it possible to "give" a new shape extra properties by
defining a Python plugin which would pop up a dialog box asking the
user to enter values for each custom property?
See e.g.: http://mail.gnome.org/archives/dia-list/2009-March/msg00099.html
My dot2dia.py script makes some use of it, see:
-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it. -- Dilbert
] [Thread Prev