浏览代码

Merge pull request #210 from Unity-Technologies/siyaoH/1.17/grid

Siyao h/1.17/grid
/main
GitHub 3 年前
当前提交
47330487
共有 13 个文件被更改,包括 33 次插入21 次删除
  1. 2
      com.unity.uiwidgets/Runtime/cupertino/action_Sheet.cs
  2. 2
      com.unity.uiwidgets/Runtime/cupertino/dialog.cs
  3. 20
      com.unity.uiwidgets/Runtime/external/SplayTree.cs
  4. 2
      com.unity.uiwidgets/Runtime/material/chip.cs
  5. 2
      com.unity.uiwidgets/Runtime/material/input_decorator.cs
  6. 2
      com.unity.uiwidgets/Runtime/material/list_tile.cs
  7. 2
      com.unity.uiwidgets/Runtime/widgets/binding.cs
  8. 12
      com.unity.uiwidgets/Runtime/widgets/framework.cs
  9. 2
      com.unity.uiwidgets/Runtime/widgets/layout_builder.cs
  10. 2
      com.unity.uiwidgets/Runtime/widgets/list_wheel_scroll_view.cs
  11. 2
      com.unity.uiwidgets/Runtime/widgets/sliver.cs
  12. 2
      com.unity.uiwidgets/Runtime/widgets/sliver_persistent_header.cs
  13. 2
      com.unity.uiwidgets/Runtime/widgets/table.cs

2
com.unity.uiwidgets/Runtime/cupertino/action_Sheet.cs


_AlertSections.actionsSection);
}
internal override void forgetChild(Element child) {
public override void forgetChild(Element child) {
D.assert(child == _contentElement || child == _actionsElement);
if (_contentElement == child) {
_contentElement = null;

2
com.unity.uiwidgets/Runtime/cupertino/dialog.cs


_AlertDialogSections.actionsSection);
}
internal override void forgetChild(Element child) {
public override void forgetChild(Element child) {
D.assert(child == _contentElement || child == _actionsElement);
if (_contentElement == child) {
_contentElement = null;

20
com.unity.uiwidgets/Runtime/external/SplayTree.cs


using System.Collections.Generic;
using System.Linq;
namespace Unity.UIWidgets.external {
class SplayTree<TKey, TValue> : IDictionary<TKey, TValue> where TKey : IComparable<TKey> {
namespace Unity.UIWidgets.external {
public class SplayTree<TKey, TValue> : IDictionary<TKey, TValue> where TKey : IComparable<TKey> {
SplayTreeNode root;
int count;
int version = 0;

if (key == null) throw new Exception("should input null");
if (root == null) throw new Exception("root is null");
int comp = Splay(key);
if (comp < 0) return root.Key;
if (comp > 0) return root.Key;
SplayTreeNode node = root.LeftChild;
if (node == null) throw new Exception("does not exist");
while (node.RightChild != null) {

}
public TKey firstKey() {
if (root == null) return default; // TODO: this is suppose to be null
var first = First().Value;
return first.Key;
}
public TKey lastKey() {
if (root == null) return default; // TODO: this is suppose to be null
var last = Last().Value;
return last.Key;
}
if (comp > 0) return root.Key;
if (comp < 0) return root.Key;
SplayTreeNode node = root.LeftChild;
if (node == null) throw new Exception("does not exist");
while (node.LeftChild != null) {

2
com.unity.uiwidgets/Runtime/material/chip.cs


slotToChild.Values.Each((value) => { visitor(value); });
}
internal override void forgetChild(Element child) {
public override void forgetChild(Element child) {
D.assert(slotToChild.ContainsValue(child));
D.assert(childToSlot.ContainsKey(child));
_ChipSlot slot = childToSlot[child];

2
com.unity.uiwidgets/Runtime/material/input_decorator.cs


slotToChild.Values.Each((child) => { visitor(child); });
}
internal override void forgetChild(Element child) {
public override void forgetChild(Element child) {
D.assert(slotToChild.ContainsValue(child));
D.assert(childToSlot.ContainsKey(child));
_DecorationSlot slot = childToSlot[child];

2
com.unity.uiwidgets/Runtime/material/list_tile.cs


}
}
internal override void forgetChild(Element child) {
public override void forgetChild(Element child) {
D.assert(slotToChild.Values.Contains(child));
D.assert(childToSlot.Keys.Contains(child));
_ListTileSlot slot = childToSlot[child];

2
com.unity.uiwidgets/Runtime/widgets/binding.cs


}
}
internal override void forgetChild(Element child) {
public override void forgetChild(Element child) {
D.assert(child == _child);
_child = null;
base.forgetChild(child);

12
com.unity.uiwidgets/Runtime/widgets/framework.cs


HashSet<Element> _debugForgottenChildrenWithGlobalKey = new HashSet<Element>();
internal virtual void forgetChild(Element child) {
public virtual void forgetChild(Element child) {
D.assert(() => {
if (child.widget.key is GlobalKey)
_debugForgottenChildrenWithGlobalKey.Add(child);

}
}
internal override void forgetChild(Element child) {
public override void forgetChild(Element child) {
D.assert(child == _child);
_child = null;
base.forgetChild(child);

protected RenderObjectElement(RenderObjectWidget widget) : base(widget) {
}
public new RenderObjectWidget widget {
public new virtual RenderObjectWidget widget {
get { return (RenderObjectWidget) base.widget; }
}

public LeafRenderObjectElement(LeafRenderObjectWidget widget) : base(widget) {
}
internal override void forgetChild(Element child) {
public override void forgetChild(Element child) {
D.assert(false);
base.forgetChild(child);
}

}
}
internal override void forgetChild(Element child) {
public override void forgetChild(Element child) {
D.assert(child == _child);
_child = null;
base.forgetChild(child);

}
}
internal override void forgetChild(Element child) {
public override void forgetChild(Element child) {
D.assert(_children.Contains(child));
D.assert(!_forgottenChildren.Contains(child));
_forgottenChildren.Add(child);

2
com.unity.uiwidgets/Runtime/widgets/layout_builder.cs


visitor(_child);
}
internal override void forgetChild(Element child) {
public override void forgetChild(Element child) {
D.assert(child == _child);
_child = null;
base.forgetChild(child);

2
com.unity.uiwidgets/Runtime/widgets/list_wheel_scroll_view.cs


}
}
internal override void forgetChild(Element child) {
public override void forgetChild(Element child) {
_childElements.Remove((int) (child.slot));
base.forgetChild(child);
}

2
com.unity.uiwidgets/Runtime/widgets/sliver.cs


}
internal override void forgetChild(Element child) {
public override void forgetChild(Element child) {
D.assert(child != null);
D.assert(child.slot != null);
D.assert(_childElements.ContainsKey((int) child.slot));

2
com.unity.uiwidgets/Runtime/widgets/sliver_persistent_header.cs


});
}
internal override void forgetChild(Element child) {
public override void forgetChild(Element child) {
D.assert(child == this.child);
this.child = null;
base.forgetChild(child);

2
com.unity.uiwidgets/Runtime/widgets/table.cs


}
}
internal override void forgetChild(Element child) {
public override void forgetChild(Element child) {
_forgottenChildren.Add(child);
}
}

正在加载...
取消
保存