diff --git a/Terminal.Gui/Views/OrientationEventArgs.cs b/Terminal.Gui/Views/OrientationEventArgs.cs
new file mode 100644
index 000000000..8a633ca83
--- /dev/null
+++ b/Terminal.Gui/Views/OrientationEventArgs.cs
@@ -0,0 +1,19 @@
+namespace Terminal.Gui;
+
+/// for events.
+public class OrientationEventArgs : EventArgs
+{
+ /// Constructs a new instance.
+ /// the new orientation
+ public OrientationEventArgs (Orientation orientation)
+ {
+ Orientation = orientation;
+ Cancel = false;
+ }
+
+ /// If set to true, the orientation change operation will be canceled, if applicable.
+ public bool Cancel { get; set; }
+
+ /// The new orientation.
+ public Orientation Orientation { get; set; }
+}
\ No newline at end of file
diff --git a/Terminal.Gui/Views/Slider.cs b/Terminal.Gui/Views/Slider.cs
index 2572e6536..e26eb650d 100644
--- a/Terminal.Gui/Views/Slider.cs
+++ b/Terminal.Gui/Views/Slider.cs
@@ -1,210 +1,5 @@
namespace Terminal.Gui;
-/// for events.
-public class SliderOptionEventArgs : EventArgs
-{
- /// Initializes a new instance of
- /// indicates whether the option is set
- public SliderOptionEventArgs (bool isSet) { IsSet = isSet; }
-
- /// Gets whether the option is set or not.
- public bool IsSet { get; }
-}
-
-/// Represents an option in a .
-/// Data type of the option.
-public class SliderOption
-{
- /// Creates a new empty instance of the class.
- public SliderOption () { }
-
- /// Creates a new instance of the class with values for each property.
- public SliderOption (string legend, Rune legendAbbr, T data)
- {
- Legend = legend;
- LegendAbbr = legendAbbr;
- Data = data;
- }
-
- /// Event fired when the an option has changed.
- public event EventHandler Changed;
-
- /// Custom data of the option.
- public T Data { get; set; }
-
- /// Legend of the option.
- public string Legend { get; set; }
-
- ///
- /// Abbreviation of the Legend. When the too small to fit
- /// .
- ///
- public Rune LegendAbbr { get; set; }
-
- /// Event Raised when this option is set.
- public event EventHandler Set;
-
- /// Creates a human-readable string that represents this .
- public override string ToString () { return "{Legend=" + Legend + ", LegendAbbr=" + LegendAbbr + ", Data=" + Data + "}"; }
-
- /// Event Raised when this option is unset.
- public event EventHandler UnSet;
-
- /// To Raise the event from the Slider.
- internal void OnChanged (bool isSet) { Changed?.Invoke (this, new (isSet)); }
-
- /// To Raise the event from the Slider.
- internal void OnSet () { Set?.Invoke (this, new (true)); }
-
- /// To Raise the event from the Slider.
- internal void OnUnSet () { UnSet?.Invoke (this, new (false)); }
-}
-
-/// Types
-public enum SliderType
-{
- ///
- ///
- /// ├─┼─┼─┼─┼─█─┼─┼─┼─┼─┼─┼─┤
- ///
- ///
- Single,
-
- ///
- ///
- /// ├─┼─█─┼─┼─█─┼─┼─┼─┼─█─┼─┤
- ///
- ///
- Multiple,
-
- ///
- ///
- /// ├▒▒▒▒▒▒▒▒▒█─┼─┼─┼─┼─┼─┼─┤
- ///
- ///
- LeftRange,
-
- ///
- ///
- /// ├─┼─┼─┼─┼─█▒▒▒▒▒▒▒▒▒▒▒▒▒┤
- ///
- ///
- RightRange,
-
- ///
- ///
- /// ├─┼─┼─┼─┼─█▒▒▒▒▒▒▒█─┼─┼─┤
- ///
- ///
- Range
-}
-
-/// Legend Style
-public class SliderAttributes
-{
- /// Attribute for the Legends Container.
- public Attribute? EmptyAttribute { get; set; }
-
- /// Attribute for when the respective Option is NOT Set.
- public Attribute? NormalAttribute { get; set; }
-
- /// Attribute for when the respective Option is Set.
- public Attribute? SetAttribute { get; set; }
-}
-
-/// Style
-public class SliderStyle
-{
- /// Constructs a new instance.
- public SliderStyle () { LegendAttributes = new (); }
-
- /// The glyph and the attribute to indicate mouse dragging.
- public Cell DragChar { get; set; }
-
- /// The glyph and the attribute used for empty spaces on the slider.
- public Cell EmptyChar { get; set; }
-
- /// The glyph and the attribute used for the end of ranges on the slider.
- public Cell EndRangeChar { get; set; }
-
- /// Legend attributes
- public SliderAttributes LegendAttributes { get; set; }
-
- /// The glyph and the attribute used for each option (tick) on the slider.
- public Cell OptionChar { get; set; }
-
- /// The glyph and the attribute used for filling in ranges on the slider.
- public Cell RangeChar { get; set; }
-
- /// The glyph and the attribute used for options (ticks) that are set on the slider.
- public Cell SetChar { get; set; }
-
- /// The glyph and the attribute used for spaces between options (ticks) on the slider.
- public Cell SpaceChar { get; set; }
-
- /// The glyph and the attribute used for the start of ranges on the slider.
- public Cell StartRangeChar { get; set; }
-}
-
-/// All configuration are grouped in this class.
-internal class SliderConfiguration
-{
- internal bool _allowEmpty;
- internal int _endSpacing;
- internal int _minInnerSpacing = 1;
- internal int _cachedInnerSpacing; // Currently calculated
- internal Orientation _legendsOrientation = Orientation.Horizontal;
- internal bool _rangeAllowSingle;
- internal bool _showEndSpacing;
- internal bool _showLegends;
- internal bool _showLegendsAbbr;
- internal Orientation _sliderOrientation = Orientation.Horizontal;
- internal int _startSpacing;
- internal SliderType _type = SliderType.Single;
- internal bool _useMinimumSize;
-}
-
-/// for events.
-public class SliderEventArgs : EventArgs
-{
- /// Initializes a new instance of
- /// The current options.
- /// Index of the option that is focused. -1 if no option has the focus.
- public SliderEventArgs (Dictionary> options, int focused = -1)
- {
- Options = options;
- Focused = focused;
- Cancel = false;
- }
-
- /// If set to true, the focus operation will be canceled, if applicable.
- public bool Cancel { get; set; }
-
- /// Gets or sets the index of the option that is focused.
- public int Focused { get; set; }
-
- /// Gets/sets whether the option is set or not.
- public Dictionary> Options { get; set; }
-}
-
-/// for events.
-public class OrientationEventArgs : EventArgs
-{
- /// Constructs a new instance.
- /// the new orientation
- public OrientationEventArgs (Orientation orientation)
- {
- Orientation = orientation;
- Cancel = false;
- }
-
- /// If set to true, the orientation change operation will be canceled, if applicable.
- public bool Cancel { get; set; }
-
- /// The new orientation.
- public Orientation Orientation { get; set; }
-}
-
/// Slider control.
public class Slider : Slider