Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(735)

Side by Side Diff: sky/sdk/lib/widgets/widget.dart

Issue 1217623002: Support for background images on cards, style demo home (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/sdk/lib/widgets/theme.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'dart:mirrors'; 7 import 'dart:mirrors';
8 import 'dart:sky' as sky; 8 import 'dart:sky' as sky;
9 9
10 import '../base/hit_test.dart'; 10 import '../base/hit_test.dart';
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 } 272 }
273 } 273 }
274 274
275 typedef void GestureEventListener(sky.GestureEvent e); 275 typedef void GestureEventListener(sky.GestureEvent e);
276 typedef void PointerEventListener(sky.PointerEvent e); 276 typedef void PointerEventListener(sky.PointerEvent e);
277 typedef void EventListener(sky.Event e); 277 typedef void EventListener(sky.Event e);
278 278
279 class Listener extends TagNode { 279 class Listener extends TagNode {
280 280
281 Listener({ 281 Listener({
282 String key,
282 Widget child, 283 Widget child,
283 EventListener onWheel, 284 EventListener onWheel,
284 GestureEventListener onGestureFlingCancel, 285 GestureEventListener onGestureFlingCancel,
285 GestureEventListener onGestureFlingStart, 286 GestureEventListener onGestureFlingStart,
286 GestureEventListener onGestureScrollStart, 287 GestureEventListener onGestureScrollStart,
287 GestureEventListener onGestureScrollUpdate, 288 GestureEventListener onGestureScrollUpdate,
288 GestureEventListener onGestureTap, 289 GestureEventListener onGestureTap,
289 GestureEventListener onGestureTapDown, 290 GestureEventListener onGestureTapDown,
290 PointerEventListener onPointerCancel, 291 PointerEventListener onPointerCancel,
291 PointerEventListener onPointerDown, 292 PointerEventListener onPointerDown,
292 PointerEventListener onPointerMove, 293 PointerEventListener onPointerMove,
293 PointerEventListener onPointerUp, 294 PointerEventListener onPointerUp,
294 Map<String, sky.EventListener> custom 295 Map<String, sky.EventListener> custom
295 }) : listeners = _createListeners( 296 }) : listeners = _createListeners(
296 onWheel: onWheel, 297 onWheel: onWheel,
297 onGestureFlingCancel: onGestureFlingCancel, 298 onGestureFlingCancel: onGestureFlingCancel,
298 onGestureFlingStart: onGestureFlingStart, 299 onGestureFlingStart: onGestureFlingStart,
299 onGestureScrollUpdate: onGestureScrollUpdate, 300 onGestureScrollUpdate: onGestureScrollUpdate,
300 onGestureScrollStart: onGestureScrollStart, 301 onGestureScrollStart: onGestureScrollStart,
301 onGestureTap: onGestureTap, 302 onGestureTap: onGestureTap,
302 onGestureTapDown: onGestureTapDown, 303 onGestureTapDown: onGestureTapDown,
303 onPointerCancel: onPointerCancel, 304 onPointerCancel: onPointerCancel,
304 onPointerDown: onPointerDown, 305 onPointerDown: onPointerDown,
305 onPointerMove: onPointerMove, 306 onPointerMove: onPointerMove,
306 onPointerUp: onPointerUp, 307 onPointerUp: onPointerUp,
307 custom: custom 308 custom: custom
308 ), 309 ),
309 super(child); 310 super(child, key: key);
310 311
311 final Map<String, sky.EventListener> listeners; 312 final Map<String, sky.EventListener> listeners;
312 313
313 static Map<String, sky.EventListener> _createListeners({ 314 static Map<String, sky.EventListener> _createListeners({
314 EventListener onWheel, 315 EventListener onWheel,
315 GestureEventListener onGestureFlingCancel, 316 GestureEventListener onGestureFlingCancel,
316 GestureEventListener onGestureFlingStart, 317 GestureEventListener onGestureFlingStart,
317 GestureEventListener onGestureScrollStart, 318 GestureEventListener onGestureScrollStart,
318 GestureEventListener onGestureScrollUpdate, 319 GestureEventListener onGestureScrollUpdate,
319 GestureEventListener onGestureTap, 320 GestureEventListener onGestureTap,
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 if (root.parent == null) { 1014 if (root.parent == null) {
1014 // we haven't attached it yet 1015 // we haven't attached it yet
1015 assert(_container.child == null); 1016 assert(_container.child == null);
1016 _container.child = root; 1017 _container.child = root;
1017 } 1018 }
1018 assert(root.parent == _container); 1019 assert(root.parent == _container);
1019 } 1020 }
1020 1021
1021 Widget build() => builder(); 1022 Widget build() => builder();
1022 } 1023 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/widgets/theme.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698