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

Unified Diff: sky/sdk/lib/framework/rendering/box.dart

Issue 1157573012: Implement radio button for Sky’s fn2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« sky/sdk/lib/framework/fn2.dart ('K') | « sky/sdk/lib/framework/fn2.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/rendering/box.dart
diff --git a/sky/sdk/lib/framework/rendering/box.dart b/sky/sdk/lib/framework/rendering/box.dart
index 04be3199e43de13f4c4204e012e3fc42e483e071..347ff13990a948a5fd32f4f489631eb6789246eb 100644
--- a/sky/sdk/lib/framework/rendering/box.dart
+++ b/sky/sdk/lib/framework/rendering/box.dart
@@ -658,6 +658,33 @@ class RenderShadowedBox extends RenderProxyBox {
}
}
+typedef void CustomPaintCallback(RenderObjectDisplayList canvas);
+
+class RenderCustomPaint extends RenderProxyBox {
+
+ RenderCustomPaint({
+ CustomPaintCallback callback,
+ RenderBox child
+ }) : super(child) {
+ assert(callback != null);
+ _callback = callback;
+ }
+
+ CustomPaintCallback _callback;
+ void set callback (CustomPaintCallback value) {
+ assert(value != null);
+ if (_callback == value)
+ return;
+ _callback = value;
+ markNeedsPaint();
+ }
+
+ void paint(RenderObjectDisplayList canvas) {
+ _callback(canvas);
+ super.paint(canvas);
+ }
+}
+
// RENDER VIEW LAYOUT MANAGER
class ViewConstraints {
« sky/sdk/lib/framework/fn2.dart ('K') | « sky/sdk/lib/framework/fn2.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698