annotate tool.d @ 16:9e63308b749c

* Fix up public/private includes * Make Mask a struct
author David Bryant <daveb@acres.com.au>
date Mon, 13 Jul 2009 16:16:17 +0930
parents 71ca82e0eb76
children c643c04e3f5e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
d6f44347373d * Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
diff changeset
1 module tool;
d6f44347373d * Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
diff changeset
2
16
9e63308b749c * Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents: 10
diff changeset
3 public {
9e63308b749c * Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents: 10
diff changeset
4 import icanvas;
9e63308b749c * Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents: 10
diff changeset
5 import tk.events;
9e63308b749c * Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents: 10
diff changeset
6 }
2
d6f44347373d * Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
diff changeset
7
7
936feb16eed4 Checkpoint
"David Bryant <bagnose@gmail.com>"
parents: 2
diff changeset
8 /*
2
d6f44347373d * Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
diff changeset
9 interface IToolStack {
d6f44347373d * Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
diff changeset
10 void push(Tool tool);
d6f44347373d * Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
diff changeset
11 void pop();
d6f44347373d * Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
diff changeset
12 void replace(Tool tool);
d6f44347373d * Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
diff changeset
13 }
7
936feb16eed4 Checkpoint
"David Bryant <bagnose@gmail.com>"
parents: 2
diff changeset
14 */
2
d6f44347373d * Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
diff changeset
15
16
9e63308b749c * Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents: 10
diff changeset
16 abstract class Tool {
2
d6f44347373d * Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
diff changeset
17 /*
d6f44347373d * Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
diff changeset
18 abstract bool is_sticky();
d6f44347373d * Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
diff changeset
19 abstract bool is_replaceable();
d6f44347373d * Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
diff changeset
20 */
d6f44347373d * Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
diff changeset
21
7
936feb16eed4 Checkpoint
"David Bryant <bagnose@gmail.com>"
parents: 2
diff changeset
22 /*
2
d6f44347373d * Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
diff changeset
23 abstract void start(IToolStack tool_stack);
d6f44347373d * Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
diff changeset
24 abstract void stop(IToolStack tool_stack);
7
936feb16eed4 Checkpoint
"David Bryant <bagnose@gmail.com>"
parents: 2
diff changeset
25 */
16
9e63308b749c * Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents: 10
diff changeset
26
9e63308b749c * Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents: 10
diff changeset
27 //void draw(const Viewport viewport, in Rectangle damage, Context model_cr, Context pixel_cr) const;
9e63308b749c * Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents: 10
diff changeset
28
9e63308b749c * Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents: 10
diff changeset
29 bool handle_button_press(Viewport viewport, in ButtonEvent event);
9e63308b749c * Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents: 10
diff changeset
30 bool handle_button_release(Viewport viewport, in ButtonEvent event);
9e63308b749c * Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents: 10
diff changeset
31 bool handle_motion(Viewport viewport, in MotionEvent event);
9e63308b749c * Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents: 10
diff changeset
32 bool handle_scroll(Viewport viewport, in ScrollEvent event);
9e63308b749c * Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents: 10
diff changeset
33 //bool handle_expose(Viewport viewport, ExposeEvent event);
9e63308b749c * Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents: 10
diff changeset
34 //bool handle_enter(Viewport viewport, CrossingEvent event);
9e63308b749c * Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents: 10
diff changeset
35 //bool handle_leave(Viewport viewport, CrossingEvent event);
9e63308b749c * Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents: 10
diff changeset
36 //bool handle_focus_in(Viewport viewport, FocusEvent event);
9e63308b749c * Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents: 10
diff changeset
37 //bool handle_focus_out(Viewport viewport, FocusEvent event);
9e63308b749c * Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents: 10
diff changeset
38 bool handle_key_press(Viewport viewport, in KeyEvent event);
9e63308b749c * Fix up public/private includes
David Bryant <daveb@acres.com.au>
parents: 10
diff changeset
39 bool handle_key_release(Viewport viewport, in KeyEvent event);
2
d6f44347373d * Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
diff changeset
40 }
d6f44347373d * Switched over to geometry done with structs instead of classes.
David Bryant <daveb@acres.com.au>
parents:
diff changeset
41