Mercurial > projects > doodle
annotate doodle/main/prog/doodler.d @ 38:452915ecd1f4
Basic logging functionality
author | David Bryant <bagnose@gmail.com> |
---|---|
date | Sun, 27 Sep 2009 22:51:03 +0930 |
parents | 3f6bb0bb22dc |
children | 1f97022e5c6d |
rev | line source |
---|---|
28
1754cb773d41
Part-way through getting to compile with configure/builder.
Graham St Jack <graham.stjack@internode.on.net>
parents:
27
diff
changeset
|
1 private { |
38
452915ecd1f4
Basic logging functionality
David Bryant <bagnose@gmail.com>
parents:
35
diff
changeset
|
2 import doodle.core.logging; |
452915ecd1f4
Basic logging functionality
David Bryant <bagnose@gmail.com>
parents:
35
diff
changeset
|
3 |
28
1754cb773d41
Part-way through getting to compile with configure/builder.
Graham St Jack <graham.stjack@internode.on.net>
parents:
27
diff
changeset
|
4 import doodle.dia.tool_layer; |
1754cb773d41
Part-way through getting to compile with configure/builder.
Graham St Jack <graham.stjack@internode.on.net>
parents:
27
diff
changeset
|
5 import doodle.dia.standard_tools; |
35 | 6 import doodle.dia.grid_layer; |
28
1754cb773d41
Part-way through getting to compile with configure/builder.
Graham St Jack <graham.stjack@internode.on.net>
parents:
27
diff
changeset
|
7 import doodle.dia.page_layer; |
20 | 8 |
28
1754cb773d41
Part-way through getting to compile with configure/builder.
Graham St Jack <graham.stjack@internode.on.net>
parents:
27
diff
changeset
|
9 import doodle.gtk.canvas; |
1754cb773d41
Part-way through getting to compile with configure/builder.
Graham St Jack <graham.stjack@internode.on.net>
parents:
27
diff
changeset
|
10 import doodle.gtk.toolbar; |
27 | 11 |
20 | 12 import gtk.Main; |
13 import gtk.MainWindow; | |
27 | 14 import gtk.VBox; |
20 | 15 |
16 import std.stdio; | |
17 } | |
18 | |
19 void main(string[] args) { | |
38
452915ecd1f4
Basic logging functionality
David Bryant <bagnose@gmail.com>
parents:
35
diff
changeset
|
20 /+ |
452915ecd1f4
Basic logging functionality
David Bryant <bagnose@gmail.com>
parents:
35
diff
changeset
|
21 trace("Test trace"); |
452915ecd1f4
Basic logging functionality
David Bryant <bagnose@gmail.com>
parents:
35
diff
changeset
|
22 info("Test trace"); |
452915ecd1f4
Basic logging functionality
David Bryant <bagnose@gmail.com>
parents:
35
diff
changeset
|
23 message("Test trace"); |
452915ecd1f4
Basic logging functionality
David Bryant <bagnose@gmail.com>
parents:
35
diff
changeset
|
24 warning("Test trace"); |
452915ecd1f4
Basic logging functionality
David Bryant <bagnose@gmail.com>
parents:
35
diff
changeset
|
25 error("Test trace"); |
452915ecd1f4
Basic logging functionality
David Bryant <bagnose@gmail.com>
parents:
35
diff
changeset
|
26 fatal("Test trace"); |
452915ecd1f4
Basic logging functionality
David Bryant <bagnose@gmail.com>
parents:
35
diff
changeset
|
27 +/ |
452915ecd1f4
Basic logging functionality
David Bryant <bagnose@gmail.com>
parents:
35
diff
changeset
|
28 |
20 | 29 Main.init(args); |
30 auto window = new MainWindow("Doodle"); | |
27 | 31 auto vbox = new VBox(false, 0); |
32 auto tool_bar = new ToolBar; | |
33 vbox.packStart(tool_bar, false, false, 0); | |
20 | 34 Tool[] tools; |
35 tools ~= new PanTool; | |
36 tools ~= new ZoomTool; | |
37 tools ~= new LassoTool; | |
38 auto tool_layer = new ToolLayer(tools, "Tools"); | |
35 | 39 auto grid_layer = new GridLayer("Grid"); |
20 | 40 Layer[] layers; |
41 layers ~= new PageLayer("Page"); | |
35 | 42 layers ~= grid_layer; |
20 | 43 layers ~= tool_layer; |
35 | 44 auto canvas = new Canvas(layers, tool_layer, grid_layer, 120.0); |
27 | 45 vbox.packStart(canvas, true, true, 0); |
46 window.add(vbox); | |
20 | 47 window.setDefaultSize(380, 380); |
48 window.showAll(); | |
49 Main.run(); | |
50 } |