diff options
Diffstat (limited to 'Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Layout/ILayoutElement.cs')
-rw-r--r-- | Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Layout/ILayoutElement.cs | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Layout/ILayoutElement.cs b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Layout/ILayoutElement.cs new file mode 100644 index 0000000..d0e1510 --- /dev/null +++ b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Layout/ILayoutElement.cs @@ -0,0 +1,50 @@ +using UnityEngine; +using System.Collections; + +namespace UnityEngine.UI +{ + public interface ILayoutElement + {
+#region LayoutGroup的派生类才会实现,其他ILayoutElement比如Image,Text不会实现 + // After this method is invoked, layout horizontal input properties should return up-to-date values.
+ // Children will already have up-to-date layout horizontal inputs when this methods is called.
+ void CalculateLayoutInputHorizontal(); + // After this method is invoked, layout vertical input properties should return up-to-date values. + // Children will already have up-to-date layout vertical inputs when this methods is called. + void CalculateLayoutInputVertical();
+#endregion +
+ // Layout horizontal inputs
+ float minWidth { get; } + float preferredWidth { get; } + float flexibleWidth { get; } + // Layout vertical inputs + float minHeight { get; } + float preferredHeight { get; } + float flexibleHeight { get; } + + int layoutPriority { get; } + } + + public interface ILayoutController + { + void SetLayoutHorizontal(); + void SetLayoutVertical(); + } + + // An ILayoutGroup component should drive the RectTransforms of its children. + public interface ILayoutGroup : ILayoutController + { + } + + // An ILayoutSelfController component should drive its own RectTransform. + public interface ILayoutSelfController : ILayoutController + { + } + + // An ILayoutIgnorer component is ignored by the auto-layout system. + public interface ILayoutIgnorer + { + bool ignoreLayout { get; } + } +} |