| OLD | NEW |
| 1 Gestures | 1 Gestures |
| 2 ======== | 2 ======== |
| 3 | 3 |
| 4 ```dart | 4 ```dart |
| 5 SKY MODULE | 5 SKY MODULE |
| 6 <!-- part of sky:core --> | 6 <!-- part of dart:sky --> |
| 7 | 7 |
| 8 <script> | 8 <script> |
| 9 abstract class GestureEvent extends Event { | 9 abstract class GestureEvent extends Event { |
| 10 Gesture _gesture; | 10 Gesture _gesture; |
| 11 Gesture get gesture => _gesture; | 11 Gesture get gesture => _gesture; |
| 12 } | 12 } |
| 13 | 13 |
| 14 class GestureState { | 14 class GestureState { |
| 15 @nonnull bool cancel = true; // if true, then cancel the gesture at this point | 15 @nonnull bool cancel = true; // if true, then cancel the gesture at this point |
| 16 @nonnull bool capture = false; // (for PointerDownEvent) if true, then this po
inter is relevant | 16 @nonnull bool capture = false; // (for PointerDownEvent) if true, then this po
inter is relevant |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 | 254 |
| 255 } | 255 } |
| 256 </script> | 256 </script> |
| 257 ``` | 257 ``` |
| 258 | 258 |
| 259 Gestures defined in the framework | 259 Gestures defined in the framework |
| 260 --------------------------------- | 260 --------------------------------- |
| 261 | 261 |
| 262 ```dart | 262 ```dart |
| 263 SKY MODULE | 263 SKY MODULE |
| 264 <!-- not in sky:core --> | 264 <!-- not in dart:sky --> |
| 265 <!-- note: this hasn't been dartified yet --> | 265 <!-- note: this hasn't been dartified yet --> |
| 266 | 266 |
| 267 <script> | 267 <script> |
| 268 class TapGesture extends Gesture { | 268 class TapGesture extends Gesture { |
| 269 | 269 |
| 270 // internal state: | 270 // internal state: |
| 271 // Integer numButtons = 0; | 271 // Integer numButtons = 0; |
| 272 // Boolean primaryDown = false; | 272 // Boolean primaryDown = false; |
| 273 | 273 |
| 274 virtual GestureState processEvent(Event event); | 274 virtual GestureState processEvent(Event event); |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 // fling-end: cancel(), or after fling or fling-cancel (prechoose) | 421 // fling-end: cancel(), or after fling or fling-cancel (prechoose) |
| 422 } | 422 } |
| 423 | 423 |
| 424 class FlingLeftGesture : FlingGesture { } | 424 class FlingLeftGesture : FlingGesture { } |
| 425 class FlingRightGesture : FlingGesture { } | 425 class FlingRightGesture : FlingGesture { } |
| 426 class FlingUpGesture : FlingGesture { } | 426 class FlingUpGesture : FlingGesture { } |
| 427 class FlingDownGesture : FlingGesture { } | 427 class FlingDownGesture : FlingGesture { } |
| 428 | 428 |
| 429 </script> | 429 </script> |
| 430 ``` | 430 ``` |
| OLD | NEW |