At 03:59 27.06.03 -0400, Vadim Berezniker wrote:
>This is a patch for the idea that I mentioned a bit ago.
>
The functinality appears to be very interesting and I'm
eager to test it out, but your patch appears to be incomplete.
At least missing are parent.[hc] .
Also there are two small and a larger issues I have. And a suggestion
that may make it fit even better with the rest of the Dia object code.
In that order :
even there is not much obvious coding style in Dia I'd like to have
- a space between if and the expression
- no spaces when dereferencing pointers
- there should be no including of ../app/... in lib. app depends on
lib but not vice versa. This is not only necessary for the win32
build but also gives clean dependencies on other platforms. [If
this would be the only issue to solve I'm willing to fix it
myself when applying your patch, but couldn't parent live in
lib w/o much problems?].
- read below ;-)
>If you wanna play around with this, apply the patch, then edit
>objects/standard/box.c and change "BOX_CAN_PARENT FALSE" to
>"BOX_CAN_PARENT_TRUE" and recompile. From that point, you'll be able to
>add children to any box object.
>
The standard way to specify object specific behaviour is not to
recompile but define properties. See "autoroute" for a recently
added example. [ Search for "autoroute" in the dia sources. ]
The default for the new behaviour could than be simply false
in the object construction phase for older files not yet knowing
anything about it. With parenting in the property api it would
be a peace of cake to write a Python script to enable parenting
for all objects in a diagram supporting it. You could even set
object specific global defaults via double click on the object
button. ...
Hans
-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it. -- Dilbert