| Index: sky/framework/fn.dart
|
| diff --git a/sky/framework/fn.dart b/sky/framework/fn.dart
|
| index 6f9543114bba9c2f5314a827d57d43a72194e5ee..3d8bde1d6a5dbc8c66d5b1459188e33f50b558d8 100644
|
| --- a/sky/framework/fn.dart
|
| +++ b/sky/framework/fn.dart
|
| @@ -583,6 +583,43 @@ class Container extends SkyElementWrapper {
|
| );
|
| }
|
|
|
| +abstract class LayoutContainer extends Container {
|
| +
|
| + LayoutContainer({
|
| + Object key,
|
| + List<UINode> children,
|
| + Style style,
|
| + String inlineStyle
|
| + }) : super(
|
| + key: key,
|
| + children: children,
|
| + style: style,
|
| + inlineStyle: inlineStyle
|
| + );
|
| +
|
| + sky.Node _createNode() {
|
| + var result = super._createNode();
|
| + result.setLayoutManager(() => layout(_root));
|
| + return result;
|
| + }
|
| +
|
| + void _syncNode(SkyNodeWrapper old) {
|
| + super._syncNode(old);
|
| + _root.setNeedsLayout();
|
| + }
|
| +
|
| + void layout(sky.Element skyNode);
|
| + // set skyNode.width if you have an opinion about your width
|
| + // for each skyNode.getChildElements()[i]:
|
| + // set .width
|
| + // call .layout()
|
| + // set .x, .y
|
| + // set .width if you want to force a width
|
| + // set .height if you want to force a height
|
| + // set skyNode.height
|
| +
|
| +}
|
| +
|
| class Image extends SkyElementWrapper {
|
|
|
| String get _tagName => 'img';
|
|
|