| OLD | NEW |
| 1 Gestures | 1 Gestures |
| 2 ======== | 2 ======== |
| 3 | 3 |
| 4 ```dart | 4 ```dart |
| 5 SKY MODULE | |
| 6 <!-- part of dart:sky --> | |
| 7 | |
| 8 <script> | |
| 9 abstract class GestureEvent extends Event { | 5 abstract class GestureEvent extends Event { |
| 10 Gesture _gesture; | 6 Gesture _gesture; |
| 11 Gesture get gesture => _gesture; | 7 Gesture get gesture => _gesture; |
| 12 } | 8 } |
| 13 | 9 |
| 14 class GestureState { | 10 class GestureState { |
| 15 bool cancel = true; // if true, then cancel the gesture at this point | 11 bool cancel = true; // if true, then cancel the gesture at this point |
| 16 bool capture = false; // (for PointerDownEvent) if true, then this pointer is
relevant | 12 bool capture = false; // (for PointerDownEvent) if true, then this pointer is
relevant |
| 17 bool choose = false; // if true, the gesture thinks that other gestures should
give up | 13 bool choose = false; // if true, the gesture thinks that other gestures should
give up |
| 18 bool finished = true; // if true, we're ready for the next gesture to start | 14 bool finished = true; // if true, we're ready for the next gesture to start |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 var pointerState = _pointers[pointer]; | 242 var pointerState = _pointers[pointer]; |
| 247 if ((!pointerState.chosen) && (pointerState.gestures.length == 1)) { | 243 if ((!pointerState.chosen) && (pointerState.gestures.length == 1)) { |
| 248 pointerState.chosen = true; | 244 pointerState.chosen = true; |
| 249 pointerState.gestures[0].choose(); | 245 pointerState.gestures[0].choose(); |
| 250 } | 246 } |
| 251 } | 247 } |
| 252 } | 248 } |
| 253 | 249 |
| 254 } | 250 } |
| 255 /* | 251 /* |
| 256 </script> | |
| 257 ``` | 252 ``` |
| 258 | 253 |
| 259 Gestures defined in the framework | 254 Gestures defined in the framework |
| 260 --------------------------------- | 255 --------------------------------- |
| 261 | 256 |
| 262 ```dart | 257 ```dart |
| 263 SKY MODULE | 258 SKY MODULE |
| 264 <!-- not in dart:sky --> | 259 <!-- not in dart:sky --> |
| 265 <!-- note: this hasn't been dartified yet --> | 260 <!-- note: this hasn't been dartified yet --> |
| 266 | 261 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 FlingRightGesture = FlingGesture; | 444 FlingRightGesture = FlingGesture; |
| 450 } | 445 } |
| 451 class FlingUpGesture extends FlingGesture { | 446 class FlingUpGesture extends FlingGesture { |
| 452 FlingUpGesture = FlingGesture; | 447 FlingUpGesture = FlingGesture; |
| 453 } | 448 } |
| 454 class FlingDownGesture extends FlingGesture { | 449 class FlingDownGesture extends FlingGesture { |
| 455 FlingDownGesture = FlingGesture; | 450 FlingDownGesture = FlingGesture; |
| 456 } | 451 } |
| 457 </script> | 452 </script> |
| 458 ``` | 453 ``` |
| OLD | NEW |