Re: Creating new shapes with "extra"properties

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

For example, would it have been possible to
implement the UML - Class shape in XML?

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)

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?

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.
See e.g.:

My 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

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]