4
Reply

Design issues

pt99mbe

pt99mbe

Jul 29 2004 5:25 AM
2k
I am to develop a graphical editor, something similar to an UML-editor. I.e. an editor where you place different types of boxes and connect the boxes with different types of lines. My problem is to decide on the following: * Should the drawing area handle the drawing of the boxes and the lines, and handle the interaction with the user. The advantage with this is that I can (probably) have better control on how the painting is performed, the disadvantage is that I have to implement all interaction with the user, such as hit-testing when of mouse-clicks or * Should each box and line be an instantiation of a custom control, that handles its own drawing and interaction with the user? Advantage: simplifies the user interaction. Disadvantage: how to make the connecting lines to just be a line/arrow/etc and not a rectangular control as most controls are. What I am looking at is this: time to develop, reusability, performance. I will actually develope two (at least) editors, that are very similar. The main difference is what the boxes represent and how they can be connected. So my idea is to have a somewhat generic editor that I can use to develop the two specific editors. In other words, reusability is very important here. My favorite is the second option, but before I start with the development I would like to get your opinion. Anyone who has done something similar to this?

Answers (4)