@@ -3,9 +3,8 @@ public import wsedit.workspace;
3
3
public import wsedit.subsystem.wsrenderer;
4
4
public import wsedit.subsystem.mouse;
5
5
6
- public import wsedit.tools.tiletool;
7
- public import wsedit.tools.selecttool;
8
- public import wsedit.tools.erasetool;
6
+ public import wsedit.tools.tiles;
7
+ public import wsedit.tools.camera;
9
8
10
9
/**
11
10
A tool provides functionality on the canvas
@@ -14,10 +13,11 @@ class Tool {
14
13
protected :
15
14
Workspace workspace;
16
15
17
- this (string name, string iconName, Workspace workspace) {
16
+ this (string name, string iconName, ToolGroup parent, Workspace workspace) {
18
17
this .name = name;
19
18
this .iconName = iconName;
20
19
this .workspace = workspace;
20
+ this .parent = parent;
21
21
}
22
22
23
23
public :
@@ -31,6 +31,11 @@ public:
31
31
*/
32
32
immutable (string ) iconName;
33
33
34
+ /**
35
+ The group this tool belongs to
36
+ */
37
+ ToolGroup parent;
38
+
34
39
/**
35
40
Draw tool related UI on to the canvas
36
41
Selections, etc.
@@ -43,3 +48,31 @@ public:
43
48
abstract void update (Mouse mouse);
44
49
}
45
50
51
+ /**
52
+ A group of tools
53
+ */
54
+ class ToolGroup {
55
+ protected :
56
+ Workspace workspace;
57
+
58
+ this (string name, string iconName, Workspace workspace) {
59
+ this .name = name;
60
+ this .iconName = iconName;
61
+ this .workspace = workspace;
62
+ }
63
+ public :
64
+ /**
65
+ Name of the tool
66
+ */
67
+ immutable (string ) name;
68
+
69
+ /**
70
+ Name of the tool's icon
71
+ */
72
+ immutable (string ) iconName;
73
+
74
+ /**
75
+ Tools in the tool group
76
+ */
77
+ Tool[] tools;
78
+ }
0 commit comments