comparison tool.d @ 17:c643c04e3f5e

Checkpoint
author David Bryant <daveb@acres.com.au>
date Mon, 13 Jul 2009 16:46:21 +0930
parents 9e63308b749c
children df8d81d9f499
comparison
equal deleted inserted replaced
16:9e63308b749c 17:c643c04e3f5e
1 module tool; 1 module tool;
2 2
3 public { 3 public {
4 import cairo_support;
4 import icanvas; 5 import icanvas;
5 import tk.events; 6 import tk.events;
6 } 7 }
7 8
8 /* 9 /*
13 } 14 }
14 */ 15 */
15 16
16 abstract class Tool { 17 abstract class Tool {
17 /* 18 /*
19 enum Response {
20 START, CONTINUE, FINISH
21
22 }
23 */
24
25 /*
18 abstract bool is_sticky(); 26 abstract bool is_sticky();
19 abstract bool is_replaceable(); 27 abstract bool is_replaceable();
20 */ 28 */
21 29
22 /* 30 /*
23 abstract void start(IToolStack tool_stack); 31 abstract void start(IToolStack tool_stack);
24 abstract void stop(IToolStack tool_stack); 32 abstract void stop(IToolStack tool_stack);
25 */ 33 */
26 34
27 //void draw(const Viewport viewport, in Rectangle damage, Context model_cr, Context pixel_cr) const; 35 void draw(const Viewport viewport, in Rectangle damage, Context model_cr, Context pixel_cr) const {
36 }
28 37
29 bool handle_button_press(Viewport viewport, in ButtonEvent event); 38 bool handle_button_press(Viewport viewport, in ButtonEvent event);
30 bool handle_button_release(Viewport viewport, in ButtonEvent event); 39 bool handle_button_release(Viewport viewport, in ButtonEvent event);
31 bool handle_motion(Viewport viewport, in MotionEvent event); 40 bool handle_motion(Viewport viewport, in MotionEvent event);
32 bool handle_scroll(Viewport viewport, in ScrollEvent event); 41 bool handle_scroll(Viewport viewport, in ScrollEvent event);