Reference to the part in PMObject
Luis Carvalho
lpassos at oninetspeed.pt
Thu May 8 02:13:13 CEST 2003
Hi!
Andreas, as you may recall, I'm changing the library so that we can edit a
library object through drag'n'drop.
Currently the library browser has no reference to any part. It doesn't make
any sense to associate the library browser to any specific part. However, in
order to provide drag'n'drop for the library, I need to load the objects
contained in the library object. Since the constructor of PMObject and
descendants requires a reference to a PMPart I'm a bit stuck, as the objects
will be created by the Library Browser who doesn't know any part.
Is there a change to have PMObject fallback to a default PMPrototypeManager
and PMInsertRuleSystem if no part is given? Or, since PMObject only uses the
part to get the prototype manager and the insert rule system, we could change
the constructor to receive a pointer to the two managers eliminating the
reference to PMPart. That way, I can create copies of the managers owned by
the library browser that will be passed when I load the file.
Another thing I need to handle is objects created by plugins. I'll add a
"requires" field to the library object to identify wich plugins have to be
available to handle the library object. If a library object requires a
certain plugin that is unavailable, I'll refuse to open the file.
What do you think?
Regards,
Luis
More information about the kpovmodeler-devel
mailing list