using System.Collections.Generic; using CUE.NET.Brushes; using CUE.NET.Devices; using CUE.NET.Devices.Generic; using CUE.NET.Effects; using CUE.NET.Groups.Extensions; namespace CUE.NET.Groups { /// /// Represents a basic ledgroup. /// public abstract class AbstractLedGroup : AbstractEffectTarget, ILedGroup { #region Properties & Fields /// /// Gets the strongly-typed target used for the effect. /// protected override ILedGroup EffectTarget => this; /// /// Gets the device this ledgroup belongs to. /// public ICueDevice Device { get; } /// /// Gets or sets the brush which should be drawn over this group. /// public IBrush Brush { get; set; } /// /// Gets or sets the z-index of this ledgroup to allow ordering them before drawing. (lowest first) (default: 0) /// public int ZIndex { get; set; } = 0; #endregion #region Constructors /// /// Initializes a new instance of the class. /// /// The device this ledgroup belongs to. /// Specifies whether this group should be automatically attached or not. protected AbstractLedGroup(ICueDevice device, bool autoAttach = true) { this.Device = device; if (autoAttach) this.Attach(); } #endregion #region Methods /// /// Gets a list containing all LEDs of this group. /// /// The list containing all LEDs of this group. public abstract IEnumerable GetLeds(); #endregion } }