comparison dynamin/gui/events.d @ 106:acdbb30fee7e

Port to D2. Most of the effort was dealing with immutable and const.
author Jordan Miner <jminer7@gmail.com>
date Mon, 17 Dec 2012 23:41:50 -0600
parents 5c8c1c2e12c0
children
comparison
equal deleted inserted replaced
105:97997a544ac0 106:acdbb30fee7e
57 double x() { return _location.x; } 57 double x() { return _location.x; }
58 /// 58 ///
59 double y() { return _location.y; } 59 double y() { return _location.y; }
60 /// 60 ///
61 MouseButton button() { return _button; } 61 MouseButton button() { return _button; }
62 string toString() { 62 override string toString() {
63 return format("MouseEventArgs [x={}, y={}, button={}]", 63 return format("MouseEventArgs [x={}, y={}, button={}]",
64 x, y, _button); 64 x, y, _button);
65 } 65 }
66 } 66 }
67 /// 67 ///
93 * scrollScreen will return false. 93 * scrollScreen will return false.
94 */ 94 */
95 bool scrollScreen() { 95 bool scrollScreen() {
96 return _scrollScreen; 96 return _scrollScreen;
97 } 97 }
98 string toString() { 98 override string toString() {
99 return format("MouseTurnedEventArgs [scrollAmount={}, scrollScreen={}]", 99 return format("MouseTurnedEventArgs [scrollAmount={}, scrollScreen={}]",
100 _scrollAmount, _scrollScreen); 100 _scrollAmount, _scrollScreen);
101 } 101 }
102 } 102 }
103 /// 103 ///
128 bool shiftDown() { return _shiftDown; } 128 bool shiftDown() { return _shiftDown; }
129 // Returns true if the control key is currently down and false otherwise. 129 // Returns true if the control key is currently down and false otherwise.
130 bool controlDown() { return _controlDown; } 130 bool controlDown() { return _controlDown; }
131 // Returns true if the alt key is currently down and false otherwise. 131 // Returns true if the alt key is currently down and false otherwise.
132 bool altDown() { return _altDown; } 132 bool altDown() { return _altDown; }
133 string toString() { 133 override string toString() {
134 return format("KeyEventArgs [key={}, repeat={}]", _key, _repeat); 134 return format("KeyEventArgs [key={}, repeat={}]", _key, _repeat);
135 } 135 }
136 } 136 }
137 /// 137 ///
138 class KeyTypedEventArgs : StopEventArgs { 138 class KeyTypedEventArgs : StopEventArgs {