Mercurial > projects > doodle
diff 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 |
line wrap: on
line diff
--- a/doodle/gtk/cairo_canvas.d Thu Oct 28 18:29:50 2010 +1030 +++ b/doodle/gtk/cairo_canvas.d Thu Nov 18 12:00:02 2010 +1030 @@ -36,6 +36,15 @@ } final class CairoCanvas : Table, private IViewport { + static this() { + _cursors = [ + Cursor.DEFAULT : CursorType.ARROW, + Cursor.HAND : CursorType.HAND1, + Cursor.CROSSHAIR : CursorType.CROSSHAIR, + Cursor.PENCIL : CursorType.PENCIL + ]; + } + this(in Layer[] layers, IEventHandler eventHandler, IGrid grid, in double pixelsPerMillimetre) { super(3, 3, 0); @@ -129,13 +138,6 @@ AttachOptions.SHRINK, AttachOptions.FILL | AttachOptions.EXPAND, 0, 0); - - _cursors = [ - Cursor.DEFAULT : CursorType.ARROW, - Cursor.HAND : CursorType.HAND1, - Cursor.CROSSHAIR : CursorType.CROSSHAIR, - Cursor.PENCIL : CursorType.PENCIL - ]; } protected { // XXX the compiler complains about unimplemented methods if this is private @@ -434,6 +436,6 @@ Rectangle _damageScreen; ScreenModel _screenModel; - immutable CursorType[Cursor] _cursors; + static immutable CursorType[Cursor] _cursors; } }