// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; namespace osu.Framework.Bindables { public interface IBindableNumber : IBindable where T : struct, IComparable, IEquatable { /// /// An event which is raised when has changed. /// event Action PrecisionChanged; /// /// An event which is raised when has changed. /// event Action MinValueChanged; /// /// An event which is raised when has changed. /// event Action MaxValueChanged; /// /// The precision up to which the value of this bindable should be rounded. /// T Precision { get; } /// /// The minimum value of this bindable. Value will never go below this value. /// T MinValue { get; } /// /// The maximum value of this bindable. Value will never go above this value. /// T MaxValue { get; } /// /// Whether is an integer. /// bool IsInteger { get; } /// /// Retrieve a new bindable instance weakly bound to the configuration backing. /// If you are further binding to events of a bindable retrieved using this method, ensure to hold /// a local reference. /// /// A weakly bound copy of the specified bindable. new IBindableNumber GetBoundCopy(); } }