Browse Source

Move all nested eventargs out of parent classes to root

tznind 2 years ago
parent
commit
2ed71e284c
60 changed files with 983 additions and 791 deletions
  1. 0 13
      Terminal.Gui/Configuration/ConfigurationManager.cs
  2. 18 0
      Terminal.Gui/Configuration/ConfigurationManagerEventArgs.cs
  3. 24 0
      Terminal.Gui/Configuration/ThemeManagerEventArgs.cs
  4. 1 19
      Terminal.Gui/Configuration/ThemeScope.cs
  5. 1 15
      Terminal.Gui/Core/Application.cs
  6. 1 20
      Terminal.Gui/Core/CollectionNavigator.cs
  7. 25 0
      Terminal.Gui/Core/FocusEventArgs.cs
  8. 25 0
      Terminal.Gui/Core/KeyEventEventArgs.cs
  9. 22 0
      Terminal.Gui/Core/KeystrokeNavigatorEventArgs.cs
  10. 32 0
      Terminal.Gui/Core/ResizedEventArgs.cs
  11. 46 0
      Terminal.Gui/Core/TitleEventArgs.cs
  12. 0 22
      Terminal.Gui/Core/Toplevel.cs
  13. 26 0
      Terminal.Gui/Core/ToplevelClosingEventArgs.cs
  14. 1 41
      Terminal.Gui/Core/View.cs
  15. 1 32
      Terminal.Gui/Core/Window.cs
  16. 43 0
      Terminal.Gui/Views/CellActivatedEventArgs.cs
  17. 32 0
      Terminal.Gui/Views/ContentsChangedEventArgs.cs
  18. 0 33
      Terminal.Gui/Views/DateField.cs
  19. 43 0
      Terminal.Gui/Views/DateTimeEventArgs.cs
  20. 1 59
      Terminal.Gui/Views/HexView.cs
  21. 37 0
      Terminal.Gui/Views/HexViewEditEventArgs.cs
  22. 43 0
      Terminal.Gui/Views/HexViewEventArgs.cs
  23. 36 0
      Terminal.Gui/Views/HistoryTextItem.cs
  24. 0 49
      Terminal.Gui/Views/ListView.cs
  25. 28 0
      Terminal.Gui/Views/ListViewItemEventArgs.cs
  26. 27 0
      Terminal.Gui/Views/ListViewRowEventArgs.cs
  27. 0 68
      Terminal.Gui/Views/Menu.cs
  28. 42 0
      Terminal.Gui/Views/MenuClosingEventArgs.cs
  29. 32 0
      Terminal.Gui/Views/MenuOpeningEventArgs.cs
  30. 0 26
      Terminal.Gui/Views/RadioGroup.cs
  31. 63 0
      Terminal.Gui/Views/SelectedCellChangedEventArgs.cs
  32. 29 0
      Terminal.Gui/Views/SelectedItemChangedArgs.cs
  33. 38 0
      Terminal.Gui/Views/SplitterEventArgs.cs
  34. 31 0
      Terminal.Gui/Views/TabChangedEventArgs.cs
  35. 36 0
      Terminal.Gui/Views/TabMouseEventArgs.cs
  36. 1 59
      Terminal.Gui/Views/TabView.cs
  37. 1 94
      Terminal.Gui/Views/TableView.cs
  38. 31 0
      Terminal.Gui/Views/TextChangedEventArgs.cs
  39. 34 0
      Terminal.Gui/Views/TextChangingEventArgs.cs
  40. 0 42
      Terminal.Gui/Views/TextField.cs
  41. 2 57
      Terminal.Gui/Views/TextView.cs
  42. 2 68
      Terminal.Gui/Views/TileView.cs
  43. 42 0
      Terminal.Gui/Views/TitleEventArgs.cs
  44. 38 0
      Terminal.Gui/Windows/StepChangeEventArgs.cs
  45. 1 51
      Terminal.Gui/Windows/Wizard.cs
  46. 24 0
      Terminal.Gui/Windows/WizardButtonEventArgs.cs
  47. 3 3
      UICatalog/Scenarios/CsvEditor.cs
  48. 2 2
      UICatalog/Scenarios/HexEditor.cs
  49. 1 1
      UICatalog/Scenarios/InteractiveTree.cs
  50. 1 1
      UICatalog/Scenarios/MultiColouredTable.cs
  51. 2 2
      UICatalog/Scenarios/Notepad.cs
  52. 2 2
      UICatalog/Scenarios/TableEditor.cs
  53. 1 1
      UICatalog/Scenarios/TreeViewFileSystem.cs
  54. 2 2
      UICatalog/Scenarios/VkeyPacketSimulator.cs
  55. 1 1
      UICatalog/UICatalog.cs
  56. 1 1
      UnitTests/Application/ApplicationTests.cs
  57. 2 2
      UnitTests/Configuration/ConfigurationMangerTests.cs
  58. 3 3
      UnitTests/Core/ViewTests.cs
  59. 1 1
      UnitTests/UICatalog/ScenarioTests.cs
  60. 1 1
      UnitTests/Views/HexViewTests.cs

+ 0 - 13
Terminal.Gui/Configuration/ConfigurationManager.cs

@@ -301,19 +301,6 @@ namespace Terminal.Gui.Configuration {
 			return stream;
 		}
 
-		/// <summary>
-		/// Event arguments for the <see cref="ConfigurationManager"/> events.
-		/// </summary>
-		public class ConfigurationManagerEventArgs : EventArgs {
-
-			/// <summary>
-			/// Initializes a new instance of <see cref="ConfigurationManagerEventArgs"/>
-			/// </summary>
-			public ConfigurationManagerEventArgs ()
-			{
-			}
-		}
-
 		/// <summary>
 		/// Gets or sets whether the <see cref="ConfigurationManager"/> should throw an exception if it encounters 
 		/// an error on deserialization. If <see langword="false"/> (the default), the error is logged and printed to the 

+ 18 - 0
Terminal.Gui/Configuration/ConfigurationManagerEventArgs.cs

@@ -0,0 +1,18 @@
+using System;
+
+#nullable enable
+
+namespace Terminal.Gui.Configuration {
+	/// <summary>
+	/// Event arguments for the <see cref="ConfigurationManager"/> events.
+	/// </summary>
+	public class ConfigurationManagerEventArgs : EventArgs {
+
+		/// <summary>
+		/// Initializes a new instance of <see cref="ConfigurationManagerEventArgs"/>
+		/// </summary>
+		public ConfigurationManagerEventArgs ()
+		{
+		}
+	}	
+}

+ 24 - 0
Terminal.Gui/Configuration/ThemeManagerEventArgs.cs

@@ -0,0 +1,24 @@
+using System;
+
+#nullable enable
+
+namespace Terminal.Gui.Configuration {
+
+	/// <summary>
+	/// Event arguments for the <see cref="ConfigurationManager.ThemeManager"/> events.
+	/// </summary>
+	public class ThemeManagerEventArgs : EventArgs {
+		/// <summary>
+		/// The name of the new active theme..
+		/// </summary>
+		public string NewTheme { get; set; } = string.Empty;
+
+		/// <summary>
+		/// Initializes a new instance of <see cref="ThemeManagerEventArgs"/>
+		/// </summary>
+		public ThemeManagerEventArgs (string newTheme)
+		{
+			NewTheme = newTheme;
+		}
+	}
+}

+ 1 - 19
Terminal.Gui/Configuration/ThemeScope.cs

@@ -110,7 +110,7 @@ namespace Terminal.Gui.Configuration {
 		/// 		}
 		/// 	}
 		/// </code></example> 
-		public class ThemeManager : IDictionary<string, ThemeScope> {
+		public partial class ThemeManager : IDictionary<string, ThemeScope> {
 			private static readonly ThemeManager _instance = new ThemeManager ();
 			static ThemeManager () { } // Make sure it's truly lazy
 			private ThemeManager () { } // Prevent instantiation outside
@@ -152,24 +152,6 @@ namespace Terminal.Gui.Configuration {
 				}
 			}
 
-			/// <summary>
-			/// Event arguments for the <see cref="ThemeManager"/> events.
-			/// </summary>
-			public class ThemeManagerEventArgs : EventArgs {
-				/// <summary>
-				/// The name of the new active theme..
-				/// </summary>
-				public string NewTheme { get; set; } = string.Empty;
-
-				/// <summary>
-				/// Initializes a new instance of <see cref="ThemeManagerEventArgs"/>
-				/// </summary>
-				public ThemeManagerEventArgs (string newTheme)
-				{
-					NewTheme = newTheme;
-				}
-			}
-
 			/// <summary>
 			/// Called when the selected theme has changed. Fires the <see cref="ThemeChanged"/> event.
 			/// </summary>

+ 1 - 15
Terminal.Gui/Core/Application.cs

@@ -59,7 +59,7 @@ namespace Terminal.Gui {
 	///     to the mainloop, allowing user code to use async/await.
 	///   </para>
 	/// </remarks>
-	public static class Application {
+	public static partial class Application {
 		static readonly Stack<Toplevel> toplevels = new Stack<Toplevel> ();
 
 		/// <summary>
@@ -1501,20 +1501,6 @@ namespace Terminal.Gui {
 			}
 		}
 
-		/// <summary>
-		/// Event arguments for the <see cref="Application.Resized"/> event.
-		/// </summary>
-		public class ResizedEventArgs : EventArgs {
-			/// <summary>
-			/// The number of rows in the resized terminal.
-			/// </summary>
-			public int Rows { get; set; }
-			/// <summary>
-			/// The number of columns in the resized terminal.
-			/// </summary>
-			public int Cols { get; set; }
-		}
-
 		/// <summary>
 		/// Invoked when the terminal was resized. The new size of the terminal is provided.
 		/// </summary>

+ 1 - 20
Terminal.Gui/Core/CollectionNavigator.cs

@@ -15,7 +15,7 @@ namespace Terminal.Gui {
 	/// If the user pauses keystrokes for a short time (see <see cref="TypingDelay"/>), the search string is cleared.
 	/// </para>
 	/// </summary>
-	public class CollectionNavigator {
+	public partial class CollectionNavigator {
 		/// <summary>
 		/// Constructs a new CollectionNavigator.
 		/// </summary>
@@ -44,25 +44,6 @@ namespace Terminal.Gui {
 		/// </summary>
 		public IEnumerable<object> Collection { get; set; }
 
-		/// <summary>
-		/// Event arguments for the <see cref="CollectionNavigator.SearchStringChanged"/> event.
-		/// </summary>
-		public class KeystrokeNavigatorEventArgs : EventArgs{
-			/// <summary>
-			/// he current <see cref="SearchString"/>.
-			/// </summary>
-			public string SearchString { get; }
-
-			/// <summary>
-			/// Initializes a new instance of <see cref="KeystrokeNavigatorEventArgs"/>
-			/// </summary>
-			/// <param name="searchString">The current <see cref="SearchString"/>.</param>
-			public KeystrokeNavigatorEventArgs (string searchString)
-			{
-				SearchString = searchString;
-			}
-		}
-
 		/// <summary>
 		/// This event is invoked when <see cref="SearchString"/>  changes. Useful for debugging.
 		/// </summary>

+ 25 - 0
Terminal.Gui/Core/FocusEventArgs.cs

@@ -0,0 +1,25 @@
+using System;
+
+namespace Terminal.Gui {
+
+	/// <summary>
+	/// Defines the event arguments for <see cref="View.SetFocus(View)"/>
+	/// </summary>
+	public class FocusEventArgs : EventArgs {
+		/// <summary>
+		/// Constructs.
+		/// </summary>
+		/// <param name="view">The view that gets or loses focus.</param>
+		public FocusEventArgs (View view) { View = view; }
+		/// <summary>
+		/// Indicates if the current focus event has already been processed and the driver should stop notifying any other event subscriber.
+		/// Its important to set this value to true specially when updating any View's layout from inside the subscriber method.
+		/// </summary>
+		public bool Handled { get; set; }
+		/// <summary>
+		/// Indicates the current view that gets or loses focus.
+		/// </summary>
+		public View View { get; set; }
+	}
+
+}

+ 25 - 0
Terminal.Gui/Core/KeyEventEventArgs.cs

@@ -0,0 +1,25 @@
+using System;
+
+namespace Terminal.Gui {
+
+	/// <summary>
+	/// Defines the event arguments for <see cref="KeyEvent"/>
+	/// </summary>
+	public class KeyEventEventArgs : EventArgs {
+		/// <summary>
+		/// Constructs.
+		/// </summary>
+		/// <param name="ke"></param>
+		public KeyEventEventArgs (KeyEvent ke) => KeyEvent = ke;
+		/// <summary>
+		/// The <see cref="KeyEvent"/> for the event.
+		/// </summary>
+		public KeyEvent KeyEvent { get; set; }
+		/// <summary>
+		/// Indicates if the current Key event has already been processed and the driver should stop notifying any other event subscriber.
+		/// Its important to set this value to true specially when updating any View's layout from inside the subscriber method.
+		/// </summary>
+		public bool Handled { get; set; } = false;
+	}
+
+}

+ 22 - 0
Terminal.Gui/Core/KeystrokeNavigatorEventArgs.cs

@@ -0,0 +1,22 @@
+using System;
+
+namespace Terminal.Gui {
+	/// <summary>
+	/// Event arguments for the <see cref="CollectionNavigator.SearchStringChanged"/> event.
+	/// </summary>
+	public class KeystrokeNavigatorEventArgs : EventArgs {
+		/// <summary>
+		/// he current <see cref="SearchString"/>.
+		/// </summary>
+		public string SearchString { get; }
+
+		/// <summary>
+		/// Initializes a new instance of <see cref="KeystrokeNavigatorEventArgs"/>
+		/// </summary>
+		/// <param name="searchString">The current <see cref="SearchString"/>.</param>
+		public KeystrokeNavigatorEventArgs (string searchString)
+		{
+			SearchString = searchString;
+		}
+	}
+}

+ 32 - 0
Terminal.Gui/Core/ResizedEventArgs.cs

@@ -0,0 +1,32 @@
+//
+// Core.cs: The core engine for gui.cs
+//
+// Authors:
+//   Miguel de Icaza ([email protected])
+//
+// Pending:
+//   - Check for NeedDisplay on the hierarchy and repaint
+//   - Layout support
+//   - "Colors" type or "Attributes" type?
+//   - What to surface as "BackgroundCOlor" when clearing a window, an attribute or colors?
+//
+// Optimizations
+//   - Add rendering limitation to the exposed area
+using System;
+
+namespace Terminal.Gui {
+
+	/// <summary>
+	/// Event arguments for the <see cref="Application.Resized"/> event.
+	/// </summary>
+	public class ResizedEventArgs : EventArgs {
+		/// <summary>
+		/// The number of rows in the resized terminal.
+		/// </summary>
+		public int Rows { get; set; }
+		/// <summary>
+		/// The number of columns in the resized terminal.
+		/// </summary>
+		public int Cols { get; set; }
+	}
+}

+ 46 - 0
Terminal.Gui/Core/TitleEventArgs.cs

@@ -0,0 +1,46 @@
+//
+// Authors:
+//   Miguel de Icaza ([email protected])
+//
+// NOTE: Window is functionally identical to FrameView with the following exceptions. 
+//  - Window is a Toplevel
+//  - FrameView Does not support padding (but should)
+//  - FrameView Does not support mouse dragging
+//  - FrameView Does not support IEnumerable
+// Any updates done here should probably be done in FrameView as well; TODO: Merge these classes
+
+using System;
+using NStack;
+
+namespace Terminal.Gui {
+	/// <summary>
+	/// Event arguments for Title change events.
+	/// </summary>
+	public class TitleEventArgs : EventArgs {
+		/// <summary>
+		/// The new Window Title.
+		/// </summary>
+		public ustring NewTitle { get; set; }
+
+		/// <summary>
+		/// The old Window Title.
+		/// </summary>
+		public ustring OldTitle { get; set; }
+
+		/// <summary>
+		/// Flag which allows canceling the Title change.
+		/// </summary>
+		public bool Cancel { get; set; }
+
+		/// <summary>
+		/// Initializes a new instance of <see cref="TitleEventArgs"/>
+		/// </summary>
+		/// <param name="oldTitle">The <see cref="Window.Title"/> that is/has been replaced.</param>
+		/// <param name="newTitle">The new <see cref="Window.Title"/> to be replaced.</param>
+		public TitleEventArgs (ustring oldTitle, ustring newTitle)
+		{
+			OldTitle = oldTitle;
+			NewTitle = newTitle;
+		}
+	}
+}

+ 0 - 22
Terminal.Gui/Core/Toplevel.cs

@@ -1050,26 +1050,4 @@ namespace Terminal.Gui {
 				return string.Compare (x.Id.ToString (), y.Id.ToString ());
 		}
 	}
-	/// <summary>
-	/// <see cref="EventArgs"/> implementation for the <see cref="Toplevel.Closing"/> event.
-	/// </summary>
-	public class ToplevelClosingEventArgs : EventArgs {
-		/// <summary>
-		/// The toplevel requesting stop.
-		/// </summary>
-		public View RequestingTop { get; }
-		/// <summary>
-		/// Provides an event cancellation option.
-		/// </summary>
-		public bool Cancel { get; set; }
-
-		/// <summary>
-		/// Initializes the event arguments with the requesting toplevel.
-		/// </summary>
-		/// <param name="requestingTop">The <see cref="RequestingTop"/>.</param>
-		public ToplevelClosingEventArgs (Toplevel requestingTop)
-		{
-			RequestingTop = requestingTop;
-		}
-	}
 }

+ 26 - 0
Terminal.Gui/Core/ToplevelClosingEventArgs.cs

@@ -0,0 +1,26 @@
+using System;
+
+namespace Terminal.Gui {
+	/// <summary>
+	/// <see cref="EventArgs"/> implementation for the <see cref="Toplevel.Closing"/> event.
+	/// </summary>
+	public class ToplevelClosingEventArgs : EventArgs {
+		/// <summary>
+		/// The toplevel requesting stop.
+		/// </summary>
+		public View RequestingTop { get; }
+		/// <summary>
+		/// Provides an event cancellation option.
+		/// </summary>
+		public bool Cancel { get; set; }
+
+		/// <summary>
+		/// Initializes the event arguments with the requesting toplevel.
+		/// </summary>
+		/// <param name="requestingTop">The <see cref="RequestingTop"/>.</param>
+		public ToplevelClosingEventArgs (Toplevel requestingTop)
+		{
+			RequestingTop = requestingTop;
+		}
+	}
+}

+ 1 - 41
Terminal.Gui/Core/View.cs

@@ -101,7 +101,7 @@ namespace Terminal.Gui {
 	///    frames for the vies that use <see cref="LayoutStyle.Computed"/>.
 	/// </para>
 	/// </remarks>
-	public class View : Responder, ISupportInitializeNotification {
+	public partial class View : Responder, ISupportInitializeNotification {
 
 		internal enum Direction {
 			Forward,
@@ -1331,26 +1331,6 @@ namespace Terminal.Gui {
 			}
 		}
 
-		/// <summary>
-		/// Defines the event arguments for <see cref="SetFocus(View)"/>
-		/// </summary>
-		public class FocusEventArgs : EventArgs {
-			/// <summary>
-			/// Constructs.
-			/// </summary>
-			/// <param name="view">The view that gets or loses focus.</param>
-			public FocusEventArgs (View view) { View = view; }
-			/// <summary>
-			/// Indicates if the current focus event has already been processed and the driver should stop notifying any other event subscriber.
-			/// Its important to set this value to true specially when updating any View's layout from inside the subscriber method.
-			/// </summary>
-			public bool Handled { get; set; }
-			/// <summary>
-			/// Indicates the current view that gets or loses focus.
-			/// </summary>
-			public View View { get; set; }
-		}
-
 		/// <summary>
 		/// Method invoked when a subview is being added to this view.
 		/// </summary>
@@ -1690,26 +1670,6 @@ namespace Terminal.Gui {
 			SuperView?.SetFocus (this);
 		}
 
-		/// <summary>
-		/// Defines the event arguments for <see cref="KeyEvent"/>
-		/// </summary>
-		public class KeyEventEventArgs : EventArgs {
-			/// <summary>
-			/// Constructs.
-			/// </summary>
-			/// <param name="ke"></param>
-			public KeyEventEventArgs (KeyEvent ke) => KeyEvent = ke;
-			/// <summary>
-			/// The <see cref="KeyEvent"/> for the event.
-			/// </summary>
-			public KeyEvent KeyEvent { get; set; }
-			/// <summary>
-			/// Indicates if the current Key event has already been processed and the driver should stop notifying any other event subscriber.
-			/// Its important to set this value to true specially when updating any View's layout from inside the subscriber method.
-			/// </summary>
-			public bool Handled { get; set; } = false;
-		}
-
 		/// <summary>
 		/// Invoked when a character key is pressed and occurs after the key up event.
 		/// </summary>

+ 1 - 32
Terminal.Gui/Core/Window.cs

@@ -24,7 +24,7 @@ namespace Terminal.Gui {
 	/// The 'client area' of a <see cref="Window"/> is a rectangle deflated by one or more rows/columns from <see cref="View.Bounds"/>. A this time there is no
 	/// API to determine this rectangle.
 	/// </remarks>
-	public class Window : Toplevel {
+	public partial class Window : Toplevel {
 		View contentView;
 		ustring title = ustring.Empty;
 
@@ -343,37 +343,6 @@ namespace Terminal.Gui {
 				base.TextAlignment = contentView.TextAlignment = value;
 			}
 		}
-
-		/// <summary>
-		/// Event arguments for <see cref="Title"/> change events.
-		/// </summary>
-		public class TitleEventArgs : EventArgs {
-			/// <summary>
-			/// The new Window Title.
-			/// </summary>
-			public ustring NewTitle { get; set; }
-
-			/// <summary>
-			/// The old Window Title.
-			/// </summary>
-			public ustring OldTitle { get; set; }
-
-			/// <summary>
-			/// Flag which allows canceling the Title change.
-			/// </summary>
-			public bool Cancel { get; set; }
-
-			/// <summary>
-			/// Initializes a new instance of <see cref="TitleEventArgs"/>
-			/// </summary>
-			/// <param name="oldTitle">The <see cref="Window.Title"/> that is/has been replaced.</param>
-			/// <param name="newTitle">The new <see cref="Window.Title"/> to be replaced.</param>
-			public TitleEventArgs (ustring oldTitle, ustring newTitle)
-			{
-				OldTitle = oldTitle;
-				NewTitle = newTitle;
-			}
-		}
 		/// <summary>
 		/// Called before the <see cref="Window.Title"/> changes. Invokes the <see cref="TitleChanging"/> event, which can be cancelled.
 		/// </summary>

+ 43 - 0
Terminal.Gui/Views/CellActivatedEventArgs.cs

@@ -0,0 +1,43 @@
+using System;
+using System.Data;
+
+namespace Terminal.Gui {
+
+
+	/// <summary>
+	///  Defines the event arguments for <see cref="TableView.CellActivated"/> event
+	/// </summary>
+	public class CellActivatedEventArgs : EventArgs {
+		/// <summary>
+		/// The current table to which the new indexes refer.  May be null e.g. if selection change is the result of clearing the table from the view
+		/// </summary>
+		/// <value></value>
+		public DataTable Table { get; }
+
+
+		/// <summary>
+		/// The column index of the <see cref="Table"/> cell that is being activated
+		/// </summary>
+		/// <value></value>
+		public int Col { get; }
+
+		/// <summary>
+		/// The row index of the <see cref="Table"/> cell that is being activated
+		/// </summary>
+		/// <value></value>
+		public int Row { get; }
+
+		/// <summary>
+		/// Creates a new instance of arguments describing a cell being activated in <see cref="TableView"/>
+		/// </summary>
+		/// <param name="t"></param>
+		/// <param name="col"></param>
+		/// <param name="row"></param>
+		public CellActivatedEventArgs (DataTable t, int col, int row)
+		{
+			Table = t;
+			Col = col;
+			Row = row;
+		}
+	}
+}

+ 32 - 0
Terminal.Gui/Views/ContentsChangedEventArgs.cs

@@ -0,0 +1,32 @@
+// TextView.cs: multi-line text editing
+using System;
+
+namespace Terminal.Gui {
+
+	/// <summary>
+	/// Event arguments for events for when the contents of the TextView change. E.g. the <see cref="TextView.ContentsChanged"/> event.
+	/// </summary>
+	public class ContentsChangedEventArgs : EventArgs {
+		/// <summary>
+		/// Creates a new <see cref="TextView.ContentsChanged"/> instance.
+		/// </summary>
+		/// <param name="currentRow">Contains the row where the change occurred.</param>
+		/// <param name="currentColumn">Contains the column where the change occured.</param>
+		public ContentsChangedEventArgs (int currentRow, int currentColumn)
+		{
+			Row = currentRow;
+			Col = currentColumn;
+		}
+
+		/// <summary>
+		/// 
+		/// Contains the row where the change occurred.
+		/// </summary>
+		public int Row { get; private set; }
+
+		/// <summary>
+		/// Contains the column where the change occurred.
+		/// </summary>
+		public int Col { get; private set; }
+	}
+}

+ 0 - 33
Terminal.Gui/Views/DateField.cs

@@ -421,37 +421,4 @@ namespace Terminal.Gui {
 			DateChanged?.Invoke (this,args);
 		}
 	}
-
-	/// <summary>
-	/// Defines the event arguments for <see cref="DateField.DateChanged"/> and <see cref="TimeField.TimeChanged"/> events.
-	/// </summary>
-	public class DateTimeEventArgs<T> : EventArgs {
-		/// <summary>
-		/// The old <see cref="DateField"/> or <see cref="TimeField"/> value.
-		/// </summary>
-		public T OldValue { get; }
-
-		/// <summary>
-		/// The new <see cref="DateField"/> or <see cref="TimeField"/> value.
-		/// </summary>
-		public T NewValue { get; }
-
-		/// <summary>
-		/// The <see cref="DateField"/> or <see cref="TimeField"/> format.
-		/// </summary>
-		public string Format { get; }
-
-		/// <summary>
-		/// Initializes a new instance of <see cref="DateTimeEventArgs{T}"/>
-		/// </summary>
-		/// <param name="oldValue">The old <see cref="DateField"/> or <see cref="TimeField"/> value.</param>
-		/// <param name="newValue">The new <see cref="DateField"/> or <see cref="TimeField"/> value.</param>
-		/// <param name="format">The <see cref="DateField"/> or <see cref="TimeField"/> format string.</param>
-		public DateTimeEventArgs (T oldValue, T newValue, string format)
-		{
-			OldValue = oldValue;
-			NewValue = newValue;
-			Format = format;
-		}
-	}
 }

+ 43 - 0
Terminal.Gui/Views/DateTimeEventArgs.cs

@@ -0,0 +1,43 @@
+//
+// DateField.cs: text entry for date
+//
+// Author: Barry Nolte
+//
+// Licensed under the MIT license
+//
+using System;
+
+namespace Terminal.Gui {
+	/// <summary>
+	/// Defines the event arguments for <see cref="DateField.DateChanged"/> and <see cref="TimeField.TimeChanged"/> events.
+	/// </summary>
+	public class DateTimeEventArgs<T> : EventArgs {
+		/// <summary>
+		/// The old <see cref="DateField"/> or <see cref="TimeField"/> value.
+		/// </summary>
+		public T OldValue { get; }
+
+		/// <summary>
+		/// The new <see cref="DateField"/> or <see cref="TimeField"/> value.
+		/// </summary>
+		public T NewValue { get; }
+
+		/// <summary>
+		/// The <see cref="DateField"/> or <see cref="TimeField"/> format.
+		/// </summary>
+		public string Format { get; }
+
+		/// <summary>
+		/// Initializes a new instance of <see cref="DateTimeEventArgs{T}"/>
+		/// </summary>
+		/// <param name="oldValue">The old <see cref="DateField"/> or <see cref="TimeField"/> value.</param>
+		/// <param name="newValue">The new <see cref="DateField"/> or <see cref="TimeField"/> value.</param>
+		/// <param name="format">The <see cref="DateField"/> or <see cref="TimeField"/> format string.</param>
+		public DateTimeEventArgs (T oldValue, T newValue, string format)
+		{
+			OldValue = oldValue;
+			NewValue = newValue;
+			Format = format;
+		}
+	}
+}

+ 1 - 59
Terminal.Gui/Views/HexView.cs

@@ -34,7 +34,7 @@ namespace Terminal.Gui {
 	/// to an offset in the stream.
 	/// </para>
 	/// </remarks>
-	public class HexView : View {
+	public partial class HexView : View {
 		SortedDictionary<long, byte> edits = new SortedDictionary<long, byte> ();
 		Stream source;
 		long displayStart, pos;
@@ -631,63 +631,5 @@ namespace Terminal.Gui {
 
 			return base.OnEnter (view);
 		}
-
-		/// <summary>
-		/// Defines the event arguments for <see cref="Edited"/> event.
-		/// </summary>
-		public class HexViewEditEventArgs : EventArgs {
-
-			/// <summary>
-			/// Creates a new instance of the <see cref="HexViewEditEventArgs"/> class.
-			/// </summary>
-			/// <param name="position"></param>
-			/// <param name="newValue"></param>
-			public HexViewEditEventArgs (long position, byte newValue)
-			{
-				Position = position;
-				NewValue = newValue;
-			}
-
-			/// <summary>
-			/// Gets the location of the edit.
-			/// </summary>
-			public long Position { get; }
-
-			/// <summary>
-			/// Gets the new value for that <see cref="Position"/>.
-			/// </summary>
-			public byte NewValue { get; }
-		}
-		/// <summary>
-		/// Defines the event arguments for <see cref="PositionChanged"/> event.
-		/// </summary>
-		public class HexViewEventArgs : EventArgs {
-			/// <summary>
-			/// Gets the current character position starting at one, related to the <see cref="Stream"/>.
-			/// </summary>
-			public long Position { get; private set; }
-			/// <summary>
-			/// Gets the current cursor position starting at one for both, line and column.
-			/// </summary>
-			public Point CursorPosition { get; private set; }
-
-			/// <summary>
-			/// The bytes length per line.
-			/// </summary>
-			public int BytesPerLine { get; private set; }
-
-			/// <summary>
-			/// Initializes a new instance of <see cref="HexViewEventArgs"/>
-			/// </summary>
-			/// <param name="pos">The character position.</param>
-			/// <param name="cursor">The cursor position.</param>
-			/// <param name="lineLength">Line bytes length.</param>
-			public HexViewEventArgs (long pos, Point cursor, int lineLength)
-			{
-				Position = pos;
-				CursorPosition = cursor;
-				BytesPerLine = lineLength;
-			}
-		}
 	}
 }

+ 37 - 0
Terminal.Gui/Views/HexViewEditEventArgs.cs

@@ -0,0 +1,37 @@
+//
+// HexView.cs: A hexadecimal viewer
+//
+// TODO:
+// - Support searching and highlighting of the search result
+// - Bug showing the last line
+// 
+using System;
+
+namespace Terminal.Gui {
+	/// <summary>
+	/// Defines the event arguments for <see cref="HexView.Edited"/> event.
+	/// </summary>
+	public class HexViewEditEventArgs : EventArgs {
+
+		/// <summary>
+		/// Creates a new instance of the <see cref="HexViewEditEventArgs"/> class.
+		/// </summary>
+		/// <param name="position"></param>
+		/// <param name="newValue"></param>
+		public HexViewEditEventArgs (long position, byte newValue)
+		{
+			Position = position;
+			NewValue = newValue;
+		}
+
+		/// <summary>
+		/// Gets the location of the edit.
+		/// </summary>
+		public long Position { get; }
+
+		/// <summary>
+		/// Gets the new value for that <see cref="Position"/>.
+		/// </summary>
+		public byte NewValue { get; }
+	}
+}

+ 43 - 0
Terminal.Gui/Views/HexViewEventArgs.cs

@@ -0,0 +1,43 @@
+//
+// HexView.cs: A hexadecimal viewer
+//
+// TODO:
+// - Support searching and highlighting of the search result
+// - Bug showing the last line
+// 
+using System;
+using System.IO;
+
+namespace Terminal.Gui {
+	/// <summary>
+	/// Defines the event arguments for <see cref="HexView.PositionChanged"/> event.
+	/// </summary>
+	public class HexViewEventArgs : EventArgs {
+		/// <summary>
+		/// Gets the current character position starting at one, related to the <see cref="Stream"/>.
+		/// </summary>
+		public long Position { get; private set; }
+		/// <summary>
+		/// Gets the current cursor position starting at one for both, line and column.
+		/// </summary>
+		public Point CursorPosition { get; private set; }
+
+		/// <summary>
+		/// The bytes length per line.
+		/// </summary>
+		public int BytesPerLine { get; private set; }
+
+		/// <summary>
+		/// Initializes a new instance of <see cref="HexViewEventArgs"/>
+		/// </summary>
+		/// <param name="pos">The character position.</param>
+		/// <param name="cursor">The cursor position.</param>
+		/// <param name="lineLength">Line bytes length.</param>
+		public HexViewEventArgs (long pos, Point cursor, int lineLength)
+		{
+			Position = pos;
+			CursorPosition = cursor;
+			BytesPerLine = lineLength;
+		}
+	}
+}

+ 36 - 0
Terminal.Gui/Views/HistoryTextItem.cs

@@ -0,0 +1,36 @@
+// TextView.cs: multi-line text editing
+using System;
+using System.Collections.Generic;
+using Rune = System.Rune;
+
+namespace Terminal.Gui {
+	partial class HistoryText {
+		public class HistoryTextItem : EventArgs{
+			public List<List<Rune>> Lines;
+			public Point CursorPosition;
+			public LineStatus LineStatus;
+			public bool IsUndoing;
+			public Point FinalCursorPosition;
+			public HistoryTextItem RemovedOnAdded;
+
+			public HistoryTextItem (List<List<Rune>> lines, Point curPos, LineStatus linesStatus)
+			{
+				Lines = lines;
+				CursorPosition = curPos;
+				LineStatus = linesStatus;
+			}
+
+			public HistoryTextItem (HistoryTextItem historyTextItem)
+			{
+				Lines = new List<List<Rune>> (historyTextItem.Lines);
+				CursorPosition = new Point (historyTextItem.CursorPosition.X, historyTextItem.CursorPosition.Y);
+				LineStatus = historyTextItem.LineStatus;
+			}
+
+			public override string ToString ()
+			{
+				return $"(Count: {Lines.Count}, Cursor: {CursorPosition}, Status: {LineStatus})";
+			}
+		}
+	}
+}

+ 0 - 49
Terminal.Gui/Views/ListView.cs

@@ -938,53 +938,4 @@ namespace Terminal.Gui {
 			return -1;
 		}
 	}
-
-	/// <summary>
-	/// <see cref="EventArgs"/> for <see cref="ListView"/> events.
-	/// </summary>
-	public class ListViewItemEventArgs : EventArgs {
-		/// <summary>
-		/// The index of the <see cref="ListView"/> item.
-		/// </summary>
-		public int Item { get; }
-		/// <summary>
-		/// The <see cref="ListView"/> item.
-		/// </summary>
-		public object Value { get; }
-
-		/// <summary>
-		/// Initializes a new instance of <see cref="ListViewItemEventArgs"/>
-		/// </summary>
-		/// <param name="item">The index of the <see cref="ListView"/> item.</param>
-		/// <param name="value">The <see cref="ListView"/> item</param>
-		public ListViewItemEventArgs (int item, object value)
-		{
-			Item = item;
-			Value = value;
-		}
-	}
-
-	/// <summary>
-	/// <see cref="EventArgs"/> used by the <see cref="ListView.RowRender"/> event.
-	/// </summary>
-	public class ListViewRowEventArgs : EventArgs {
-		/// <summary>
-		/// The current row being rendered.
-		/// </summary>
-		public int Row { get; }
-		/// <summary>
-		/// The <see cref="Attribute"/> used by current row or
-		/// null to maintain the current attribute.
-		/// </summary>
-		public Attribute? RowAttribute { get; set; }
-
-		/// <summary>
-		/// Initializes with the current row.
-		/// </summary>
-		/// <param name="row"></param>
-		public ListViewRowEventArgs (int row)
-		{
-			Row = row;
-		}
-	}
 }

+ 28 - 0
Terminal.Gui/Views/ListViewItemEventArgs.cs

@@ -0,0 +1,28 @@
+using System;
+
+namespace Terminal.Gui {
+	/// <summary>
+	/// <see cref="EventArgs"/> for <see cref="ListView"/> events.
+	/// </summary>
+	public class ListViewItemEventArgs : EventArgs {
+		/// <summary>
+		/// The index of the <see cref="ListView"/> item.
+		/// </summary>
+		public int Item { get; }
+		/// <summary>
+		/// The <see cref="ListView"/> item.
+		/// </summary>
+		public object Value { get; }
+
+		/// <summary>
+		/// Initializes a new instance of <see cref="ListViewItemEventArgs"/>
+		/// </summary>
+		/// <param name="item">The index of the <see cref="ListView"/> item.</param>
+		/// <param name="value">The <see cref="ListView"/> item</param>
+		public ListViewItemEventArgs (int item, object value)
+		{
+			Item = item;
+			Value = value;
+		}
+	}
+}

+ 27 - 0
Terminal.Gui/Views/ListViewRowEventArgs.cs

@@ -0,0 +1,27 @@
+using System;
+
+namespace Terminal.Gui {
+	/// <summary>
+	/// <see cref="EventArgs"/> used by the <see cref="ListView.RowRender"/> event.
+	/// </summary>
+	public class ListViewRowEventArgs : EventArgs {
+		/// <summary>
+		/// The current row being rendered.
+		/// </summary>
+		public int Row { get; }
+		/// <summary>
+		/// The <see cref="Attribute"/> used by current row or
+		/// null to maintain the current attribute.
+		/// </summary>
+		public Attribute? RowAttribute { get; set; }
+
+		/// <summary>
+		/// Initializes with the current row.
+		/// </summary>
+		/// <param name="row"></param>
+		public ListViewRowEventArgs (int row)
+		{
+			Row = row;
+		}
+	}
+}

+ 0 - 68
Terminal.Gui/Views/Menu.cs

@@ -2004,72 +2004,4 @@ namespace Terminal.Gui {
 			return base.OnEnter (view);
 		}
 	}
-
-	/// <summary>
-	/// An <see cref="EventArgs"/> which allows passing a cancelable menu opening event or replacing with a new <see cref="MenuBarItem"/>.
-	/// </summary>
-	public class MenuOpeningEventArgs : EventArgs {
-		/// <summary>
-		/// The current <see cref="MenuBarItem"/> parent.
-		/// </summary>
-		public MenuBarItem CurrentMenu { get; }
-
-		/// <summary>
-		/// The new <see cref="MenuBarItem"/> to be replaced.
-		/// </summary>
-		public MenuBarItem NewMenuBarItem { get; set; }
-		/// <summary>
-		/// Flag that allows the cancellation of the event. If set to <see langword="true"/> in the
-		/// event handler, the event will be canceled. 
-		/// </summary>
-		public bool Cancel { get; set; }
-
-		/// <summary>
-		/// Initializes a new instance of <see cref="MenuOpeningEventArgs"/>.
-		/// </summary>
-		/// <param name="currentMenu">The current <see cref="MenuBarItem"/> parent.</param>
-		public MenuOpeningEventArgs (MenuBarItem currentMenu)
-		{
-			CurrentMenu = currentMenu;
-		}
-	}
-
-	/// <summary>
-	/// An <see cref="EventArgs"/> which allows passing a cancelable menu closing event.
-	/// </summary>
-	public class MenuClosingEventArgs : EventArgs {
-		/// <summary>
-		/// The current <see cref="MenuBarItem"/> parent.
-		/// </summary>
-		public MenuBarItem CurrentMenu { get; }
-
-		/// <summary>
-		/// Indicates whether the current menu will reopen.
-		/// </summary>
-		public bool Reopen { get; }
-
-		/// <summary>
-		/// Indicates whether the current menu is a sub-menu.
-		/// </summary>
-		public bool IsSubMenu { get; }
-
-		/// <summary>
-		/// Flag that allows the cancellation of the event. If set to <see langword="true"/> in the
-		/// event handler, the event will be canceled. 
-		/// </summary>
-		public bool Cancel { get; set; }
-
-		/// <summary>
-		/// Initializes a new instance of <see cref="MenuClosingEventArgs"/>.
-		/// </summary>
-		/// <param name="currentMenu">The current <see cref="MenuBarItem"/> parent.</param>
-		/// <param name="reopen">Whether the current menu will reopen.</param>
-		/// <param name="isSubMenu">Indicates whether it is a sub-menu.</param>
-		public MenuClosingEventArgs (MenuBarItem currentMenu, bool reopen, bool isSubMenu)
-		{
-			CurrentMenu = currentMenu;
-			Reopen = reopen;
-			IsSubMenu = isSubMenu;
-		}
-	}
 }

+ 42 - 0
Terminal.Gui/Views/MenuClosingEventArgs.cs

@@ -0,0 +1,42 @@
+using System;
+
+namespace Terminal.Gui {
+	/// <summary>
+	/// An <see cref="EventArgs"/> which allows passing a cancelable menu closing event.
+	/// </summary>
+	public class MenuClosingEventArgs : EventArgs {
+		/// <summary>
+		/// The current <see cref="MenuBarItem"/> parent.
+		/// </summary>
+		public MenuBarItem CurrentMenu { get; }
+
+		/// <summary>
+		/// Indicates whether the current menu will reopen.
+		/// </summary>
+		public bool Reopen { get; }
+
+		/// <summary>
+		/// Indicates whether the current menu is a sub-menu.
+		/// </summary>
+		public bool IsSubMenu { get; }
+
+		/// <summary>
+		/// Flag that allows the cancellation of the event. If set to <see langword="true"/> in the
+		/// event handler, the event will be canceled. 
+		/// </summary>
+		public bool Cancel { get; set; }
+
+		/// <summary>
+		/// Initializes a new instance of <see cref="MenuClosingEventArgs"/>.
+		/// </summary>
+		/// <param name="currentMenu">The current <see cref="MenuBarItem"/> parent.</param>
+		/// <param name="reopen">Whether the current menu will reopen.</param>
+		/// <param name="isSubMenu">Indicates whether it is a sub-menu.</param>
+		public MenuClosingEventArgs (MenuBarItem currentMenu, bool reopen, bool isSubMenu)
+		{
+			CurrentMenu = currentMenu;
+			Reopen = reopen;
+			IsSubMenu = isSubMenu;
+		}
+	}
+}

+ 32 - 0
Terminal.Gui/Views/MenuOpeningEventArgs.cs

@@ -0,0 +1,32 @@
+using System;
+
+namespace Terminal.Gui {
+	/// <summary>
+	/// An <see cref="EventArgs"/> which allows passing a cancelable menu opening event or replacing with a new <see cref="MenuBarItem"/>.
+	/// </summary>
+	public class MenuOpeningEventArgs : EventArgs {
+		/// <summary>
+		/// The current <see cref="MenuBarItem"/> parent.
+		/// </summary>
+		public MenuBarItem CurrentMenu { get; }
+
+		/// <summary>
+		/// The new <see cref="MenuBarItem"/> to be replaced.
+		/// </summary>
+		public MenuBarItem NewMenuBarItem { get; set; }
+		/// <summary>
+		/// Flag that allows the cancellation of the event. If set to <see langword="true"/> in the
+		/// event handler, the event will be canceled. 
+		/// </summary>
+		public bool Cancel { get; set; }
+
+		/// <summary>
+		/// Initializes a new instance of <see cref="MenuOpeningEventArgs"/>.
+		/// </summary>
+		/// <param name="currentMenu">The current <see cref="MenuBarItem"/> parent.</param>
+		public MenuOpeningEventArgs (MenuBarItem currentMenu)
+		{
+			CurrentMenu = currentMenu;
+		}
+	}
+}

+ 0 - 26
Terminal.Gui/Views/RadioGroup.cs

@@ -422,30 +422,4 @@ namespace Terminal.Gui {
 		/// </summary>
 		Horizontal
 	}
-
-	/// <summary>
-	/// Event arguments for the SelectedItemChagned event.
-	/// </summary>
-	public class SelectedItemChangedArgs : EventArgs {
-		/// <summary>
-		/// Gets the index of the item that was previously selected. -1 if there was no previous selection.
-		/// </summary>
-		public int PreviousSelectedItem { get; }
-
-		/// <summary>
-		/// Gets the index of the item that is now selected. -1 if there is no selection.
-		/// </summary>
-		public int SelectedItem { get; }
-
-		/// <summary>
-		/// Initializes a new <see cref="SelectedItemChangedArgs"/> class.
-		/// </summary>
-		/// <param name="selectedItem"></param>
-		/// <param name="previousSelectedItem"></param>
-		public SelectedItemChangedArgs (int selectedItem, int previousSelectedItem)
-		{
-			PreviousSelectedItem = previousSelectedItem;
-			SelectedItem = selectedItem;
-		}
-	}
 }

+ 63 - 0
Terminal.Gui/Views/SelectedCellChangedEventArgs.cs

@@ -0,0 +1,63 @@
+using System;
+using System.Data;
+
+namespace Terminal.Gui {
+
+
+	/// <summary>
+	/// Defines the event arguments for <see cref="TableView.SelectedCellChanged"/> 
+	/// </summary>
+	public class SelectedCellChangedEventArgs : EventArgs {
+		/// <summary>
+		/// The current table to which the new indexes refer.  May be null e.g. if selection change is the result of clearing the table from the view
+		/// </summary>
+		/// <value></value>
+		public DataTable Table { get; }
+
+
+		/// <summary>
+		/// The previous selected column index.  May be invalid e.g. when the selection has been changed as a result of replacing the existing Table with a smaller one
+		/// </summary>
+		/// <value></value>
+		public int OldCol { get; }
+
+
+		/// <summary>
+		/// The newly selected column index.
+		/// </summary>
+		/// <value></value>
+		public int NewCol { get; }
+
+
+		/// <summary>
+		/// The previous selected row index.  May be invalid e.g. when the selection has been changed as a result of deleting rows from the table
+		/// </summary>
+		/// <value></value>
+		public int OldRow { get; }
+
+
+		/// <summary>
+		/// The newly selected row index.
+		/// </summary>
+		/// <value></value>
+		public int NewRow { get; }
+
+		/// <summary>
+		/// Creates a new instance of arguments describing a change in selected cell in a <see cref="TableView"/>
+		/// </summary>
+		/// <param name="t"></param>
+		/// <param name="oldCol"></param>
+		/// <param name="newCol"></param>
+		/// <param name="oldRow"></param>
+		/// <param name="newRow"></param>
+		public SelectedCellChangedEventArgs (DataTable t, int oldCol, int newCol, int oldRow, int newRow)
+		{
+			Table = t;
+			OldCol = oldCol;
+			NewCol = newCol;
+			OldRow = oldRow;
+			NewRow = newRow;
+		}
+	}
+
+}

+ 29 - 0
Terminal.Gui/Views/SelectedItemChangedArgs.cs

@@ -0,0 +1,29 @@
+using System;
+
+namespace Terminal.Gui {
+	/// <summary>
+	/// Event arguments for the SelectedItemChagned event.
+	/// </summary>
+	public class SelectedItemChangedArgs : EventArgs {
+		/// <summary>
+		/// Gets the index of the item that was previously selected. -1 if there was no previous selection.
+		/// </summary>
+		public int PreviousSelectedItem { get; }
+
+		/// <summary>
+		/// Gets the index of the item that is now selected. -1 if there is no selection.
+		/// </summary>
+		public int SelectedItem { get; }
+
+		/// <summary>
+		/// Initializes a new <see cref="SelectedItemChangedArgs"/> class.
+		/// </summary>
+		/// <param name="selectedItem"></param>
+		/// <param name="previousSelectedItem"></param>
+		public SelectedItemChangedArgs (int selectedItem, int previousSelectedItem)
+		{
+			PreviousSelectedItem = previousSelectedItem;
+			SelectedItem = selectedItem;
+		}
+	}
+}

+ 38 - 0
Terminal.Gui/Views/SplitterEventArgs.cs

@@ -0,0 +1,38 @@
+using System;
+
+namespace Terminal.Gui {
+	/// <summary>
+	/// Provides data for <see cref="TileView"/> events.
+	/// </summary>
+	public class SplitterEventArgs : EventArgs {
+
+		/// <summary>
+		/// Creates a new instance of the <see cref="SplitterEventArgs"/> class.
+		/// </summary>
+		/// <param name="tileView"><see cref="TileView"/> in which splitter is being moved.</param>
+		/// <param name="idx">Index of the splitter being moved in <see cref="TileView.SplitterDistances"/>.</param>
+		/// <param name="splitterDistance">The new <see cref="Pos"/> of the splitter line.</param>
+		public SplitterEventArgs (TileView tileView, int idx, Pos splitterDistance)
+		{
+			SplitterDistance = splitterDistance;
+			TileView = tileView;
+			Idx = idx;
+		}
+
+		/// <summary>
+		/// New position of the splitter line (see <see cref="TileView.SplitterDistances"/>).
+		/// </summary>
+		public Pos SplitterDistance { get; }
+
+		/// <summary>
+		/// Container (sender) of the event.
+		/// </summary>
+		public TileView TileView { get; }
+
+		/// <summary>
+		/// Gets the index of the splitter that is being moved. This can be
+		/// used to index <see cref="TileView.SplitterDistances"/>
+		/// </summary>
+		public int Idx { get; }
+	}
+}

+ 31 - 0
Terminal.Gui/Views/TabChangedEventArgs.cs

@@ -0,0 +1,31 @@
+using System;
+
+namespace Terminal.Gui {
+
+	/// <summary>
+	/// Describes a change in <see cref="TabView.SelectedTab"/>
+	/// </summary>
+	public class TabChangedEventArgs : EventArgs {
+
+		/// <summary>
+		/// The previously selected tab. May be null
+		/// </summary>
+		public TabView.Tab OldTab { get; }
+
+		/// <summary>
+		/// The currently selected tab. May be null
+		/// </summary>
+		public TabView.Tab NewTab { get; }
+
+		/// <summary>
+		/// Documents a tab change
+		/// </summary>
+		/// <param name="oldTab"></param>
+		/// <param name="newTab"></param>
+		public TabChangedEventArgs (TabView.Tab oldTab, TabView.Tab newTab)
+		{
+			OldTab = oldTab;
+			NewTab = newTab;
+		}
+	}
+}

+ 36 - 0
Terminal.Gui/Views/TabMouseEventArgs.cs

@@ -0,0 +1,36 @@
+using System;
+
+namespace Terminal.Gui {
+
+	/// <summary>
+	/// Describes a mouse event over a specific <see cref="TabView.Tab"/> in a <see cref="TabView"/>.
+	/// </summary>
+	public class TabMouseEventArgs : EventArgs {
+
+		/// <summary>
+		/// Gets the <see cref="TabView.Tab"/> (if any) that the mouse
+		/// was over when the <see cref="MouseEvent"/> occurred.
+		/// </summary>
+		/// <remarks>This will be null if the click is after last tab
+		/// or before first.</remarks>
+		public TabView.Tab Tab { get; }
+
+		/// <summary>
+		/// Gets the actual mouse event.  Use <see cref="MouseEvent.Handled"/> to cancel this event
+		/// and perform custom behavior (e.g. show a context menu).
+		/// </summary>
+		public MouseEvent MouseEvent { get; }
+
+		/// <summary>
+		/// Creates a new instance of the <see cref="TabMouseEventArgs"/> class.
+		/// </summary>
+		/// <param name="tab"><see cref="TabView.Tab"/> that the mouse was over when the event occurred.</param>
+		/// <param name="mouseEvent">The mouse activity being reported</param>
+		public TabMouseEventArgs (TabView.Tab tab, MouseEvent mouseEvent)
+		{
+			Tab = tab;
+			MouseEvent = mouseEvent;
+		}
+	}
+
+}

+ 1 - 59
Terminal.Gui/Views/TabView.cs

@@ -9,7 +9,7 @@ namespace Terminal.Gui {
 	/// <summary>
 	/// Control that hosts multiple sub views, presenting a single one at once
 	/// </summary>
-	public class TabView : View {
+	public partial class TabView : View {
 		private Tab selectedTab;
 
 		/// <summary>
@@ -771,37 +771,6 @@ namespace Terminal.Gui {
 			TabClicked?.Invoke (this, tabMouseEventArgs);
 		}
 
-		/// <summary>
-		/// Describes a mouse event over a specific <see cref="TabView.Tab"/> in a <see cref="TabView"/>.
-		/// </summary>
-		public class TabMouseEventArgs : EventArgs {
-
-			/// <summary>
-			/// Gets the <see cref="TabView.Tab"/> (if any) that the mouse
-			/// was over when the <see cref="MouseEvent"/> occurred.
-			/// </summary>
-			/// <remarks>This will be null if the click is after last tab
-			/// or before first.</remarks>
-			public Tab Tab { get; }
-
-			/// <summary>
-			/// Gets the actual mouse event.  Use <see cref="MouseEvent.Handled"/> to cancel this event
-			/// and perform custom behavior (e.g. show a context menu).
-			/// </summary>
-			public MouseEvent MouseEvent { get; }
-
-			/// <summary>
-			/// Creates a new instance of the <see cref="TabMouseEventArgs"/> class.
-			/// </summary>
-			/// <param name="tab"><see cref="TabView.Tab"/> that the mouse was over when the event occurred.</param>
-			/// <param name="mouseEvent">The mouse activity being reported</param>
-			public TabMouseEventArgs (Tab tab, MouseEvent mouseEvent)
-			{
-				Tab = tab;
-				MouseEvent = mouseEvent;
-			}
-		}
-
 		/// <summary>
 		/// A single tab in a <see cref="TabView"/>
 		/// </summary>
@@ -867,33 +836,6 @@ namespace Terminal.Gui {
 			public bool TabsOnBottom { get; set; } = false;
 
 		}
-
-		/// <summary>
-		/// Describes a change in <see cref="TabView.SelectedTab"/>
-		/// </summary>
-		public class TabChangedEventArgs : EventArgs {
-
-			/// <summary>
-			/// The previously selected tab. May be null
-			/// </summary>
-			public Tab OldTab { get; }
-
-			/// <summary>
-			/// The currently selected tab. May be null
-			/// </summary>
-			public Tab NewTab { get; }
-
-			/// <summary>
-			/// Documents a tab change
-			/// </summary>
-			/// <param name="oldTab"></param>
-			/// <param name="newTab"></param>
-			public TabChangedEventArgs (Tab oldTab, Tab newTab)
-			{
-				OldTab = oldTab;
-				NewTab = newTab;
-			}
-		}
 		#endregion
 	}
 }

+ 1 - 94
Terminal.Gui/Views/TableView.cs

@@ -13,44 +13,7 @@ namespace Terminal.Gui {
 	/// 
 	/// <a href="https://gui-cs.github.io/Terminal.Gui/articles/tableview.html">See TableView Deep Dive for more information</a>.
 	/// </summary>
-	public class TableView : View {
-
-		/// <summary>
-		///  Defines the event arguments for <see cref="TableView.CellActivated"/> event
-		/// </summary>
-		public class CellActivatedEventArgs : EventArgs {
-			/// <summary>
-			/// The current table to which the new indexes refer.  May be null e.g. if selection change is the result of clearing the table from the view
-			/// </summary>
-			/// <value></value>
-			public DataTable Table { get; }
-
-
-			/// <summary>
-			/// The column index of the <see cref="Table"/> cell that is being activated
-			/// </summary>
-			/// <value></value>
-			public int Col { get; }
-
-			/// <summary>
-			/// The row index of the <see cref="Table"/> cell that is being activated
-			/// </summary>
-			/// <value></value>
-			public int Row { get; }
-
-			/// <summary>
-			/// Creates a new instance of arguments describing a cell being activated in <see cref="TableView"/>
-			/// </summary>
-			/// <param name="t"></param>
-			/// <param name="col"></param>
-			/// <param name="row"></param>
-			public CellActivatedEventArgs (DataTable t, int col, int row)
-			{
-				Table = t;
-				Col = col;
-				Row = row;
-			}
-		}
+	public partial class TableView : View {
 
 		private int columnOffset;
 		private int rowOffset;
@@ -2001,62 +1964,6 @@ namespace Terminal.Gui {
 			}
 		}
 
-		/// <summary>
-		/// Defines the event arguments for <see cref="TableView.SelectedCellChanged"/> 
-		/// </summary>
-		public class SelectedCellChangedEventArgs : EventArgs {
-			/// <summary>
-			/// The current table to which the new indexes refer.  May be null e.g. if selection change is the result of clearing the table from the view
-			/// </summary>
-			/// <value></value>
-			public DataTable Table { get; }
-
-
-			/// <summary>
-			/// The previous selected column index.  May be invalid e.g. when the selection has been changed as a result of replacing the existing Table with a smaller one
-			/// </summary>
-			/// <value></value>
-			public int OldCol { get; }
-
-
-			/// <summary>
-			/// The newly selected column index.
-			/// </summary>
-			/// <value></value>
-			public int NewCol { get; }
-
-
-			/// <summary>
-			/// The previous selected row index.  May be invalid e.g. when the selection has been changed as a result of deleting rows from the table
-			/// </summary>
-			/// <value></value>
-			public int OldRow { get; }
-
-
-			/// <summary>
-			/// The newly selected row index.
-			/// </summary>
-			/// <value></value>
-			public int NewRow { get; }
-
-			/// <summary>
-			/// Creates a new instance of arguments describing a change in selected cell in a <see cref="TableView"/>
-			/// </summary>
-			/// <param name="t"></param>
-			/// <param name="oldCol"></param>
-			/// <param name="newCol"></param>
-			/// <param name="oldRow"></param>
-			/// <param name="newRow"></param>
-			public SelectedCellChangedEventArgs (DataTable t, int oldCol, int newCol, int oldRow, int newRow)
-			{
-				Table = t;
-				OldCol = oldCol;
-				NewCol = newCol;
-				OldRow = oldRow;
-				NewRow = newRow;
-			}
-		}
-
 		/// <summary>
 		/// Describes a selected region of the table
 		/// </summary>

+ 31 - 0
Terminal.Gui/Views/TextChangedEventArgs.cs

@@ -0,0 +1,31 @@
+//
+// TextField.cs: single-line text editor with Emacs keybindings
+//
+// Authors:
+//   Miguel de Icaza ([email protected])
+//
+
+using System;
+using NStack;
+
+namespace Terminal.Gui {
+	/// <summary>
+	/// Event args for the <see cref="TextField.TextChanged"/> event
+	/// </summary>
+	public class TextChangedEventArgs : EventArgs {
+
+		/// <summary>
+		/// Creates a new instance of the <see cref="TextChangedEventArgs"/> class
+		/// </summary>
+		/// <param name="oldValue"></param>
+		public TextChangedEventArgs (ustring oldValue)
+		{
+			OldValue = oldValue;
+		}
+
+		/// <summary>
+		/// The old value before the text changed
+		/// </summary>
+		public ustring OldValue { get; }
+	}
+}

+ 34 - 0
Terminal.Gui/Views/TextChangingEventArgs.cs

@@ -0,0 +1,34 @@
+//
+// TextField.cs: single-line text editor with Emacs keybindings
+//
+// Authors:
+//   Miguel de Icaza ([email protected])
+//
+
+using System;
+using NStack;
+
+namespace Terminal.Gui {
+	/// <summary>
+	/// An <see cref="EventArgs"/> which allows passing a cancelable new text value event.
+	/// </summary>
+	public class TextChangingEventArgs : EventArgs {
+		/// <summary>
+		/// The new text to be replaced.
+		/// </summary>
+		public ustring NewText { get; set; }
+		/// <summary>
+		/// Flag which allows to cancel the new text value.
+		/// </summary>
+		public bool Cancel { get; set; }
+
+		/// <summary>
+		/// Initializes a new instance of <see cref="TextChangingEventArgs"/>
+		/// </summary>
+		/// <param name="newText">The new <see cref="TextField.Text"/> to be replaced.</param>
+		public TextChangingEventArgs (ustring newText)
+		{
+			NewText = newText;
+		}
+	}
+}

+ 0 - 42
Terminal.Gui/Views/TextField.cs

@@ -1308,48 +1308,6 @@ namespace Terminal.Gui {
 			historyText.Clear (Text);
 		}
 	}
-
-	/// <summary>
-	/// An <see cref="EventArgs"/> which allows passing a cancelable new text value event.
-	/// </summary>
-	public class TextChangingEventArgs : EventArgs {
-		/// <summary>
-		/// The new text to be replaced.
-		/// </summary>
-		public ustring NewText { get; set; }
-		/// <summary>
-		/// Flag which allows to cancel the new text value.
-		/// </summary>
-		public bool Cancel { get; set; }
-
-		/// <summary>
-		/// Initializes a new instance of <see cref="TextChangingEventArgs"/>
-		/// </summary>
-		/// <param name="newText">The new <see cref="TextField.Text"/> to be replaced.</param>
-		public TextChangingEventArgs (ustring newText)
-		{
-			NewText = newText;
-		}
-	}
-	/// <summary>
-	/// Event args for the <see cref="TextField.TextChanged"/> event
-	/// </summary>
-	public class TextChangedEventArgs : EventArgs {
-
-		/// <summary>
-		/// Creates a new instance of the <see cref="TextChangedEventArgs"/> class
-		/// </summary>
-		/// <param name="oldValue"></param>
-		public TextChangedEventArgs (ustring oldValue)
-		{
-			OldValue = oldValue;
-		}
-
-		/// <summary>
-		/// The old value before the text changed
-		/// </summary>
-		public ustring OldValue { get; }
-	}
 	/// <summary>
 	/// Renders an overlay on another view at a given point that allows selecting
 	/// from a range of 'autocomplete' options.

+ 2 - 57
Terminal.Gui/Views/TextView.cs

@@ -515,7 +515,7 @@ namespace Terminal.Gui {
 		}
 	}
 
-	class HistoryText {
+	partial class HistoryText {
 		public enum LineStatus {
 			Original,
 			Replaced,
@@ -523,34 +523,6 @@ namespace Terminal.Gui {
 			Added
 		}
 
-		public class HistoryTextItem : EventArgs{
-			public List<List<Rune>> Lines;
-			public Point CursorPosition;
-			public LineStatus LineStatus;
-			public bool IsUndoing;
-			public Point FinalCursorPosition;
-			public HistoryTextItem RemovedOnAdded;
-
-			public HistoryTextItem (List<List<Rune>> lines, Point curPos, LineStatus linesStatus)
-			{
-				Lines = lines;
-				CursorPosition = curPos;
-				LineStatus = linesStatus;
-			}
-
-			public HistoryTextItem (HistoryTextItem historyTextItem)
-			{
-				Lines = new List<List<Rune>> (historyTextItem.Lines);
-				CursorPosition = new Point (historyTextItem.CursorPosition.X, historyTextItem.CursorPosition.Y);
-				LineStatus = historyTextItem.LineStatus;
-			}
-
-			public override string ToString ()
-			{
-				return $"(Count: {Lines.Count}, Cursor: {CursorPosition}, Status: {LineStatus})";
-			}
-		}
-
 		List<HistoryTextItem> historyTextItems = new List<HistoryTextItem> ();
 		int idxHistoryText = -1;
 		ustring originalText;
@@ -1129,7 +1101,7 @@ namespace Terminal.Gui {
 	///   </item>
 	///  </list>
 	/// </remarks>
-	public class TextView : View {
+	public partial class TextView : View {
 		TextModel model = new TextModel ();
 		int topRow;
 		int leftColumn;
@@ -2709,33 +2681,6 @@ namespace Terminal.Gui {
 			OnUnwrappedCursorPosition ();
 		}
 
-		/// <summary>
-		/// Event arguments for events for when the contents of the TextView change. E.g. the <see cref="ContentsChanged"/> event.
-		/// </summary>
-		public class ContentsChangedEventArgs : EventArgs {
-			/// <summary>
-			/// Creates a new <see cref="ContentsChanged"/> instance.
-			/// </summary>
-			/// <param name="currentRow">Contains the row where the change occurred.</param>
-			/// <param name="currentColumn">Contains the column where the change occured.</param>
-			public ContentsChangedEventArgs (int currentRow, int currentColumn)
-			{
-				Row = currentRow;
-				Col = currentColumn;
-			}
-
-			/// <summary>
-			/// 
-			/// Contains the row where the change occurred.
-			/// </summary>
-			public int Row { get; private set; }
-
-			/// <summary>
-			/// Contains the column where the change occurred.
-			/// </summary>
-			public int Col { get; private set; }
-		}
-
 		/// <summary>
 		/// Called when the contents of the TextView change. E.g. when the user types text or deletes text. Raises
 		/// the <see cref="ContentsChanged"/> event.

+ 2 - 68
Terminal.Gui/Views/TileView.cs

@@ -10,7 +10,7 @@ namespace Terminal.Gui {
 	/// A <see cref="View"/> consisting of a moveable bar that divides
 	/// the display area into resizeable <see cref="Tiles"/>.
 	/// </summary>
-	public class TileView : View {
+	public partial class TileView : View {
 		TileView parentTileView;
 
 		/// <summary>
@@ -24,7 +24,7 @@ namespace Terminal.Gui {
 		/// new instances use <see cref="TileView.RebuildForTileCount(int)"/> 
 		/// or <see cref="TileView.InsertTile(int)"/>.
 		/// </summary>
-		public class Tile {
+		public partial class Tile {
 			/// <summary>
 			/// The <see cref="ContentView"/> that is contained in this <see cref="TileView"/>.
 			/// Add new child views to this member for multiple 
@@ -61,37 +61,6 @@ namespace Terminal.Gui {
 
 			private string _title = string.Empty;
 
-			/// <summary>
-			/// An <see cref="EventArgs"/> which allows passing a cancelable new <see cref="Title"/> value event.
-			/// </summary>
-			public class TitleEventArgs : EventArgs {
-				/// <summary>
-				/// The new Window Title.
-				/// </summary>
-				public ustring NewTitle { get; set; }
-
-				/// <summary>
-				/// The old Window Title.
-				/// </summary>
-				public ustring OldTitle { get; set; }
-
-				/// <summary>
-				/// Flag which allows cancelling the Title change.
-				/// </summary>
-				public bool Cancel { get; set; }
-
-				/// <summary>
-				/// Initializes a new instance of <see cref="TitleEventArgs"/>
-				/// </summary>
-				/// <param name="oldTitle">The <see cref="Title"/> that is/has been replaced.</param>
-				/// <param name="newTitle">The new <see cref="Title"/> to be replaced.</param>
-				public TitleEventArgs (ustring oldTitle, ustring newTitle)
-				{
-					OldTitle = oldTitle;
-					NewTitle = newTitle;
-				}
-			}
-
 			/// <summary>
 			/// Called before the <see cref="Title"/> changes. Invokes the <see cref="TitleChanging"/> event, which can be cancelled.
 			/// </summary>
@@ -1107,41 +1076,6 @@ namespace Terminal.Gui {
 
 	}
 
-	/// <summary>
-	/// Provides data for <see cref="TileView"/> events.
-	/// </summary>
-	public class SplitterEventArgs : EventArgs {
-
-		/// <summary>
-		/// Creates a new instance of the <see cref="SplitterEventArgs"/> class.
-		/// </summary>
-		/// <param name="tileView"><see cref="TileView"/> in which splitter is being moved.</param>
-		/// <param name="idx">Index of the splitter being moved in <see cref="TileView.SplitterDistances"/>.</param>
-		/// <param name="splitterDistance">The new <see cref="Pos"/> of the splitter line.</param>
-		public SplitterEventArgs (TileView tileView, int idx, Pos splitterDistance)
-		{
-			SplitterDistance = splitterDistance;
-			TileView = tileView;
-			Idx = idx;
-		}
-
-		/// <summary>
-		/// New position of the splitter line (see <see cref="TileView.SplitterDistances"/>).
-		/// </summary>
-		public Pos SplitterDistance { get; }
-
-		/// <summary>
-		/// Container (sender) of the event.
-		/// </summary>
-		public TileView TileView { get; }
-
-		/// <summary>
-		/// Gets the index of the splitter that is being moved. This can be
-		/// used to index <see cref="TileView.SplitterDistances"/>
-		/// </summary>
-		public int Idx { get; }
-	}
-
 	/// <summary>
 	/// Represents a method that will handle splitter events.
 	/// </summary>

+ 42 - 0
Terminal.Gui/Views/TitleEventArgs.cs

@@ -0,0 +1,42 @@
+using NStack;
+using System;
+
+namespace Terminal.Gui {
+
+	public partial class TileView {
+
+		public partial class Tile {
+			/// <summary>
+			/// An <see cref="EventArgs"/> which allows passing a cancelable new <see cref="Title"/> value event.
+			/// </summary>
+			public class TitleEventArgs : EventArgs {
+				/// <summary>
+				/// The new Window Title.
+				/// </summary>
+				public ustring NewTitle { get; set; }
+
+				/// <summary>
+				/// The old Window Title.
+				/// </summary>
+				public ustring OldTitle { get; set; }
+
+				/// <summary>
+				/// Flag which allows cancelling the Title change.
+				/// </summary>
+				public bool Cancel { get; set; }
+
+				/// <summary>
+				/// Initializes a new instance of <see cref="TitleEventArgs"/>
+				/// </summary>
+				/// <param name="oldTitle">The <see cref="Title"/> that is/has been replaced.</param>
+				/// <param name="newTitle">The new <see cref="Title"/> to be replaced.</param>
+				public TitleEventArgs (ustring oldTitle, ustring newTitle)
+				{
+					OldTitle = oldTitle;
+					NewTitle = newTitle;
+				}
+			}
+		}
+
+	}
+}

+ 38 - 0
Terminal.Gui/Windows/StepChangeEventArgs.cs

@@ -0,0 +1,38 @@
+using System;
+
+namespace Terminal.Gui {
+
+	public partial class Wizard {
+		/// <summary>
+		/// <see cref="EventArgs"/> for <see cref="WizardStep"/> events.
+		/// </summary>
+		public class StepChangeEventArgs : EventArgs {
+			/// <summary>
+			/// The current (or previous) <see cref="WizardStep"/>.
+			/// </summary>
+			public WizardStep OldStep { get; }
+
+			/// <summary>
+			/// The <see cref="WizardStep"/> the <see cref="Wizard"/> is changing to or has changed to.
+			/// </summary>
+			public WizardStep NewStep { get; }
+
+			/// <summary>
+			/// Event handlers can set to true before returning to cancel the step transition.
+			/// </summary>
+			public bool Cancel { get; set; }
+
+			/// <summary>
+			/// Initializes a new instance of <see cref="StepChangeEventArgs"/>
+			/// </summary>
+			/// <param name="oldStep">The current <see cref="WizardStep"/>.</param>
+			/// <param name="newStep">The new <see cref="WizardStep"/>.</param>
+			public StepChangeEventArgs (WizardStep oldStep, WizardStep newStep)
+			{
+				OldStep = oldStep;
+				NewStep = newStep;
+				Cancel = false;
+			}
+		}
+	}
+}

+ 1 - 51
Terminal.Gui/Windows/Wizard.cs

@@ -54,7 +54,7 @@ namespace Terminal.Gui {
 	/// Application.Shutdown ();
 	/// </code>
 	/// </example>
-	public class Wizard : Dialog {
+	public partial class Wizard : Dialog {
 		/// <summary>
 		/// Represents a basic step that is displayed in a <see cref="Wizard"/>. The <see cref="WizardStep"/> view is divided horizontally in two. On the left is the
 		/// content view where <see cref="View"/>s can be added,  On the right is the help for the step.
@@ -615,24 +615,6 @@ namespace Terminal.Gui {
 		}
 		private ustring wizardTitle = ustring.Empty;
 
-		/// <summary>	
-		/// <see cref="EventArgs"/> for <see cref="WizardStep"/> transition events.
-		/// </summary>
-		public class WizardButtonEventArgs : EventArgs {
-			/// <summary>
-			/// Set to true to cancel the transition to the next step.
-			/// </summary>
-			public bool Cancel { get; set; }
-
-			/// <summary>
-			/// Initializes a new instance of <see cref="WizardButtonEventArgs"/>
-			/// </summary>
-			public WizardButtonEventArgs ()
-			{
-				Cancel = false;
-			}
-		}
-
 		/// <summary>
 		/// Raised when the Back button in the <see cref="Wizard"/> is clicked. The Back button is always
 		/// the first button in the array of Buttons passed to the <see cref="Wizard"/> constructor, if any.
@@ -663,38 +645,6 @@ namespace Terminal.Gui {
 		/// </summary>
 		public event EventHandler<WizardButtonEventArgs> Cancelled;
 
-		/// <summary>
-		/// <see cref="EventArgs"/> for <see cref="WizardStep"/> events.
-		/// </summary>
-		public class StepChangeEventArgs : EventArgs {
-			/// <summary>
-			/// The current (or previous) <see cref="WizardStep"/>.
-			/// </summary>
-			public WizardStep OldStep { get; }
-
-			/// <summary>
-			/// The <see cref="WizardStep"/> the <see cref="Wizard"/> is changing to or has changed to.
-			/// </summary>
-			public WizardStep NewStep { get; }
-
-			/// <summary>
-			/// Event handlers can set to true before returning to cancel the step transition.
-			/// </summary>
-			public bool Cancel { get; set; }
-
-			/// <summary>
-			/// Initializes a new instance of <see cref="StepChangeEventArgs"/>
-			/// </summary>
-			/// <param name="oldStep">The current <see cref="WizardStep"/>.</param>
-			/// <param name="newStep">The new <see cref="WizardStep"/>.</param>
-			public StepChangeEventArgs (WizardStep oldStep, WizardStep newStep)
-			{
-				OldStep = oldStep;
-				NewStep = newStep;
-				Cancel = false;
-			}
-		}
-
 		/// <summary>
 		/// This event is raised when the current <see cref="CurrentStep"/>) is about to change. Use <see cref="StepChangeEventArgs.Cancel"/> 
 		/// to abort the transition.

+ 24 - 0
Terminal.Gui/Windows/WizardButtonEventArgs.cs

@@ -0,0 +1,24 @@
+using System;
+
+namespace Terminal.Gui {
+
+	public partial class Wizard {
+		/// <summary>	
+		/// <see cref="EventArgs"/> for <see cref="WizardStep"/> transition events.
+		/// </summary>
+		public class WizardButtonEventArgs : EventArgs {
+			/// <summary>
+			/// Set to true to cancel the transition to the next step.
+			/// </summary>
+			public bool Cancel { get; set; }
+
+			/// <summary>
+			/// Initializes a new instance of <see cref="WizardButtonEventArgs"/>
+			/// </summary>
+			public WizardButtonEventArgs ()
+			{
+				Cancel = false;
+			}
+		}
+	}
+}

+ 3 - 3
UICatalog/Scenarios/CsvEditor.cs

@@ -114,7 +114,7 @@ namespace UICatalog.Scenarios {
 			}
 		}
 
-		private void OnSelectedCellChanged (object sender, TableView.SelectedCellChangedEventArgs e)
+		private void OnSelectedCellChanged (object sender, SelectedCellChangedEventArgs e)
 		{
 			// only update the text box if the user is not manually editing it
 			if (!selectedCellLabel.HasFocus)
@@ -472,7 +472,7 @@ namespace UICatalog.Scenarios {
 
 		}
 
-		private void TableViewKeyPress (object sender, View.KeyEventEventArgs e)
+		private void TableViewKeyPress (object sender, KeyEventEventArgs e)
 		{
 			if (e.KeyEvent.Key == Key.DeleteChar) {
 
@@ -540,7 +540,7 @@ namespace UICatalog.Scenarios {
 			enteredText = okPressed ? tf.Text.ToString () : null;
 			return okPressed;
 		}
-		private void EditCurrentCell (object sender, TableView.CellActivatedEventArgs e)
+		private void EditCurrentCell (object sender, CellActivatedEventArgs e)
 		{
 			if (e.Table == null)
 				return;

+ 2 - 2
UICatalog/Scenarios/HexEditor.cs

@@ -64,7 +64,7 @@ namespace UICatalog.Scenarios {
 			Application.Top.Add (statusBar);
 		}
 
-		private void _hexView_PositionChanged (object sender, HexView.HexViewEventArgs obj)
+		private void _hexView_PositionChanged (object sender, HexViewEventArgs obj)
 		{
 			siPositionChanged.Title = $"Position: {obj.Position} Line: {obj.CursorPosition.Y} Col: {obj.CursorPosition.X} Line length: {obj.BytesPerLine}";
 			statusBar.SetNeedsDisplay ();
@@ -75,7 +75,7 @@ namespace UICatalog.Scenarios {
 			_hexView.AllowEdits = (bool)(miAllowEdits.Checked = !miAllowEdits.Checked);
 		}
 
-		private void _hexView_Edited (object sender, HexView.HexViewEditEventArgs e)
+		private void _hexView_Edited (object sender, HexViewEditEventArgs e)
 		{
 			_saved = false;
 		}

+ 1 - 1
UICatalog/Scenarios/InteractiveTree.cs

@@ -49,7 +49,7 @@ namespace UICatalog.Scenarios {
 
 		}
 
-		private void TreeView_KeyPress (object sender, View.KeyEventEventArgs obj)
+		private void TreeView_KeyPress (object sender, KeyEventEventArgs obj)
 		{
 			if (obj.KeyEvent.Key == Key.DeleteChar) {
 

+ 1 - 1
UICatalog/Scenarios/MultiColouredTable.cs

@@ -98,7 +98,7 @@ namespace UICatalog.Scenarios {
 			enteredText = okPressed ? tf.Text.ToString () : null;
 			return okPressed;
 		}
-		private void EditCurrentCell (object sender, TableView.CellActivatedEventArgs e)
+		private void EditCurrentCell (object sender, CellActivatedEventArgs e)
 		{
 			if (e.Table == null)
 				return;

+ 2 - 2
UICatalog/Scenarios/Notepad.cs

@@ -74,12 +74,12 @@ namespace UICatalog.Scenarios {
 			New ();
 		}
 
-		private void TabView_SelectedTabChanged (object sender, TabView.TabChangedEventArgs e)
+		private void TabView_SelectedTabChanged (object sender, TabChangedEventArgs e)
 		{
 			lenStatusItem.Title = $"Len:{e.NewTab?.View?.Text?.Length ?? 0}";
 		}
 
-		private void TabView_TabClicked (object sender, TabView.TabMouseEventArgs e)
+		private void TabView_TabClicked (object sender, TabMouseEventArgs e)
 		{
 			// we are only interested in right clicks
 			if(!e.MouseEvent.Flags.HasFlag(MouseFlags.Button3Clicked)) {

+ 2 - 2
UICatalog/Scenarios/TableEditor.cs

@@ -345,7 +345,7 @@ namespace UICatalog.Scenarios {
 
 		}
 
-		private void TableViewKeyPress (object sender, View.KeyEventEventArgs e)
+		private void TableViewKeyPress (object sender, KeyEventEventArgs e)
 		{
 			if (e.KeyEvent.Key == Key.DeleteChar) {
 
@@ -748,7 +748,7 @@ namespace UICatalog.Scenarios {
 			tableView.Table = BuildSimpleDataTable (big ? 30 : 5, big ? 1000 : 5);
 		}
 
-		private void EditCurrentCell (object sender, TableView.CellActivatedEventArgs e)
+		private void EditCurrentCell (object sender, CellActivatedEventArgs e)
 		{
 			if (e.Table == null)
 				return;

+ 1 - 1
UICatalog/Scenarios/TreeViewFileSystem.cs

@@ -106,7 +106,7 @@ namespace UICatalog.Scenarios {
 			ShowPropertiesOf (e.NewValue);
 		}
 
-		private void TreeViewFiles_KeyPress (object sender, View.KeyEventEventArgs obj)
+		private void TreeViewFiles_KeyPress (object sender, KeyEventEventArgs obj)
 		{
 			if (obj.KeyEvent.Key == (Key.R | Key.CtrlMask)) {
 

+ 2 - 2
UICatalog/Scenarios/VkeyPacketSimulator.cs

@@ -122,7 +122,7 @@ namespace UICatalog.Scenarios {
 				}
 			};
 
-			View.KeyEventEventArgs unknownChar = null;
+			KeyEventEventArgs unknownChar = null;
 
 			tvInput.KeyPress += (s, e) => {
 				if (e.KeyEvent.Key == (Key.Q | Key.CtrlMask)) {
@@ -229,7 +229,7 @@ namespace UICatalog.Scenarios {
 			};
 		}
 
-		private void AddKeyboardStrokes (View.KeyEventEventArgs e)
+		private void AddKeyboardStrokes (KeyEventEventArgs e)
 		{
 			var ke = e.KeyEvent;
 			var km = new KeyModifiers ();

+ 1 - 1
UICatalog/UICatalog.cs

@@ -651,7 +651,7 @@ namespace UICatalog {
 				Application.Top.SetNeedsDisplay ();
 			}
 
-			void KeyDownHandler (object sender, View.KeyEventEventArgs a)
+			void KeyDownHandler (object sender, KeyEventEventArgs a)
 			{
 				if (a.KeyEvent.IsCapslock) {
 					Capslock.Title = "Caps: On";

+ 1 - 1
UnitTests/Application/ApplicationTests.cs

@@ -582,7 +582,7 @@ namespace Terminal.Gui.ApplicationTests {
 
 			int keyUps = 0;
 			var output = string.Empty;
-			Application.Top.KeyUp += (object sender, View.KeyEventEventArgs args) => {
+			Application.Top.KeyUp += (object sender, KeyEventEventArgs args) => {
 				if (args.KeyEvent.Key != (Key.CtrlMask | Key.Q)) {
 					output += (char)args.KeyEvent.KeyValue;
 				}

+ 2 - 2
UnitTests/Configuration/ConfigurationMangerTests.cs

@@ -775,7 +775,7 @@ namespace Terminal.Gui.ConfigurationTests {
 
 			ConfigurationManager.Updated += ConfigurationManager_Updated;
 			bool fired = false;
-			void ConfigurationManager_Updated (object sender, ConfigurationManager.ConfigurationManagerEventArgs obj)
+			void ConfigurationManager_Updated (object sender, ConfigurationManagerEventArgs obj)
 			{
 				fired = true;
 				// assert
@@ -801,7 +801,7 @@ namespace Terminal.Gui.ConfigurationTests {
 			ConfigurationManager.Reset ();
 			ConfigurationManager.Applied += ConfigurationManager_Applied;
 			bool fired = false;
-			void ConfigurationManager_Applied (object sender, ConfigurationManager.ConfigurationManagerEventArgs obj)
+			void ConfigurationManager_Applied (object sender, ConfigurationManagerEventArgs obj)
 			{
 				fired = true;
 				// assert

+ 3 - 3
UnitTests/Core/ViewTests.cs

@@ -1539,7 +1539,7 @@ namespace Terminal.Gui.CoreTests {
 			var tf = new TextField ();
 			tf.KeyPress += Tf_KeyPress;
 
-			void Tf_KeyPress (object sender, View.KeyEventEventArgs obj)
+			void Tf_KeyPress (object sender, KeyEventEventArgs obj)
 			{
 				if (obj.KeyEvent.Key == (Key.Q | Key.CtrlMask)) {
 					obj.Handled = tfQuiting = true;
@@ -1551,7 +1551,7 @@ namespace Terminal.Gui.CoreTests {
 			var top = Application.Top;
 			top.KeyPress += Top_KeyPress;
 
-			void Top_KeyPress (object sender, View.KeyEventEventArgs obj)
+			void Top_KeyPress (object sender, KeyEventEventArgs obj)
 			{
 				if (obj.KeyEvent.Key == (Key.Q | Key.CtrlMask)) {
 					obj.Handled = topQuiting = true;
@@ -1599,7 +1599,7 @@ namespace Terminal.Gui.CoreTests {
 			var tf = new TextField ();
 			tf.KeyPress += Tf_KeyPress;
 
-			void Tf_KeyPress (object sender, View.KeyEventEventArgs obj)
+			void Tf_KeyPress (object sender, KeyEventEventArgs obj)
 			{
 				if (obj.KeyEvent.Key == (Key.Q | Key.CtrlMask)) {
 					obj.Handled = tfQuiting = true;

+ 1 - 1
UnitTests/UICatalog/ScenarioTests.cs

@@ -121,7 +121,7 @@ namespace UICatalog.Tests {
 			};
 			var token = Application.MainLoop.AddTimeout (TimeSpan.FromMilliseconds (ms), abortCallback);
 
-			Application.Top.KeyPress += (object sender, View.KeyEventEventArgs args) => {
+			Application.Top.KeyPress += (object sender, KeyEventEventArgs args) => {
 				Assert.Equal (Key.CtrlMask | Key.Q, args.KeyEvent.Key);
 			};
 

+ 1 - 1
UnitTests/Views/HexViewTests.cs

@@ -254,7 +254,7 @@ namespace Terminal.Gui.ViewTests {
 		public void PositionChanged_Event ()
 		{
 			var hv = new HexView (LoadStream ()) { Width = Dim.Fill (), Height = Dim.Fill () };
-			HexView.HexViewEventArgs hexViewEventArgs = null;
+			HexViewEventArgs hexViewEventArgs = null;
 			hv.PositionChanged += (s, e) => hexViewEventArgs = e;
 			Application.Top.Add (hv);
 			Application.Begin (Application.Top);