Use Cases
~~~~~~~~~

This file contains some use cases I'd come up with. The sublists (with a `.')
describe the actions that IMHO should be taken.

1. Create a new Canvas
	. Create a new Canvas.

2. Create a new CanvasView on an existing Canvas
	. Create a new CanvasView.
	. Create a DiaCanvasViewItem for every DiaCanvasItem in the view's
	  DiaCanvas.

3. Handling an event on a CanvasView
	. An event (e.g. button press, motion) event happens
	. CanvasView looks for the DiaCanvasViewItem that is closest
	. Ask the DiaCanvasViewItem if it will accept an event
	. DiaCanvasViewItem called DiaCanvasItem::point() for the distance.
	. CanvasView desides where to send the event and sends the event
	  to the DiaCanvasViewItem.
	. DiaCanvasViewItem forwards the call to DiaCanvasItem.

4. Zoom in/out
	. adjust the root item's GnomeCanvasItem::xform matrix.
	. Mark the entire window "dirty"
	. Set the redraw handler in the main loop (gtk_main_idle?)

5. CanvasItem handles object
	. (pre) CanvasItem's event handler is activated by Canvas
	. if canvas needs some redrawing: set need_update to TRUE.
	. Canvas initiates update sequence in idle time.

6. Resize items in a group
	. The group just handles the resize
	. CanvasItems update themselves taking into account the zoom factor
	  of their parents, this way we can also create non-scalable objects.

7. Connect one object to another
	See connections.txt

8. Move one object with other objects connected to it
	See connections.txt

9. Undo an action

10. (yep!) Redo an action

11. Rational Rose like element (object) movement (the lines keep centered to
    the middle of the element)

12. Delete an object
	. Remove the object from the canvas.
	. Add it to the undo-list.

12. Copy an object (ctrl-C)
	. Mark an object as "copy-able"

13. Cut an object (ctrl-X)
	. Mark an object as "copy-able"
	. Delete the item from the canvas to the undo-factory

14. Paste an object (ctrl-V)
	. Create duplicates of the object(s) marked "copy-able"
	. Add the duplicates to the active canvas
