File: TODO

package info (click to toggle)
diacanvas2 0.14.4-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 9,640 kB
  • ctags: 2,553
  • sloc: sh: 157,554; ansic: 21,714; xml: 8,167; python: 668; makefile: 427
file content (99 lines) | stat: -rw-r--r-- 4,127 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
vim:tw=78:ai:et

Outstanding issues
------------------
- When an item is deleted and undo-ed, handles are not connected. If the
  item is connected itself, the application even crashes!

- Deleting marked-up text doesn't handle markup tags well
  Currently are warning is issued if you want editable markup text.
  This should be handled using text attributes probably.
- Integrate Aurelien's edge/node

- multiline=1 on text does not work well with centered text.
- centered text is not handled well in SVG exporter, this is partly due to
  the lack of support from rsvg, Batic does a pretty good job (but uses
  different fonts ;-( ).
- Remove diacanvas.shape.Text.text and add properties for reading attributes.
- Catch ESC keywhen editing text (return original text)

- Some functions have different arguments: e.g. CanavsItem.set_bounds() wants
  one tuple of 4 floats, but ShapePath.set_rectangle() wants two points.
  This should be standardized.

Wishlist
--------
- Aurelien: The ability to partition a canvas into layers
- Arjan: split Undo/Redo code and put it in a separate class
- Martin: add an extra property to the line (fuzzyness) that makes it easier to
  select the line. Currently the distance from the line depends on the line
  width, which makes it very hard to select small lines.
- Martin: (Python) Add some functions for affine transformations.
- Camille: Create a Bezier path. Maybe with a generic superclass for both line
  and bezier.
- Arjan: I'd like to set, as well as retrieve values from DiaShape objects in
  Python.
- Nick: allow only bounding boxes to be drawn when moving shapes.
- Add a function that selects the canvas item at a specific point.

Future enhancements
-------------------
- Better text handling:
  . better scaling of fonts when zoomin in/out
  . better support for marked up text, including export filters.

- Create an OpenGL canvas. Quite fancy, might improve performance under XFree4.
- What should be a nice way to do blending (like in The Gimp) within shapes?
  That would really make the canvas awesome!!!!!!! (to do in LibArt)

- depricate the X CanvasView


Issues in detail
----------------
  Separate event handling code into separate tools.
  -------------------------------------------------
  Currently, event handling is scattered over several files. However,
  DiaCanvas has the concept of tools. This concept should be expanded to
  contain all event handling code.

  Events currely travel more or less like this:
  - An event is received by DiaCanvasView::event()
    - if a tool is set, the event is left to the tool
    - GnomeCanvas::event() reveives the event:
      - Find the current item (or use the one grabbed)
      - Delegate event handling to DiaCanvasViewItem::event() or
	DiaHandleLayer::event():
	- DiaHandleLayer::event():
	  - grab the handle under the mouse cursor
	  - on a motion event, try to move the handle, consulting
	    DiaCanvasItem::handle_motion().
	- DiaCanvasViewItem::event():
	  - Delegate event to DiaCanvasItem::event():
	    - Do something "item specific" such as starting editing text when
	      a double-click occurs.
	    - In case of a motion event, an "interactive move" is initiated,
	      which emits a signal that makes the DiaCanvasView move all its
	      selected items.
    - Create a selection box if the event was not handled.

  All of this can be reorganized in a set of tools:
  1. SelectorTool - handle selection boxes.
  2. Default tool that handles events that come into
  2. HandleTool - handle events on DiaHandle elements
  3. ItemTool - handle events that are ment for specific items.
    
  How should Tools be integrated, so they don't upset the current
  (gnome)canvas' behavior?
  1. Embrace & entend, integrate the GnomeCanvas into DiaCanvas
  2. Ignore whatever GnomeCanvas does/duplicate what's needed.
  3. Invoke tools from various places, such as DiaCanvasViewItem and
     DiaHandleLayer.

  The last solution is closest to the current implementation, except that
  event handling is separated into separate objects. Tools should be specific
  for a view, item or handle.