// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved. using System; namespace FlaxEngine { /// /// This attributes provides additional information on a member collection. /// [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Class)] public sealed class CollectionAttribute : Attribute { /// /// The display type for collections. /// public enum DisplayType { /// /// Displays the default display type. /// Default, /// /// Displays a header. /// Header, /// /// Displays inline. /// Inline, } /// /// Gets or sets the display type. /// public DisplayType Display; /// /// Gets or sets whether this collection is read-only. If true, applications using this collection should not allow to add or remove items. /// public bool ReadOnly; /// /// Gets or sets whether the items of this collection can be reordered. If true, applications using this collection should provide users a way to reorder items. /// public bool CanReorderItems = true; /// /// Gets or sets whether the items of this collection can be null. If true, applications using this collection should prevent user to add null items to the collection. /// public bool NotNullItems; /// /// Custom editor class typename for collection values editing. /// public string OverrideEditorTypeName; /// /// The spacing amount between collection items in the UI. /// public float Spacing; /// /// The minimum size of the collection. /// public int MinCount; /// /// The maximum size of the collection. Zero if unlimited. /// public int MaxCount; /// /// The collection background color. /// public Color? BackgroundColor; } }