comparison doodle/gtk/cairo_canvas.d @ 103:345fb56d89fc

Blind checkpoint
author David Bryant <bagnose@gmail.com>
date Thu, 18 Nov 2010 12:00:02 +1030
parents a274d16ab6ce
children 10ad5417bf07
comparison
equal deleted inserted replaced
102:d04c3fe1822c 103:345fb56d89fc
34 import std.math; 34 import std.math;
35 import std.stdio; 35 import std.stdio;
36 } 36 }
37 37
38 final class CairoCanvas : Table, private IViewport { 38 final class CairoCanvas : Table, private IViewport {
39 static this() {
40 _cursors = [
41 Cursor.DEFAULT : CursorType.ARROW,
42 Cursor.HAND : CursorType.HAND1,
43 Cursor.CROSSHAIR : CursorType.CROSSHAIR,
44 Cursor.PENCIL : CursorType.PENCIL
45 ];
46 }
47
39 this(in Layer[] layers, IEventHandler eventHandler, IGrid grid, in double pixelsPerMillimetre) { 48 this(in Layer[] layers, IEventHandler eventHandler, IGrid grid, in double pixelsPerMillimetre) {
40 super(3, 3, 0); 49 super(3, 3, 0);
41 50
42 _eventHandler = eventHandler; 51 _eventHandler = eventHandler;
43 _grid = grid; 52 _grid = grid;
127 2, 3, 136 2, 3,
128 1, 2, 137 1, 2,
129 AttachOptions.SHRINK, 138 AttachOptions.SHRINK,
130 AttachOptions.FILL | AttachOptions.EXPAND, 139 AttachOptions.FILL | AttachOptions.EXPAND,
131 0, 0); 140 0, 0);
132
133 _cursors = [
134 Cursor.DEFAULT : CursorType.ARROW,
135 Cursor.HAND : CursorType.HAND1,
136 Cursor.CROSSHAIR : CursorType.CROSSHAIR,
137 Cursor.PENCIL : CursorType.PENCIL
138 ];
139 } 141 }
140 142
141 protected { // XXX the compiler complains about unimplemented methods if this is private 143 protected { // XXX the compiler complains about unimplemented methods if this is private
142 144
143 // IViewport overrides: 145 // IViewport overrides:
432 VScrollbar _vScrollbar; 434 VScrollbar _vScrollbar;
433 435
434 Rectangle _damageScreen; 436 Rectangle _damageScreen;
435 ScreenModel _screenModel; 437 ScreenModel _screenModel;
436 438
437 immutable CursorType[Cursor] _cursors; 439 static immutable CursorType[Cursor] _cursors;
438 } 440 }
439 } 441 }