#nullable enable
using System.ComponentModel;
namespace Terminal.Gui;
/// for events that convey state changes to a class.
///
/// Events that use this class can be cancellable. The property should be set to
/// to prevent the state change from occurring.
///
public class StateEventArgs : CancelEventArgs
{
/// Creates a new instance of the class.
///
///
public StateEventArgs (T oldValue, T newValue)
{
OldValue = oldValue;
NewValue = newValue;
}
/// The new state
public T NewValue { get; set; }
/// The previous state
public T OldValue { get; }
}