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

Side by Side Diff: sky/sdk/lib/framework/fn2.dart

Issue 1157573012: Implement radio button for Sky’s fn2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fix syntax error Created 5 years, 6 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/framework/components2/radio.dart ('k') | sky/sdk/lib/framework/rendering/box.dart » ('j') | 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 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
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 // TODO(jackson) need a mechanism for marking the RenderCustomPaint as needing p aint
445 class CustomPaint extends OneChildRenderObjectWrapper {
446 RenderCustomPaint root;
447 final CustomPaintCallback callback;
448
449 CustomPaint({ this.callback, UINode child, Object key })
450 : super(child: child, key: key);
451
452 RenderCustomPaint createNode() => new RenderCustomPaint(callback: callback);
453
454 void syncRenderObject(CustomPaint old) {
455 super.syncRenderObject(old);
456 root.callback = callback;
457 }
458
459 void _remove() {
460 root.callback = null;
461 super._remove();
462 }
463 }
444 464
445 final List<UINode> _emptyList = new List<UINode>(); 465 final List<UINode> _emptyList = new List<UINode>();
446 466
447 abstract class MultiChildRenderObjectWrapper extends RenderObjectWrapper { 467 abstract class MultiChildRenderObjectWrapper extends RenderObjectWrapper {
448 468
449 // In MultiChildRenderObjectWrapper subclasses, slots are RenderObject nodes 469 // In MultiChildRenderObjectWrapper subclasses, slots are RenderObject nodes
450 // to use as the "insert before" sibling in ContainerRenderObjectMixin.add() c alls 470 // to use as the "insert before" sibling in ContainerRenderObjectMixin.add() c alls
451 471
452 final List<UINode> children; 472 final List<UINode> children;
453 473
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 assert(root.parent is RenderView); 1017 assert(root.parent is RenderView);
998 } 1018 }
999 } 1019 }
1000 1020
1001 class Text extends Component { 1021 class Text extends Component {
1002 Text(this.data) : super(key: '*text*'); 1022 Text(this.data) : super(key: '*text*');
1003 final String data; 1023 final String data;
1004 bool get interchangeable => true; 1024 bool get interchangeable => true;
1005 UINode build() => new Paragraph(text: data); 1025 UINode build() => new Paragraph(text: data);
1006 } 1026 }
OLDNEW
« no previous file with comments | « sky/sdk/lib/framework/components2/radio.dart ('k') | sky/sdk/lib/framework/rendering/box.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698