OLD | NEW |
---|---|
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 library fn; | 5 library fn; |
6 | 6 |
7 import 'app.dart'; | 7 import 'app.dart'; |
8 import 'dart:async'; | 8 import 'dart:async'; |
9 import 'dart:collection'; | 9 import 'dart:collection'; |
10 import 'dart:mirrors'; | 10 import 'dart:mirrors'; |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
434 super.syncRenderObject(old); | 434 super.syncRenderObject(old); |
435 root.callback = callback; | 435 root.callback = callback; |
436 } | 436 } |
437 | 437 |
438 void _remove() { | 438 void _remove() { |
439 root.callback = null; | 439 root.callback = null; |
440 super._remove(); | 440 super._remove(); |
441 } | 441 } |
442 } | 442 } |
443 | 443 |
444 class CustomPaint extends OneChildRenderObjectWrapper { | |
abarth-chromium
2015/06/04 23:58:39
Can you add a TODO(jackson) to this class about ne
jackson
2015/06/05 00:23:10
Done.
| |
445 RenderCustomPaint root; | |
446 final CustomPaintCallback callback; | |
447 | |
448 CustomPaint({ this.callback, UINode child, Object key }) | |
449 : super(child: child, key: key); | |
450 | |
451 RenderCustomPaint createNode() => new RenderCustomPaint(callback: callback); | |
452 | |
453 void syncRenderObject(CustomPaint old) { | |
454 super.syncRenderObject(old); | |
455 root.callback = callback; | |
456 } | |
457 } | |
abarth-chromium
2015/06/04 23:58:39
You probably want to implement a _remove similar t
jackson
2015/06/05 00:23:10
Done.
| |
444 | 458 |
445 final List<UINode> _emptyList = new List<UINode>(); | 459 final List<UINode> _emptyList = new List<UINode>(); |
446 | 460 |
447 abstract class MultiChildRenderObjectWrapper extends RenderObjectWrapper { | 461 abstract class MultiChildRenderObjectWrapper extends RenderObjectWrapper { |
448 | 462 |
449 // In MultiChildRenderObjectWrapper subclasses, slots are RenderObject nodes | 463 // In MultiChildRenderObjectWrapper subclasses, slots are RenderObject nodes |
450 // to use as the "insert before" sibling in ContainerRenderObjectMixin.add() c alls | 464 // to use as the "insert before" sibling in ContainerRenderObjectMixin.add() c alls |
451 | 465 |
452 final List<UINode> children; | 466 final List<UINode> children; |
453 | 467 |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
995 assert(root.parent is RenderView); | 1009 assert(root.parent is RenderView); |
996 } | 1010 } |
997 } | 1011 } |
998 | 1012 |
999 class Text extends Component { | 1013 class Text extends Component { |
1000 Text(this.data) : super(key: '*text*'); | 1014 Text(this.data) : super(key: '*text*'); |
1001 final String data; | 1015 final String data; |
1002 bool get interchangeable => true; | 1016 bool get interchangeable => true; |
1003 UINode build() => new Paragraph(text: data); | 1017 UINode build() => new Paragraph(text: data); |
1004 } | 1018 } |
OLD | NEW |