I'm thinking about having some boxes (dialogs with frames) on a dialog and joining them with straight lines. The lines would join the boxes at sticky points, say one in each corner and one in the middle of each side. When a box is moved, any line joined to it would move too, but to the sticky point which would give the shortest line length, measured from its origin to any sticky point on the box that has moved.
I know this type of application pretty well as a user, but have not attempted to develop anything like it, except for the "moving dialogs around" part.
Given the ability to move boxes around on the main dialog, we "just" have to know that there are lines connecting the box to other boxes, which could come from an array of lines, each having a source and destination window handle. The "shortest line" algorithm would convert the "sticky points" coordinates to main dialog coordinates and calculate the length of each one, then draw the line on the main dialog between the appropriate sticky points.
Initial line drawing would be by selecting a line drawing mode (or tool) and clicking in the vicinity of a sticky point to plant each end of the line.
Any suggestions would be welcome, particularly on how to draw the sticky points so that they can appear to be dragged with their "box".
I feel a lot of screen flicker coming on...
I know this type of application pretty well as a user, but have not attempted to develop anything like it, except for the "moving dialogs around" part.
Given the ability to move boxes around on the main dialog, we "just" have to know that there are lines connecting the box to other boxes, which could come from an array of lines, each having a source and destination window handle. The "shortest line" algorithm would convert the "sticky points" coordinates to main dialog coordinates and calculate the length of each one, then draw the line on the main dialog between the appropriate sticky points.
Initial line drawing would be by selecting a line drawing mode (or tool) and clicking in the vicinity of a sticky point to plant each end of the line.
Any suggestions would be welcome, particularly on how to draw the sticky points so that they can appear to be dragged with their "box".
I feel a lot of screen flicker coming on...
Comment