Browse Source

Fixes #1883. Toplevel now propogates Loaded & Ready events to child Toplevel views.

Tig Kindel 3 years ago
parent
commit
11491b3f79

+ 82 - 55
Terminal.Gui/Core/Toplevel.cs

@@ -1,23 +1,18 @@
-//
-// Toplevel.cs: Toplevel views can be modally executed
-//
-// Authors:
-//   Miguel de Icaza ([email protected])
-//
-using System;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Linq;
 
 namespace Terminal.Gui {
 	/// <summary>
-	/// Toplevel views can be modally executed.
+	/// Toplevel views can be modally executed. They are used for both an application's main view (filling the entire screeN and
+	/// for pop-up views such as <see cref="Dialog"/>, <see cref="MessageBox"/>, and <see cref="Wizard"/>.
 	/// </summary>
 	/// <remarks>
 	///   <para>
 	///     Toplevels can be modally executing views, started by calling <see cref="Application.Run(Toplevel, Func{Exception, bool})"/>. 
 	///     They return control to the caller when <see cref="Application.RequestStop(Toplevel)"/> has 
-	///     been called (which sets the <see cref="Toplevel.Running"/> property to false). 
+	///     been called (which sets the <see cref="Toplevel.Running"/> property to <c>false</c>). 
 	///   </para>
 	///   <para>
 	///     A Toplevel is created when an application initializes Terminal.Gui by calling <see cref="Application.Init(ConsoleDriver, IMainLoopDriver)"/>.
@@ -49,66 +44,72 @@ namespace Terminal.Gui {
 		public bool Running { get; set; }
 
 		/// <summary>
-		/// Fired once the Toplevel's <see cref="Application.RunState"/> has begin loaded.
-		/// A Loaded event handler is a good place to finalize initialization before calling `<see cref="Application.RunLoop(Application.RunState, bool)"/>.
+		/// Invoked when the Toplevel <see cref="Application.RunState"/> has begin loaded.
+		/// A Loaded event handler is a good place to finalize initialization before calling 
+		/// <see cref="Application.RunLoop(Application.RunState, bool)"/>.
 		/// </summary>
 		public event Action Loaded;
 
 		/// <summary>
-		/// Fired once the Toplevel's <see cref="MainLoop"/> has started it's first iteration.
+		/// Invoked when the Toplevel <see cref="MainLoop"/> has started it's first iteration.
 		/// Subscribe to this event to perform tasks when the <see cref="Toplevel"/> has been laid out and focus has been set.
-		/// changes. A Ready event handler is a good place to finalize initialization after calling `<see cref="Application.Run(Func{Exception, bool})"/>(topLevel)`.
+		/// changes. 
+		/// <para>A Ready event handler is a good place to finalize initialization after calling 
+		/// <see cref="Application.Run(Func{Exception, bool})"/> on this Toplevel.</para>
 		/// </summary>
 		public event Action Ready;
 
 		/// <summary>
-		/// Fired once the Toplevel's <see cref="Application.RunState"/> has begin unloaded.
-		/// A Unloaded event handler is a good place to disposing after calling `<see cref="Application.End(Application.RunState)"/>.
+		/// Invoked when the Toplevel <see cref="Application.RunState"/> has been unloaded.
+		/// A Unloaded event handler is a good place to dispose objects after calling <see cref="Application.End(Application.RunState)"/>.
 		/// </summary>
 		public event Action Unloaded;
 
 		/// <summary>
-		/// Invoked once the Toplevel's <see cref="Application.RunState"/> becomes the <see cref="Application.Current"/>.
+		/// Invoked when the Toplevel <see cref="Application.RunState"/> becomes the <see cref="Application.Current"/> Toplevel.
 		/// </summary>
 		public event Action<Toplevel> Activate;
 
 		/// <summary>
-		/// Invoked once the Toplevel's <see cref="Application.RunState"/> ceases to be the <see cref="Application.Current"/>.
+		/// Invoked when the Toplevel<see cref="Application.RunState"/> ceases to be the <see cref="Application.Current"/> Toplevel.
 		/// </summary>
 		public event Action<Toplevel> Deactivate;
 
 		/// <summary>
-		/// Invoked once the child Toplevel's <see cref="Application.RunState"/> is closed from the <see cref="Application.End(View)"/>
+		/// Invoked when a child of the Toplevel <see cref="Application.RunState"/> is closed by  
+		/// <see cref="Application.End(View)"/>.
 		/// </summary>
 		public event Action<Toplevel> ChildClosed;
 
 		/// <summary>
-		/// Invoked once the last child Toplevel's <see cref="Application.RunState"/> is closed from the <see cref="Application.End(View)"/>
+		/// Invoked when the last child of the Toplevel <see cref="Application.RunState"/> is closed from 
+		/// by <see cref="Application.End(View)"/>.
 		/// </summary>
 		public event Action AllChildClosed;
 
 		/// <summary>
-		/// Invoked once the Toplevel's <see cref="Application.RunState"/> is being closing from the <see cref="Application.RequestStop(Toplevel)"/>
+		/// Invoked when the Toplevel's <see cref="Application.RunState"/> is being closed by  
+		/// <see cref="Application.RequestStop(Toplevel)"/>.
 		/// </summary>
 		public event Action<ToplevelClosingEventArgs> Closing;
 
 		/// <summary>
-		/// Invoked once the Toplevel's <see cref="Application.RunState"/> is closed from the <see cref="Application.End(View)"/>
+		/// Invoked when the Toplevel's <see cref="Application.RunState"/> is closed by <see cref="Application.End(View)"/>.
 		/// </summary>
 		public event Action<Toplevel> Closed;
 
 		/// <summary>
-		/// Invoked once the child Toplevel's <see cref="Application.RunState"/> has begin loaded.
+		/// Invoked when a child Toplevel's <see cref="Application.RunState"/> has been loaded.
 		/// </summary>
 		public event Action<Toplevel> ChildLoaded;
 
 		/// <summary>
-		/// Invoked once the child Toplevel's <see cref="Application.RunState"/> has begin unloaded.
+		/// Invoked when a cjhild Toplevel's <see cref="Application.RunState"/> has been unloaded.
 		/// </summary>
 		public event Action<Toplevel> ChildUnloaded;
 
 		/// <summary>
-		/// Invoked when the terminal was resized. The new <see cref="Size"/> of the terminal is provided.
+		/// Invoked when the terminal has been resized. The new <see cref="Size"/> of the terminal is provided.
 		/// </summary>
 		public event Action<Size> Resized;
 
@@ -162,18 +163,25 @@ namespace Terminal.Gui {
 		}
 
 		/// <summary>
-		/// Called from <see cref="Application.Begin(Toplevel)"/> before the <see cref="Toplevel"/> is redraws for the first time.
+		/// Called from <see cref="Application.Begin(Toplevel)"/> before the <see cref="Toplevel"/> redraws for the first time. 
 		/// </summary>
 		virtual public void OnLoaded ()
 		{
+			foreach (Toplevel tl in Subviews.Where (v => v is Toplevel)) {
+				tl.OnLoaded ();
+			}
 			Loaded?.Invoke ();
 		}
 
 		/// <summary>
-		/// Called from <see cref="Application.RunLoop"/> after the <see cref="Toplevel"/> has entered it's first iteration of the loop.
+		/// Called from <see cref="Application.RunLoop"/> after the <see cref="Toplevel"/> has entered the 
+		/// first iteration of the loop.
 		/// </summary>
 		internal virtual void OnReady ()
 		{
+			foreach (Toplevel tl in Subviews.Where (v => v is Toplevel)) {
+				tl.OnReady ();
+			}
 			Ready?.Invoke ();
 		}
 
@@ -182,11 +190,14 @@ namespace Terminal.Gui {
 		/// </summary>
 		internal virtual void OnUnloaded ()
 		{
+			foreach (Toplevel tl in Subviews.Where (v => v is Toplevel)) {
+				tl.OnUnloaded ();
+			}
 			Unloaded?.Invoke ();
 		}
 
 		/// <summary>
-		/// Initializes a new instance of the <see cref="Toplevel"/> class with the specified absolute layout.
+		/// Initializes a new instance of the <see cref="Toplevel"/> class with the specified <see cref="LayoutStyle.Absolute"/> layout.
 		/// </summary>
 		/// <param name="frame">A superview-relative rectangle specifying the location and size for the new Toplevel</param>
 		public Toplevel (Rect frame) : base (frame)
@@ -195,7 +206,8 @@ namespace Terminal.Gui {
 		}
 
 		/// <summary>
-		/// Initializes a new instance of the <see cref="Toplevel"/> class with <see cref="LayoutStyle.Computed"/> layout, defaulting to full screen.
+		/// Initializes a new instance of the <see cref="Toplevel"/> class with <see cref="LayoutStyle.Computed"/> layout, 
+		/// defaulting to full screen.
 		/// </summary>
 		public Toplevel () : base ()
 		{
@@ -291,7 +303,7 @@ namespace Terminal.Gui {
 		/// <summary>
 		/// Convenience factory method that creates a new Toplevel with the current terminal dimensions.
 		/// </summary>
-		/// <returns>The create.</returns>
+		/// <returns>The created Toplevel.</returns>
 		public static Toplevel Create ()
 		{
 			return new Toplevel (new Rect (0, 0, Driver.Cols, Driver.Rows));
@@ -306,19 +318,38 @@ namespace Terminal.Gui {
 		}
 
 		/// <summary>
-		/// Determines whether the <see cref="Toplevel"/> is modal or not.
-		/// Causes <see cref="ProcessKey(KeyEvent)"/> to propagate keys upwards
-		/// by default unless set to <see langword="true"/>.
+		/// Determines whether the <see cref="Toplevel"/> is modal or not. 
+		/// If set to <c>false</c> (the default):
+		/// 
+		/// <list type="bullet">
+		///   <item>
+		///		<description><see cref="ProcessKey(KeyEvent)"/> events will propagate keys upwards.</description>
+		///   </item>
+		///   <item>
+		///		<description>The Toplevel will act as an embedded view (not a modal/pop-up).</description>
+		///   </item>
+		/// </list>
+		///
+		/// If set to <c>true</c>:
+		/// 
+		/// <list type="bullet">
+		///   <item>
+		///		<description><see cref="ProcessKey(KeyEvent)"/> events will NOT propogate keys upwards.</description>
+		///	  </item>
+		///   <item>
+		///		<description>The Toplevel will and look like a modal (pop-up) (e.g. see <see cref="Dialog"/>.</description>
+		///   </item>
+		/// </list>
 		/// </summary>
 		public bool Modal { get; set; }
 
 		/// <summary>
-		/// Gets or sets the menu for this Toplevel
+		/// Gets or sets the menu for this Toplevel.
 		/// </summary>
 		public virtual MenuBar MenuBar { get; set; }
 
 		/// <summary>
-		/// Gets or sets the status bar for this Toplevel
+		/// Gets or sets the status bar for this Toplevel.
 		/// </summary>
 		public virtual StatusBar StatusBar { get; set; }
 
@@ -647,7 +678,7 @@ namespace Terminal.Gui {
 		}
 
 		/// <summary>
-		/// Virtual method which allow to be overridden to implement specific positions for inherited <see cref="Toplevel"/>.
+		/// Virtual method enabling implementation of specific positions for inherited <see cref="Toplevel"/> views.
 		/// </summary>
 		/// <param name="top">The toplevel.</param>
 		public virtual void PositionToplevel (Toplevel top)
@@ -734,20 +765,12 @@ namespace Terminal.Gui {
 			return false;
 		}
 
-		//
-		// FIXED:It does not look like the event is raised on clicked-drag
-		// need to figure that out.
-		//
 		internal static Point? dragPosition;
 		Point start;
 
 		///<inheritdoc/>
 		public override bool MouseEvent (MouseEvent mouseEvent)
 		{
-			// FIXED:The code is currently disabled, because the
-			// Driver.UncookMouse does not seem to have an effect if there is
-			// a pending mouse event activated.
-
 			if (!CanFocus) {
 				return true;
 			}
@@ -800,7 +823,6 @@ namespace Terminal.Gui {
 					}
 					//System.Diagnostics.Debug.WriteLine ($"nx:{nx},ny:{ny}");
 
-					// FIXED: optimize, only SetNeedsDisplay on the before/after regions.
 					SetNeedsDisplay ();
 					return true;
 				}
@@ -817,8 +839,8 @@ namespace Terminal.Gui {
 		}
 
 		/// <summary>
-		/// Invoked by <see cref="Application.Begin"/> as part of the <see cref="Application.Run(Toplevel, Func{Exception, bool})"/> after
-		/// the views have been laid out, and before the views are drawn for the first time.
+		/// Invoked by <see cref="Application.Begin"/> as part of  <see cref="Application.Run(Toplevel, Func{Exception, bool})"/> 
+		/// after the views have been laid out, and before the views are drawn for the first time.
 		/// </summary>
 		public virtual void WillPresent ()
 		{
@@ -842,7 +864,8 @@ namespace Terminal.Gui {
 		}
 
 		/// <summary>
-		/// Stops running this <see cref="Toplevel"/>.
+		/// Stops and closes this <see cref="Toplevel"/>. If this Toplevel is the top-most Toplevel, 
+		/// <see cref="Application.RequestStop(Toplevel)"/> will be called, causing the application to exit.
 		/// </summary>
 		public virtual void RequestStop ()
 		{
@@ -880,7 +903,8 @@ namespace Terminal.Gui {
 		}
 
 		/// <summary>
-		/// Stops running the <paramref name="top"/> <see cref="Toplevel"/>.
+		/// Stops and closes the <see cref="Toplevel"/> specified by <paramref name="top"/>. If <paramref name="top"/> is the top-most Toplevel, 
+		/// <see cref="Application.RequestStop(Toplevel)"/> will be called, causing the application to exit.
 		/// </summary>
 		/// <param name="top">The toplevel to request stop.</param>
 		public virtual void RequestStop (Toplevel top)
@@ -908,7 +932,7 @@ namespace Terminal.Gui {
 		}
 
 		/// <summary>
-		/// Gets the current visible toplevel Mdi child that match the arguments pattern.
+		/// Gets the current visible Toplevel Mdi child that matches the arguments pattern.
 		/// </summary>
 		/// <param name="type">The type.</param>
 		/// <param name="exclude">The strings to exclude.</param>
@@ -933,10 +957,10 @@ namespace Terminal.Gui {
 		}
 
 		/// <summary>
-		/// Shows the Mdi child indicated by the <paramref name="top"/> setting as <see cref="Application.Current"/>.
+		/// Shows the Mdi child indicated by <paramref name="top"/>, setting it as <see cref="Application.Current"/>.
 		/// </summary>
-		/// <param name="top">The toplevel.</param>
-		/// <returns><see langword="true"/> if the toplevel can be showed.<see langword="false"/> otherwise.</returns>
+		/// <param name="top">The Toplevel.</param>
+		/// <returns><c>true</c> if the toplevel can be shown or <c>false</c> if not.</returns>
 		public virtual bool ShowChild (Toplevel top = null)
 		{
 			if (Application.MdiTop != null) {
@@ -947,7 +971,8 @@ namespace Terminal.Gui {
 	}
 
 	/// <summary>
-	/// Implements the <see cref="IEqualityComparer{T}"/> to comparing two <see cref="Toplevel"/> used by <see cref="StackExtensions"/>.
+	/// Implements the <see cref="IEqualityComparer{T}"/> for comparing two <see cref="Toplevel"/>s
+	/// used by <see cref="StackExtensions"/>.
 	/// </summary>
 	public class ToplevelEqualityComparer : IEqualityComparer<Toplevel> {
 		/// <summary>Determines whether the specified objects are equal.</summary>
@@ -970,7 +995,8 @@ namespace Terminal.Gui {
 		/// <summary>Returns a hash code for the specified object.</summary>
 		/// <param name="obj">The <see cref="Toplevel" /> for which a hash code is to be returned.</param>
 		/// <returns>A hash code for the specified object.</returns>
-		/// <exception cref="ArgumentNullException">The type of <paramref name="obj" /> is a reference type and <paramref name="obj" /> is <see langword="null" />.</exception>
+		/// <exception cref="ArgumentNullException">The type of <paramref name="obj" /> 
+		/// is a reference type and <paramref name="obj" /> is <see langword="null" />.</exception>
 		public int GetHashCode (Toplevel obj)
 		{
 			if (obj == null)
@@ -985,7 +1011,8 @@ namespace Terminal.Gui {
 	}
 
 	/// <summary>
-	/// Implements the <see cref="IComparer{T}"/> to sort the <see cref="Toplevel"/> from the <see cref="Application.MdiChildes"/> if needed.
+	/// Implements the <see cref="IComparer{T}"/> to sort the <see cref="Toplevel"/> 
+	/// from the <see cref="Application.MdiChildes"/> if needed.
 	/// </summary>
 	public sealed class ToplevelComparer : IComparer<Toplevel> {
 		/// <summary>Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.</summary>

+ 40 - 28
Terminal.Gui/Windows/Wizard.cs

@@ -13,16 +13,9 @@ namespace Terminal.Gui {
 	/// <remarks>
 	/// The Wizard can be displayed either as a modal (pop-up) <see cref="Window"/> (like <see cref="Dialog"/>) or as an embedded <see cref="View"/>. 
 	/// 
-	/// By default, <see cref="Modal"/> is true; launch the Wizard using `Application.Run(wizard)`. 
-	/// 
-	/// Set <see cref="Modal"/> to `false` to use Wizard as an embedded View, and add the Wizard to a containing view with <see cref="View.Add(View)"/>.
-	/// 
-	/// When used as a modal pop-up window, the Esc key will cause the <see cref="Cancelled"/> event to fire and (if the event is not cancelled),
-	/// will cause <see cref="Application.RequestStop(Toplevel)"/> to be called, closing the Wizard.
-	/// 
-	/// When used as an embedded View, no frame is drawn around the Wizard. To detect if the user wants to cancel
-	/// the Wizard, subscrie to the <see cref="Cancelled"/> event.
+	/// By default, <see cref="Wizard.Modal"/> is <c>true</c>. In this case launch the Wizard with <c>Application.Run(wizard)</c>. 
 	/// 
+	/// See <see cref="Wizard.Modal"/> for more details.
 	/// </remarks>
 	public class Wizard : Dialog {
 
@@ -47,7 +40,7 @@ namespace Terminal.Gui {
 			/// <summary>
 			/// The title of the <see cref="WizardStep"/>. 
 			/// </summary>
-			/// <remarks>The Title is only displayed when the <see cref="Wizard"/> is used as a modal pop-up.</remarks>
+			/// <remarks>The Title is only displayed when the <see cref="Wizard"/> is used as a modal pop-up (see <see cref="Wizard.Modal"/>.</remarks>
 			public new ustring Title {
 				get => title;
 				set {
@@ -99,7 +92,7 @@ namespace Terminal.Gui {
 			/// </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>
-			/// <returns>`true` if an event handler cancelled the Title change.</returns>
+			/// <returns><c>true</c> if an event handler cancelled the Title change.</returns>
 			public virtual bool OnTitleChanging (ustring oldTitle, ustring newTitle)
 			{
 				var args = new TitleEventArgs (oldTitle, newTitle);
@@ -109,7 +102,7 @@ namespace Terminal.Gui {
 
 			/// <summary>
 			/// Event fired when the <see cref="Title"/> is changing. Set <see cref="TitleEventArgs.Cancel"/> to 
-			/// `true` to cancel the Title change.
+			/// <c>true</c> to cancel the Title change.
 			/// </summary>
 			public event Action<TitleEventArgs> TitleChanging;
 
@@ -395,14 +388,19 @@ namespace Terminal.Gui {
 			}
 		}
 
-		///<inheritdoc/>
+		/// <summary>
+		/// <see cref="Wizard"/> is derived from <see cref="Dialog"/> and Dialog causes <c>Esc</c> to call
+		/// <see cref="Application.RequestStop(Toplevel)"/>, closing the Dialog. Wizard overrides <see cref="Responder.ProcessKey(KeyEvent)"/>
+		/// to instead fire the <see cref="Cancelled"/> event when Wizard is being used as a non-modal (see <see cref="Wizard.Modal"/>.
+		/// See <see cref="Responder.ProcessKey(KeyEvent)"/> for more.
+		/// </summary>
+		/// <param name="kb"></param>
+		/// <returns></returns>
 		public override bool ProcessKey (KeyEvent kb)
 		{
 			if (!Modal) {
 				switch (kb.Key) {
 				case Key.Esc:
-					// Dialog causes ESC to RequestStop; we dont want that with a non-modal wizard
-					// Instead, we fire the Cancelled event.
 					var args = new WizardButtonEventArgs ();
 					Cancelled?.Invoke (args);
 					return false;
@@ -425,9 +423,9 @@ namespace Terminal.Gui {
 
 		/// <summary>
 		/// Returns the next enabled <see cref="WizardStep"/> after the current step. Takes into account steps which
-		/// are disabled. If <see cref="CurrentStep"/> is `null` returns the first enabled step.
+		/// are disabled. If <see cref="CurrentStep"/> is <c>null</c> returns the first enabled step.
 		/// </summary>
-		/// <returns>The next step after the current step, if there is one; otherwise returns `null`, which 
+		/// <returns>The next step after the current step, if there is one; otherwise returns <c>null</c>, which 
 		/// indicates either there are no enabled steps or the current step is the last enabled step.</returns>
 		public WizardStep GetNextStep ()
 		{
@@ -476,9 +474,9 @@ namespace Terminal.Gui {
 
 		/// <summary>
 		/// Returns the first enabled <see cref="WizardStep"/> before the current step. Takes into account steps which
-		/// are disabled. If <see cref="CurrentStep"/> is `null` returns the last enabled step.
+		/// are disabled. If <see cref="CurrentStep"/> is <c>null</c> returns the last enabled step.
 		/// </summary>
-		/// <returns>The first step ahead of the current step, if there is one; otherwise returns `null`, which 
+		/// <returns>The first step ahead of the current step, if there is one; otherwise returns <c>null</c>, which 
 		/// indicates either there are no enabled steps or the current step is the first enabled step.</returns>
 		public WizardStep GetPreviousStep ()
 		{
@@ -567,7 +565,9 @@ namespace Terminal.Gui {
 		/// <summary>
 		/// The title of the Wizard, shown at the top of the Wizard with " - currentStep.Title" appended.
 		/// </summary>
-		/// <remarks>The Title is only displayed when the <see cref="Wizard"/> is used as a modal pop-up.</remarks>
+		/// <remarks>
+		/// The Title is only displayed when the <see cref="Wizard"/> <see cref="Wizard.Modal"/> is set to <c>false</c>.
+		/// </remarks>
 		public new ustring Title {
 			get {
 				// The base (Dialog) Title holds the full title ("Wizard Title - Step Title")
@@ -599,13 +599,13 @@ namespace Terminal.Gui {
 		}
 
 		/// <summary>
-		/// This event is raised when the Back button in the <see cref="Wizard"/> is clicked. The Back button is always
+		/// 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.
 		/// </summary>
 		public event Action<WizardButtonEventArgs> MovingBack;
 
 		/// <summary>
-		/// This event is raised when the Next/Finish button in the <see cref="Wizard"/> is clicked (or the user presses Enter). 
+		/// Raised when the Next/Finish button in the <see cref="Wizard"/> is clicked (or the user presses Enter). 
 		/// The Next/Finish button is always the last button in the array of Buttons passed to the <see cref="Wizard"/> constructor, 
 		/// if any. This event is only raised if the <see cref="CurrentStep"/> is the last Step in the Wizard flow 
 		/// (otherwise the <see cref="Finished"/> event is raised).
@@ -613,7 +613,7 @@ namespace Terminal.Gui {
 		public event Action<WizardButtonEventArgs> MovingNext;
 
 		/// <summary>
-		/// This event is raised when the Next/Finish button in the <see cref="Wizard"/> is clicked. The Next/Finish button is always
+		/// Raised when the Next/Finish button in the <see cref="Wizard"/> is clicked. The Next/Finish button is always
 		/// the last button in the array of Buttons passed to the <see cref="Wizard"/> constructor, if any. This event is only
 		/// raised if the <see cref="CurrentStep"/> is the last Step in the Wizard flow 
 		/// (otherwise the <see cref="Finished"/> event is raised).
@@ -621,9 +621,10 @@ namespace Terminal.Gui {
 		public event Action<WizardButtonEventArgs> Finished;
 
 		/// <summary>
-		/// This event is raised when the user has cancelled the <see cref="Wizard"/> by pressin the Esc key. 
-		/// To prevent a <see cref="Modal"/> Wizard from
-		/// closing, cancel the event by setting <see cref="WizardButtonEventArgs.Cancel"/> to `true` before returning from the event handler.
+		/// Raised when the user has cancelled the <see cref="Wizard"/> by pressin the Esc key. 
+		/// To prevent a modal (<see cref="Wizard.Modal"/> is <c>true</c>) Wizard from
+		/// closing, cancel the event by setting <see cref="WizardButtonEventArgs.Cancel"/> to 
+		/// <c>true</c> before returning from the event handler.
 		/// </summary>
 		public event Action<WizardButtonEventArgs> Cancelled;
 
@@ -786,11 +787,22 @@ namespace Terminal.Gui {
 		/// <summary>
 		/// Determines whether the <see cref="Wizard"/> is displayed as modal pop-up or not.
 		/// 
-		/// The default is `true`. The Wizard will be shown with a frame with <see cref="Title"/> and will behave like
+		/// The default is <c>true</c>. The Wizard will be shown with a frame with <see cref="Title"/> and will behave like
 		/// any <see cref="Toplevel"/> window.
 		/// 
-		/// If set to `false` the Wizard will have no frame and will behave like any embedded <see cref="View"/>.
+		/// If set to <c>false</c> the Wizard will have no frame and will behave like any embedded <see cref="View"/>.
+		/// 
+		/// To use Wizard as an embedded View 
+		/// <list type="number">
+		/// <item><description>Set <see cref="Modal"/> to <c>false</c>.</description></item>
+		/// <item><description>Add the Wizard to a containing view with <see cref="View.Add(View)"/>.</description></item>
+		/// </list>
 		/// 
+		/// If a non-Modal Wizard is added to the application after <see cref="Application.Run(Func{Exception, bool})"/> has been called
+		/// the first step must be explicitly set by setting <see cref="CurrentStep"/> to <see cref="GetNextStep()"/>:
+		/// <code>
+		///    wizard.CurrentStep = wizard.GetNextStep();
+		/// </code>
 		/// </summary>
 		public new bool Modal {
 			get => base.Modal;

+ 0 - 4
UICatalog/Scenarios/WizardAsView.cs

@@ -93,10 +93,6 @@ namespace UICatalog.Scenarios {
 			wizard.AddStep (lastStep);
 			lastStep.HelpText = "The wizard is complete!\n\nPress the Finish button to continue.\n\nPressing Esc will cancel.";
 
-			// When run as a modal, Wizard gets a Loading event where it sets the
-			// Current Step. But when running non-modal it must be done manually.
-			wizard.CurrentStep = wizard.GetNextStep ();
-
 			Top.Add (wizard);
 			Application.Run (Top);
 		}

+ 3 - 28
UICatalog/Scenarios/Wizards.cs

@@ -94,17 +94,9 @@ namespace UICatalog.Scenarios {
 			};
 			Win.Add (actionLabel);
 
-			var modalCheckBox = new CheckBox ("Modal (pop-up)") {
-				X = Pos.Center (),
-				Y = Pos.Bottom (frame) + 2,
-				AutoSize = true,
-				Checked = true
-			};
-			Win.Add (modalCheckBox);
-
 			var showWizardButton = new Button ("Show Wizard") {
 				X = Pos.Center (),
-				Y = Pos.Bottom (modalCheckBox) + 1,
+				Y = Pos.Bottom (frame) + 2,
 				IsDefault = true,
 			};
 
@@ -234,7 +226,7 @@ namespace UICatalog.Scenarios {
 					var hideHelpBtn = new Button () {
 						Text = "Press me to show/hide help",
 						X = Pos.Center (),
-						Y = Pos.AnchorEnd(1)
+						Y = Pos.AnchorEnd (1)
 					};
 					hideHelpBtn.Clicked += () => {
 						if (fourthStep.HelpText.Length > 0) {
@@ -291,24 +283,7 @@ namespace UICatalog.Scenarios {
 						finalFinalStep.Enabled = finalFinalStepEnabledCeckBox.Checked;
 					};
 
-					if (modalCheckBox.Checked) {
-						Application.Run (wizard);
-					} else {
-						// Disable the Show button so this only happens once
-						showWizardButton.Visible = false;
-						// To use Wizard as a View, you must set Modal = false
-						wizard.Modal = false;
-
-						// When run as a modal, Wizard gets a Loading event where it sets the
-						// Current Step. But when running non-modal it must be done manually.
-						wizard.CurrentStep = wizard.GetNextStep ();
-
-						Win.Add (wizard);
-						
-						// Ensure the wizard has focus
-						wizard.SetFocus ();
-						
-					}
+					Application.Run (wizard);
 
 				} catch (FormatException) {
 					actionLabel.Text = "Invalid Options";

+ 2 - 2
docs/api/Terminal.Gui/Terminal.Gui.FileDialog.html

@@ -1089,8 +1089,8 @@ Gets or sets the prompt label for the <a class="xref" href="Terminal.Gui.Button.
   <a id="Terminal_Gui_FileDialog_WillPresent_" data-uid="Terminal.Gui.FileDialog.WillPresent*"></a>
   <h4 id="Terminal_Gui_FileDialog_WillPresent" data-uid="Terminal.Gui.FileDialog.WillPresent">WillPresent()</h4>
   <div class="markdown level1 summary">
-Invoked by <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_">Begin(Toplevel)</a> as part of the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_Terminal_Gui_Toplevel_System_Func_System_Exception_System_Boolean__">Run(Toplevel, Func&lt;Exception, Boolean&gt;)</a> after
-the views have been laid out, and before the views are drawn for the first time.
+Invoked by <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_">Begin(Toplevel)</a> as part of  <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_Terminal_Gui_Toplevel_System_Func_System_Exception_System_Boolean__">Run(Toplevel, Func&lt;Exception, Boolean&gt;)</a> 
+after the views have been laid out, and before the views are drawn for the first time.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>

+ 50 - 35
docs/api/Terminal.Gui/Terminal.Gui.Toplevel.html

@@ -84,7 +84,8 @@
   <h1 id="Terminal_Gui_Toplevel" data-uid="Terminal.Gui.Toplevel" class="text-break">Class Toplevel
   </h1>
   <div class="markdown level0 summary">
-Toplevel views can be modally executed.
+Toplevel views can be modally executed. They are used for both an application&apos;s main view (filling the entire screeN and
+for pop-up views such as <a class="xref" href="Terminal.Gui.Dialog.html">Dialog</a>, <a class="xref" href="Terminal.Gui.MessageBox.html">MessageBox</a>, and <a class="xref" href="Terminal.Gui.Wizard.html">Wizard</a>.
 </div>
   <div class="markdown level0 conceptual"></div>
   <div class="inheritance">
@@ -503,7 +504,7 @@ Toplevel views can be modally executed.
 <p>
   Toplevels can be modally executing views, started by calling <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_Terminal_Gui_Toplevel_System_Func_System_Exception_System_Boolean__">Run(Toplevel, Func&lt;Exception, Boolean&gt;)</a>. 
   They return control to the caller when <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RequestStop_Terminal_Gui_Toplevel_">RequestStop(Toplevel)</a> has 
-  been called (which sets the <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_Running">Running</a> property to false). 
+  been called (which sets the <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_Running">Running</a> property to <code>false</code>). 
 </p>
 <p>
   A Toplevel is created when an application initializes Terminal.Gui by calling <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Init_Terminal_Gui_ConsoleDriver_Terminal_Gui_IMainLoopDriver_">Init(ConsoleDriver, IMainLoopDriver)</a>.
@@ -530,7 +531,8 @@ instead of on every run.
   <a id="Terminal_Gui_Toplevel__ctor_" data-uid="Terminal.Gui.Toplevel.#ctor*"></a>
   <h4 id="Terminal_Gui_Toplevel__ctor" data-uid="Terminal.Gui.Toplevel.#ctor">Toplevel()</h4>
   <div class="markdown level1 summary">
-Initializes a new instance of the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> class with <a class="xref" href="Terminal.Gui.LayoutStyle.html#Terminal_Gui_LayoutStyle_Computed">Computed</a> layout, defaulting to full screen.
+Initializes a new instance of the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> class with <a class="xref" href="Terminal.Gui.LayoutStyle.html#Terminal_Gui_LayoutStyle_Computed">Computed</a> layout, 
+defaulting to full screen.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -540,7 +542,7 @@ Initializes a new instance of the <a class="xref" href="Terminal.Gui.Toplevel.ht
   <a id="Terminal_Gui_Toplevel__ctor_" data-uid="Terminal.Gui.Toplevel.#ctor*"></a>
   <h4 id="Terminal_Gui_Toplevel__ctor_Terminal_Gui_Rect_" data-uid="Terminal.Gui.Toplevel.#ctor(Terminal.Gui.Rect)">Toplevel(Rect)</h4>
   <div class="markdown level1 summary">
-Initializes a new instance of the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> class with the specified absolute layout.
+Initializes a new instance of the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> class with the specified <a class="xref" href="Terminal.Gui.LayoutStyle.html#Terminal_Gui_LayoutStyle_Absolute">Absolute</a> layout.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -646,7 +648,7 @@ Gets or sets if this Toplevel is a Mdi container.
   <a id="Terminal_Gui_Toplevel_MenuBar_" data-uid="Terminal.Gui.Toplevel.MenuBar*"></a>
   <h4 id="Terminal_Gui_Toplevel_MenuBar" data-uid="Terminal.Gui.Toplevel.MenuBar">MenuBar</h4>
   <div class="markdown level1 summary">
-Gets or sets the menu for this Toplevel
+Gets or sets the menu for this Toplevel.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -671,9 +673,14 @@ Gets or sets the menu for this Toplevel
   <a id="Terminal_Gui_Toplevel_Modal_" data-uid="Terminal.Gui.Toplevel.Modal*"></a>
   <h4 id="Terminal_Gui_Toplevel_Modal" data-uid="Terminal.Gui.Toplevel.Modal">Modal</h4>
   <div class="markdown level1 summary">
-Determines whether the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> is modal or not.
-Causes <a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_ProcessKey_Terminal_Gui_KeyEvent_">ProcessKey(KeyEvent)</a> to propagate keys upwards
-by default unless set to <span class="xref">true</span>.
+Determines whether the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> is modal or not. 
+If set to <code>false</code> (the default):
+
+<ul><li><a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_ProcessKey_Terminal_Gui_KeyEvent_">ProcessKey(KeyEvent)</a> events will propagate keys upwards.</li><li>The Toplevel will act as an embedded view (not a modal/pop-up).</li></ul>
+
+If set to <code>true</code>:
+
+<ul><li><a class="xref" href="Terminal.Gui.Toplevel.html#Terminal_Gui_Toplevel_ProcessKey_Terminal_Gui_KeyEvent_">ProcessKey(KeyEvent)</a> events will NOT propogate keys upwards.</li><li>The Toplevel will and look like a modal (pop-up) (e.g. see <a class="xref" href="Terminal.Gui.Dialog.html">Dialog</a>.</li></ul>
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -727,7 +734,7 @@ Setting this property directly is discouraged. Use <a class="xref" href="Termina
   <a id="Terminal_Gui_Toplevel_StatusBar_" data-uid="Terminal.Gui.Toplevel.StatusBar*"></a>
   <h4 id="Terminal_Gui_Toplevel_StatusBar" data-uid="Terminal.Gui.Toplevel.StatusBar">StatusBar</h4>
   <div class="markdown level1 summary">
-Gets or sets the status bar for this Toplevel
+Gets or sets the status bar for this Toplevel.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -805,14 +812,14 @@ Convenience factory method that creates a new Toplevel with the current terminal
     <tbody>
       <tr>
         <td><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></td>
-        <td>The create.</td>
+        <td>The created Toplevel.</td>
       </tr>
     </tbody>
   </table>
   <a id="Terminal_Gui_Toplevel_GetTopMdiChild_" data-uid="Terminal.Gui.Toplevel.GetTopMdiChild*"></a>
   <h4 id="Terminal_Gui_Toplevel_GetTopMdiChild_System_Type_System_String___" data-uid="Terminal.Gui.Toplevel.GetTopMdiChild(System.Type,System.String[])">GetTopMdiChild(Type, String[])</h4>
   <div class="markdown level1 summary">
-Gets the current visible toplevel Mdi child that match the arguments pattern.
+Gets the current visible Toplevel Mdi child that matches the arguments pattern.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -1065,7 +1072,7 @@ Method invoked when a key is released.
   <a id="Terminal_Gui_Toplevel_OnLoaded_" data-uid="Terminal.Gui.Toplevel.OnLoaded*"></a>
   <h4 id="Terminal_Gui_Toplevel_OnLoaded" data-uid="Terminal.Gui.Toplevel.OnLoaded">OnLoaded()</h4>
   <div class="markdown level1 summary">
-Called from <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_">Begin(Toplevel)</a> before the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> is redraws for the first time.
+Called from <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_">Begin(Toplevel)</a> before the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> redraws for the first time. 
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -1114,7 +1121,7 @@ Positions the cursor in the right position based on the currently focused view i
   <a id="Terminal_Gui_Toplevel_PositionToplevel_" data-uid="Terminal.Gui.Toplevel.PositionToplevel*"></a>
   <h4 id="Terminal_Gui_Toplevel_PositionToplevel_Terminal_Gui_Toplevel_" data-uid="Terminal.Gui.Toplevel.PositionToplevel(Terminal.Gui.Toplevel)">PositionToplevel(Toplevel)</h4>
   <div class="markdown level1 summary">
-Virtual method which allow to be overridden to implement specific positions for inherited <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a>.
+Virtual method enabling implementation of specific positions for inherited <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> views.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -1355,7 +1362,8 @@ Removes all subviews (children) added via <a class="xref" href="Terminal.Gui.Vie
   <a id="Terminal_Gui_Toplevel_RequestStop_" data-uid="Terminal.Gui.Toplevel.RequestStop*"></a>
   <h4 id="Terminal_Gui_Toplevel_RequestStop" data-uid="Terminal.Gui.Toplevel.RequestStop">RequestStop()</h4>
   <div class="markdown level1 summary">
-Stops running this <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a>.
+Stops and closes this <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a>. If this Toplevel is the top-most Toplevel, 
+<a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RequestStop_Terminal_Gui_Toplevel_">RequestStop(Toplevel)</a> will be called, causing the application to exit.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -1365,7 +1373,8 @@ Stops running this <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a
   <a id="Terminal_Gui_Toplevel_RequestStop_" data-uid="Terminal.Gui.Toplevel.RequestStop*"></a>
   <h4 id="Terminal_Gui_Toplevel_RequestStop_Terminal_Gui_Toplevel_" data-uid="Terminal.Gui.Toplevel.RequestStop(Terminal.Gui.Toplevel)">RequestStop(Toplevel)</h4>
   <div class="markdown level1 summary">
-Stops running the <code data-dev-comment-type="paramref" class="paramref">top</code> <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a>.
+Stops and closes the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> specified by <code data-dev-comment-type="paramref" class="paramref">top</code>. If <code data-dev-comment-type="paramref" class="paramref">top</code> is the top-most Toplevel, 
+<a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RequestStop_Terminal_Gui_Toplevel_">RequestStop(Toplevel)</a> will be called, causing the application to exit.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -1392,7 +1401,7 @@ Stops running the <code data-dev-comment-type="paramref" class="paramref">top</c
   <a id="Terminal_Gui_Toplevel_ShowChild_" data-uid="Terminal.Gui.Toplevel.ShowChild*"></a>
   <h4 id="Terminal_Gui_Toplevel_ShowChild_Terminal_Gui_Toplevel_" data-uid="Terminal.Gui.Toplevel.ShowChild(Terminal.Gui.Toplevel)">ShowChild(Toplevel)</h4>
   <div class="markdown level1 summary">
-Shows the Mdi child indicated by the <code data-dev-comment-type="paramref" class="paramref">top</code> setting as <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Current">Current</a>.
+Shows the Mdi child indicated by <code data-dev-comment-type="paramref" class="paramref">top</code>, setting it as <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Current">Current</a>.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -1412,7 +1421,7 @@ Shows the Mdi child indicated by the <code data-dev-comment-type="paramref" clas
       <tr>
         <td><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></td>
         <td><span class="parametername">top</span></td>
-        <td>The toplevel.</td>
+        <td>The Toplevel.</td>
       </tr>
     </tbody>
   </table>
@@ -1427,15 +1436,15 @@ Shows the Mdi child indicated by the <code data-dev-comment-type="paramref" clas
     <tbody>
       <tr>
         <td><span class="xref">System.Boolean</span></td>
-        <td><span class="xref">true</span> if the toplevel can be showed.<span class="xref">false</span> otherwise.</td>
+        <td><code>true</code> if the toplevel can be shown or <code>false</code> if not.</td>
       </tr>
     </tbody>
   </table>
   <a id="Terminal_Gui_Toplevel_WillPresent_" data-uid="Terminal.Gui.Toplevel.WillPresent*"></a>
   <h4 id="Terminal_Gui_Toplevel_WillPresent" data-uid="Terminal.Gui.Toplevel.WillPresent">WillPresent()</h4>
   <div class="markdown level1 summary">
-Invoked by <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_">Begin(Toplevel)</a> as part of the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_Terminal_Gui_Toplevel_System_Func_System_Exception_System_Boolean__">Run(Toplevel, Func&lt;Exception, Boolean&gt;)</a> after
-the views have been laid out, and before the views are drawn for the first time.
+Invoked by <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Begin_Terminal_Gui_Toplevel_">Begin(Toplevel)</a> as part of  <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_Terminal_Gui_Toplevel_System_Func_System_Exception_System_Boolean__">Run(Toplevel, Func&lt;Exception, Boolean&gt;)</a> 
+after the views have been laid out, and before the views are drawn for the first time.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -1446,7 +1455,7 @@ the views have been laid out, and before the views are drawn for the first time.
   </h3>
   <h4 id="Terminal_Gui_Toplevel_Activate" data-uid="Terminal.Gui.Toplevel.Activate">Activate</h4>
   <div class="markdown level1 summary">
-Invoked once the Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> becomes the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Current">Current</a>.
+Invoked when the Toplevel <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> becomes the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Current">Current</a> Toplevel.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -1470,7 +1479,8 @@ Invoked once the Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.
   </table>
   <h4 id="Terminal_Gui_Toplevel_AllChildClosed" data-uid="Terminal.Gui.Toplevel.AllChildClosed">AllChildClosed</h4>
   <div class="markdown level1 summary">
-Invoked once the last child Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> is closed from the <span class="xref">Terminal.Gui.Application.End(Terminal.Gui.View)</span>
+Invoked when the last child of the Toplevel <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> is closed from 
+by <span class="xref">Terminal.Gui.Application.End(Terminal.Gui.View)</span>.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -1542,7 +1552,8 @@ Invoked when the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gu
   </table>
   <h4 id="Terminal_Gui_Toplevel_ChildClosed" data-uid="Terminal.Gui.Toplevel.ChildClosed">ChildClosed</h4>
   <div class="markdown level1 summary">
-Invoked once the child Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> is closed from the <span class="xref">Terminal.Gui.Application.End(Terminal.Gui.View)</span>
+Invoked when a child of the Toplevel <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> is closed by  
+<span class="xref">Terminal.Gui.Application.End(Terminal.Gui.View)</span>.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -1566,7 +1577,7 @@ Invoked once the child Toplevel&apos;s <a class="xref" href="Terminal.Gui.Applic
   </table>
   <h4 id="Terminal_Gui_Toplevel_ChildLoaded" data-uid="Terminal.Gui.Toplevel.ChildLoaded">ChildLoaded</h4>
   <div class="markdown level1 summary">
-Invoked once the child Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> has begin loaded.
+Invoked when a child Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> has been loaded.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -1590,7 +1601,7 @@ Invoked once the child Toplevel&apos;s <a class="xref" href="Terminal.Gui.Applic
   </table>
   <h4 id="Terminal_Gui_Toplevel_ChildUnloaded" data-uid="Terminal.Gui.Toplevel.ChildUnloaded">ChildUnloaded</h4>
   <div class="markdown level1 summary">
-Invoked once the child Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> has begin unloaded.
+Invoked when a cjhild Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> has been unloaded.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -1614,7 +1625,7 @@ Invoked once the child Toplevel&apos;s <a class="xref" href="Terminal.Gui.Applic
   </table>
   <h4 id="Terminal_Gui_Toplevel_Closed" data-uid="Terminal.Gui.Toplevel.Closed">Closed</h4>
   <div class="markdown level1 summary">
-Invoked once the Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> is closed from the <span class="xref">Terminal.Gui.Application.End(Terminal.Gui.View)</span>
+Invoked when the Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> is closed by <span class="xref">Terminal.Gui.Application.End(Terminal.Gui.View)</span>.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -1638,7 +1649,8 @@ Invoked once the Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.
   </table>
   <h4 id="Terminal_Gui_Toplevel_Closing" data-uid="Terminal.Gui.Toplevel.Closing">Closing</h4>
   <div class="markdown level1 summary">
-Invoked once the Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> is being closing from the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RequestStop_Terminal_Gui_Toplevel_">RequestStop(Toplevel)</a>
+Invoked when the Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> is being closed by  
+<a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RequestStop_Terminal_Gui_Toplevel_">RequestStop(Toplevel)</a>.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -1662,7 +1674,7 @@ Invoked once the Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.
   </table>
   <h4 id="Terminal_Gui_Toplevel_Deactivate" data-uid="Terminal.Gui.Toplevel.Deactivate">Deactivate</h4>
   <div class="markdown level1 summary">
-Invoked once the Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> ceases to be the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Current">Current</a>.
+Invoked when the Toplevel<a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> ceases to be the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Current">Current</a> Toplevel.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -1686,8 +1698,9 @@ Invoked once the Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.
   </table>
   <h4 id="Terminal_Gui_Toplevel_Loaded" data-uid="Terminal.Gui.Toplevel.Loaded">Loaded</h4>
   <div class="markdown level1 summary">
-Fired once the Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> has begin loaded.
-A Loaded event handler is a good place to finalize initialization before calling `<a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RunLoop_Terminal_Gui_Application_RunState_System_Boolean_">RunLoop(Application.RunState, Boolean)</a>.
+Invoked when the Toplevel <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> has begin loaded.
+A Loaded event handler is a good place to finalize initialization before calling 
+<a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RunLoop_Terminal_Gui_Application_RunState_System_Boolean_">RunLoop(Application.RunState, Boolean)</a>.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -1735,9 +1748,11 @@ Invoked when the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gu
   </table>
   <h4 id="Terminal_Gui_Toplevel_Ready" data-uid="Terminal.Gui.Toplevel.Ready">Ready</h4>
   <div class="markdown level1 summary">
-Fired once the Toplevel&apos;s <a class="xref" href="Terminal.Gui.MainLoop.html">MainLoop</a> has started it&apos;s first iteration.
+Invoked when the Toplevel <a class="xref" href="Terminal.Gui.MainLoop.html">MainLoop</a> has started it&apos;s first iteration.
 Subscribe to this event to perform tasks when the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> has been laid out and focus has been set.
-changes. A Ready event handler is a good place to finalize initialization after calling `<a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_System_Func_System_Exception_System_Boolean__">Run(Func&lt;Exception, Boolean&gt;)</a>(topLevel)`.
+changes. 
+<p>A Ready event handler is a good place to finalize initialization after calling 
+<a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_System_Func_System_Exception_System_Boolean__">Run(Func&lt;Exception, Boolean&gt;)</a> on this Toplevel.</p>
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -1761,7 +1776,7 @@ changes. A Ready event handler is a good place to finalize initialization after
   </table>
   <h4 id="Terminal_Gui_Toplevel_Resized" data-uid="Terminal.Gui.Toplevel.Resized">Resized</h4>
   <div class="markdown level1 summary">
-Invoked when the terminal was resized. The new <a class="xref" href="Terminal.Gui.Size.html">Size</a> of the terminal is provided.
+Invoked when the terminal has been resized. The new <a class="xref" href="Terminal.Gui.Size.html">Size</a> of the terminal is provided.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -1785,8 +1800,8 @@ Invoked when the terminal was resized. The new <a class="xref" href="Terminal.Gu
   </table>
   <h4 id="Terminal_Gui_Toplevel_Unloaded" data-uid="Terminal.Gui.Toplevel.Unloaded">Unloaded</h4>
   <div class="markdown level1 summary">
-Fired once the Toplevel&apos;s <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> has begin unloaded.
-A Unloaded event handler is a good place to disposing after calling `<a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_End_Terminal_Gui_Application_RunState_">End(Application.RunState)</a>.
+Invoked when the Toplevel <a class="xref" href="Terminal.Gui.Application.RunState.html">Application.RunState</a> has been unloaded.
+A Unloaded event handler is a good place to dispose objects after calling <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_End_Terminal_Gui_Application_RunState_">End(Application.RunState)</a>.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>

+ 2 - 1
docs/api/Terminal.Gui/Terminal.Gui.ToplevelComparer.html

@@ -84,7 +84,8 @@
   <h1 id="Terminal_Gui_ToplevelComparer" data-uid="Terminal.Gui.ToplevelComparer" class="text-break">Class ToplevelComparer
   </h1>
   <div class="markdown level0 summary">
-Implements the <span class="xref">System.Collections.Generic.IComparer&lt;&gt;</span> to sort the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> from the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_MdiChildes">MdiChildes</a> if needed.
+Implements the <span class="xref">System.Collections.Generic.IComparer&lt;&gt;</span> to sort the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> 
+from the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_MdiChildes">MdiChildes</a> if needed.
 </div>
   <div class="markdown level0 conceptual"></div>
   <div class="inheritance">

+ 4 - 2
docs/api/Terminal.Gui/Terminal.Gui.ToplevelEqualityComparer.html

@@ -84,7 +84,8 @@
   <h1 id="Terminal_Gui_ToplevelEqualityComparer" data-uid="Terminal.Gui.ToplevelEqualityComparer" class="text-break">Class ToplevelEqualityComparer
   </h1>
   <div class="markdown level0 summary">
-Implements the <span class="xref">System.Collections.Generic.IEqualityComparer&lt;&gt;</span> to comparing two <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> used by <a class="xref" href="Terminal.Gui.StackExtensions.html">StackExtensions</a>.
+Implements the <span class="xref">System.Collections.Generic.IEqualityComparer&lt;&gt;</span> for comparing two <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a>s
+used by <a class="xref" href="Terminal.Gui.StackExtensions.html">StackExtensions</a>.
 </div>
   <div class="markdown level0 conceptual"></div>
   <div class="inheritance">
@@ -211,7 +212,8 @@ Implements the <span class="xref">System.Collections.Generic.IEqualityComparer&l
     <tbody>
       <tr>
         <td><span class="xref">System.ArgumentNullException</span></td>
-        <td>The type of <code data-dev-comment-type="paramref" class="paramref">obj</code> is a reference type and <code data-dev-comment-type="paramref" class="paramref">obj</code> is <span class="xref">null</span>.</td>
+        <td>The type of <code data-dev-comment-type="paramref" class="paramref">obj</code> 
+is a reference type and <code data-dev-comment-type="paramref" class="paramref">obj</code> is <span class="xref">null</span>.</td>
       </tr>
     </tbody>
   </table>

+ 3 - 3
docs/api/Terminal.Gui/Terminal.Gui.Wizard.WizardStep.html

@@ -680,7 +680,7 @@ The title of the <a class="xref" href="Terminal.Gui.Wizard.WizardStep.html">Wiza
     </tbody>
   </table>
   <h5 id="Terminal_Gui_Wizard_WizardStep_Title_remarks">Remarks</h5>
-  <div class="markdown level1 remarks">The Title is only displayed when the <a class="xref" href="Terminal.Gui.Wizard.html">Wizard</a> is used as a modal pop-up.</div>
+  <div class="markdown level1 remarks">The Title is only displayed when the <a class="xref" href="Terminal.Gui.Wizard.html">Wizard</a> is used as a modal pop-up (see <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_Modal">Modal</a>.</div>
   <h3 id="methods">Methods
   </h3>
   <a id="Terminal_Gui_Wizard_WizardStep_Add_" data-uid="Terminal.Gui.Wizard.WizardStep.Add*"></a>
@@ -787,7 +787,7 @@ Called before the <a class="xref" href="Terminal.Gui.Wizard.WizardStep.html#Term
     <tbody>
       <tr>
         <td><span class="xref">System.Boolean</span></td>
-        <td>`true` if an event handler cancelled the Title change.</td>
+        <td><code>true</code> if an event handler cancelled the Title change.</td>
       </tr>
     </tbody>
   </table>
@@ -867,7 +867,7 @@ Event fired after the <a class="xref" href="Terminal.Gui.Wizard.WizardStep.html#
   <h4 id="Terminal_Gui_Wizard_WizardStep_TitleChanging" data-uid="Terminal.Gui.Wizard.WizardStep.TitleChanging">TitleChanging</h4>
   <div class="markdown level1 summary">
 Event fired when the <a class="xref" href="Terminal.Gui.Wizard.WizardStep.html#Terminal_Gui_Wizard_WizardStep_Title">Title</a> is changing. Set <a class="xref" href="Terminal.Gui.Wizard.WizardStep.TitleEventArgs.html#Terminal_Gui_Wizard_WizardStep_TitleEventArgs_Cancel">Cancel</a> to 
-`true` to cancel the Title change.
+<code>true</code> to cancel the Title change.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>

+ 28 - 43
docs/api/Terminal.Gui/Terminal.Gui.Wizard.html

@@ -652,16 +652,9 @@ bottom of the Wizard view are customizable buttons enabling the user to navigate
   <div class="markdown level0 remarks">
 The Wizard can be displayed either as a modal (pop-up) <a class="xref" href="Terminal.Gui.Window.html">Window</a> (like <a class="xref" href="Terminal.Gui.Dialog.html">Dialog</a>) or as an embedded <a class="xref" href="Terminal.Gui.View.html">View</a>. 
 
-By default, <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_Modal">Modal</a> is true; launch the Wizard using `Application.Run(wizard)`. 
-
-Set <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_Modal">Modal</a> to `false` to use Wizard as an embedded View, and add the Wizard to a containing view with <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Add_Terminal_Gui_View_">Add(View)</a>.
-
-When used as a modal pop-up window, the Esc key will cause the <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_Cancelled">Cancelled</a> event to fire and (if the event is not cancelled),
-will cause <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RequestStop_Terminal_Gui_Toplevel_">RequestStop(Toplevel)</a> to be called, closing the Wizard.
-
-When used as an embedded View, no frame is drawn around the Wizard. To detect if the user wants to cancel
-the Wizard, subscrie to the <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_Cancelled">Cancelled</a> event.
+By default, <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_Modal">Modal</a> is <code>true</code>. In this case launch the Wizard with <code>Application.Run(wizard)</code>. 
 
+See <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_Modal">Modal</a> for more details.
 </div>
   <h3 id="constructors">Constructors
   </h3>
@@ -774,11 +767,17 @@ Gets or sets the currently active <a class="xref" href="Terminal.Gui.Wizard.Wiza
   <div class="markdown level1 summary">
 Determines whether the <a class="xref" href="Terminal.Gui.Wizard.html">Wizard</a> is displayed as modal pop-up or not.
 
-The default is `true`. The Wizard will be shown with a frame with <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_Title">Title</a> and will behave like
+The default is <code>true</code>. The Wizard will be shown with a frame with <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_Title">Title</a> and will behave like
 any <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> window.
 
-If set to `false` the Wizard will have no frame and will behave like any embedded <a class="xref" href="Terminal.Gui.View.html">View</a>.
+If set to <code>false</code> the Wizard will have no frame and will behave like any embedded <a class="xref" href="Terminal.Gui.View.html">View</a>.
+
+To use Wizard as an embedded View 
+<ol><li>Set <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_Modal">Modal</a> to <code>false</code>.</li><li>Add the Wizard to a containing view with <a class="xref" href="Terminal.Gui.View.html#Terminal_Gui_View_Add_Terminal_Gui_View_">Add(View)</a>.</li></ol>
 
+If a non-Modal Wizard is added to the application after <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_Run_System_Func_System_Exception_System_Boolean__">Run(Func&lt;Exception, Boolean&gt;)</a> has been called
+the first step must be explicitly set by setting <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_CurrentStep">CurrentStep</a> to <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_GetNextStep">GetNextStep()</a>:
+<pre><code>   wizard.CurrentStep = wizard.GetNextStep();</code></pre>
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -858,7 +857,9 @@ The title of the Wizard, shown at the top of the Wizard with &quot; - currentSte
     </tbody>
   </table>
   <h5 id="Terminal_Gui_Wizard_Title_remarks">Remarks</h5>
-  <div class="markdown level1 remarks">The Title is only displayed when the <a class="xref" href="Terminal.Gui.Wizard.html">Wizard</a> is used as a modal pop-up.</div>
+  <div class="markdown level1 remarks">
+The Title is only displayed when the <a class="xref" href="Terminal.Gui.Wizard.html">Wizard</a> <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_Modal">Modal</a> is set to <code>false</code>.
+</div>
   <h3 id="methods">Methods
   </h3>
   <a id="Terminal_Gui_Wizard_AddStep_" data-uid="Terminal.Gui.Wizard.AddStep*"></a>
@@ -945,7 +946,7 @@ Returns the last enabled step in the Wizard
   <h4 id="Terminal_Gui_Wizard_GetNextStep" data-uid="Terminal.Gui.Wizard.GetNextStep">GetNextStep()</h4>
   <div class="markdown level1 summary">
 Returns the next enabled <a class="xref" href="Terminal.Gui.Wizard.WizardStep.html">Wizard.WizardStep</a> after the current step. Takes into account steps which
-are disabled. If <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_CurrentStep">CurrentStep</a> is `null` returns the first enabled step.
+are disabled. If <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_CurrentStep">CurrentStep</a> is <code>null</code> returns the first enabled step.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -963,7 +964,7 @@ are disabled. If <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wiz
     <tbody>
       <tr>
         <td><a class="xref" href="Terminal.Gui.Wizard.WizardStep.html">Wizard.WizardStep</a></td>
-        <td>The next step after the current step, if there is one; otherwise returns `null`, which 
+        <td>The next step after the current step, if there is one; otherwise returns <code>null</code>, which 
 indicates either there are no enabled steps or the current step is the last enabled step.</td>
       </tr>
     </tbody>
@@ -972,7 +973,7 @@ indicates either there are no enabled steps or the current step is the last enab
   <h4 id="Terminal_Gui_Wizard_GetPreviousStep" data-uid="Terminal.Gui.Wizard.GetPreviousStep">GetPreviousStep()</h4>
   <div class="markdown level1 summary">
 Returns the first enabled <a class="xref" href="Terminal.Gui.Wizard.WizardStep.html">Wizard.WizardStep</a> before the current step. Takes into account steps which
-are disabled. If <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_CurrentStep">CurrentStep</a> is `null` returns the last enabled step.
+are disabled. If <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_CurrentStep">CurrentStep</a> is <code>null</code> returns the last enabled step.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -990,7 +991,7 @@ are disabled. If <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wiz
     <tbody>
       <tr>
         <td><a class="xref" href="Terminal.Gui.Wizard.WizardStep.html">Wizard.WizardStep</a></td>
-        <td>The first step ahead of the current step, if there is one; otherwise returns `null`, which 
+        <td>The first step ahead of the current step, if there is one; otherwise returns <code>null</code>, which 
 indicates either there are no enabled steps or the current step is the first enabled step.</td>
       </tr>
     </tbody>
@@ -1156,8 +1157,10 @@ Called when the <a class="xref" href="Terminal.Gui.Wizard.html">Wizard</a> is ab
   <a id="Terminal_Gui_Wizard_ProcessKey_" data-uid="Terminal.Gui.Wizard.ProcessKey*"></a>
   <h4 id="Terminal_Gui_Wizard_ProcessKey_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Wizard.ProcessKey(Terminal.Gui.KeyEvent)">ProcessKey(KeyEvent)</h4>
   <div class="markdown level1 summary">
-If the view is focused, gives the view a
-chance to process the keystroke.
+<a class="xref" href="Terminal.Gui.Wizard.html">Wizard</a> is derived from <a class="xref" href="Terminal.Gui.Dialog.html">Dialog</a> and Dialog causes <code>Esc</code> to call
+<a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_RequestStop_Terminal_Gui_Toplevel_">RequestStop(Toplevel)</a>, closing the Dialog. Wizard overrides <a class="xref" href="Terminal.Gui.Responder.html#Terminal_Gui_Responder_ProcessKey_Terminal_Gui_KeyEvent_">ProcessKey(KeyEvent)</a>
+to instead fire the <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_Cancelled">Cancelled</a> event when Wizard is being used as a non-modal (see <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_Modal">Modal</a>.
+See <a class="xref" href="Terminal.Gui.Responder.html#Terminal_Gui_Responder_ProcessKey_Terminal_Gui_KeyEvent_">ProcessKey(KeyEvent)</a> for more.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -1198,32 +1201,14 @@ chance to process the keystroke.
   </table>
   <h5 class="overrides">Overrides</h5>
   <div><a class="xref" href="Terminal.Gui.Dialog.html#Terminal_Gui_Dialog_ProcessKey_Terminal_Gui_KeyEvent_">Dialog.ProcessKey(KeyEvent)</a></div>
-  <h5 id="Terminal_Gui_Wizard_ProcessKey_Terminal_Gui_KeyEvent__remarks">Remarks</h5>
-  <div class="markdown level1 remarks">
-<p>
-  Views can override this method if they are
-  interested in processing the given keystroke.
-  If they consume the keystroke, they must
-  return true to stop the keystroke from being
-  processed by other widgets or consumed by the
-  widget engine.    If they return false, the
-  keystroke will be passed using the ProcessColdKey
-  method to other views to process.
-</p>
-<p>
-  The View implementation does nothing but return false,
-  so it is not necessary to call base.ProcessKey if you
-  derive directly from View, but you should if you derive
-  other View subclasses.
-</p>
-</div>
   <h3 id="events">Events
   </h3>
   <h4 id="Terminal_Gui_Wizard_Cancelled" data-uid="Terminal.Gui.Wizard.Cancelled">Cancelled</h4>
   <div class="markdown level1 summary">
-This event is raised when the user has cancelled the <a class="xref" href="Terminal.Gui.Wizard.html">Wizard</a> by pressin the Esc key. 
-To prevent a <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_Modal">Modal</a> Wizard from
-closing, cancel the event by setting <a class="xref" href="Terminal.Gui.Wizard.WizardButtonEventArgs.html#Terminal_Gui_Wizard_WizardButtonEventArgs_Cancel">Cancel</a> to `true` before returning from the event handler.
+Raised when the user has cancelled the <a class="xref" href="Terminal.Gui.Wizard.html">Wizard</a> by pressin the Esc key. 
+To prevent a modal (<a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_Modal">Modal</a> is <code>true</code>) Wizard from
+closing, cancel the event by setting <a class="xref" href="Terminal.Gui.Wizard.WizardButtonEventArgs.html#Terminal_Gui_Wizard_WizardButtonEventArgs_Cancel">Cancel</a> to 
+<code>true</code> before returning from the event handler.
 </div>
   <div class="markdown level1 conceptual"></div>
   <h5 class="decalaration">Declaration</h5>
@@ -1247,7 +1232,7 @@ closing, cancel the event by setting <a class="xref" href="Terminal.Gui.Wizard.W
   </table>
   <h4 id="Terminal_Gui_Wizard_Finished" data-uid="Terminal.Gui.Wizard.Finished">Finished</h4>
   <div class="markdown level1 summary">
-This event is raised when the Next/Finish button in the <a class="xref" href="Terminal.Gui.Wizard.html">Wizard</a> is clicked. The Next/Finish button is always
+Raised when the Next/Finish button in the <a class="xref" href="Terminal.Gui.Wizard.html">Wizard</a> is clicked. The Next/Finish button is always
 the last button in the array of Buttons passed to the <a class="xref" href="Terminal.Gui.Wizard.html">Wizard</a> constructor, if any. This event is only
 raised if the <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_CurrentStep">CurrentStep</a> is the last Step in the Wizard flow 
 (otherwise the <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_Finished">Finished</a> event is raised).
@@ -1274,7 +1259,7 @@ raised if the <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard
   </table>
   <h4 id="Terminal_Gui_Wizard_MovingBack" data-uid="Terminal.Gui.Wizard.MovingBack">MovingBack</h4>
   <div class="markdown level1 summary">
-This event is raised when the Back button in the <a class="xref" href="Terminal.Gui.Wizard.html">Wizard</a> is clicked. The Back button is always
+Raised when the Back button in the <a class="xref" href="Terminal.Gui.Wizard.html">Wizard</a> is clicked. The Back button is always
 the first button in the array of Buttons passed to the <a class="xref" href="Terminal.Gui.Wizard.html">Wizard</a> constructor, if any.
 </div>
   <div class="markdown level1 conceptual"></div>
@@ -1299,7 +1284,7 @@ the first button in the array of Buttons passed to the <a class="xref" href="Ter
   </table>
   <h4 id="Terminal_Gui_Wizard_MovingNext" data-uid="Terminal.Gui.Wizard.MovingNext">MovingNext</h4>
   <div class="markdown level1 summary">
-This event is raised when the Next/Finish button in the <a class="xref" href="Terminal.Gui.Wizard.html">Wizard</a> is clicked (or the user presses Enter). 
+Raised when the Next/Finish button in the <a class="xref" href="Terminal.Gui.Wizard.html">Wizard</a> is clicked (or the user presses Enter). 
 The Next/Finish button is always the last button in the array of Buttons passed to the <a class="xref" href="Terminal.Gui.Wizard.html">Wizard</a> constructor, 
 if any. This event is only raised if the <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_CurrentStep">CurrentStep</a> is the last Step in the Wizard flow 
 (otherwise the <a class="xref" href="Terminal.Gui.Wizard.html#Terminal_Gui_Wizard_Finished">Finished</a> event is raised).

+ 6 - 3
docs/api/Terminal.Gui/Terminal.Gui.html

@@ -557,7 +557,8 @@ Time editing <a class="xref" href="Terminal.Gui.View.html">View</a>
 </section>
       <h4><a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a></h4>
       <section>
-Toplevel views can be modally executed.
+Toplevel views can be modally executed. They are used for both an application&apos;s main view (filling the entire screeN and
+for pop-up views such as <a class="xref" href="Terminal.Gui.Dialog.html">Dialog</a>, <a class="xref" href="Terminal.Gui.MessageBox.html">MessageBox</a>, and <a class="xref" href="Terminal.Gui.Wizard.html">Wizard</a>.
 </section>
       <h4><a class="xref" href="Terminal.Gui.ToplevelClosingEventArgs.html">ToplevelClosingEventArgs</a></h4>
       <section>
@@ -565,11 +566,13 @@ Toplevel views can be modally executed.
 </section>
       <h4><a class="xref" href="Terminal.Gui.ToplevelComparer.html">ToplevelComparer</a></h4>
       <section>
-Implements the <span class="xref">System.Collections.Generic.IComparer&lt;&gt;</span> to sort the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> from the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_MdiChildes">MdiChildes</a> if needed.
+Implements the <span class="xref">System.Collections.Generic.IComparer&lt;&gt;</span> to sort the <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> 
+from the <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_MdiChildes">MdiChildes</a> if needed.
 </section>
       <h4><a class="xref" href="Terminal.Gui.ToplevelEqualityComparer.html">ToplevelEqualityComparer</a></h4>
       <section>
-Implements the <span class="xref">System.Collections.Generic.IEqualityComparer&lt;&gt;</span> to comparing two <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a> used by <a class="xref" href="Terminal.Gui.StackExtensions.html">StackExtensions</a>.
+Implements the <span class="xref">System.Collections.Generic.IEqualityComparer&lt;&gt;</span> for comparing two <a class="xref" href="Terminal.Gui.Toplevel.html">Toplevel</a>s
+used by <a class="xref" href="Terminal.Gui.StackExtensions.html">StackExtensions</a>.
 </section>
       <h4><a class="xref" href="Terminal.Gui.TreeView.html">TreeView</a></h4>
       <section>

File diff suppressed because it is too large
+ 0 - 0
docs/index.json


+ 7 - 7
docs/manifest.json

@@ -402,7 +402,7 @@
       "output": {
         ".html": {
           "relative_path": "api/Terminal.Gui/Terminal.Gui.FileDialog.html",
-          "hash": "B3yTCR5dDfhAKB2boiYBQdzegBy59fbTFm+Ggb+qGys="
+          "hash": "FWl01DAuwIcs0MAHRQ1x11ko2juqZXU3eUxYPeGeJTg="
         }
       },
       "is_incremental": false,
@@ -1614,7 +1614,7 @@
       "output": {
         ".html": {
           "relative_path": "api/Terminal.Gui/Terminal.Gui.Toplevel.html",
-          "hash": "S6Xn/gnYGmPmsuS16TBEDYp6wiIk566YTRIx5idV++U="
+          "hash": "me0dgK3CMP8HhkulPFpCz2uv5+/hWXLakjkjzvOrywk="
         }
       },
       "is_incremental": false,
@@ -1638,7 +1638,7 @@
       "output": {
         ".html": {
           "relative_path": "api/Terminal.Gui/Terminal.Gui.ToplevelComparer.html",
-          "hash": "TydX6KnFLNxksZGixaUEg65TQJhpvvHLeE0wbkyIJ+8="
+          "hash": "GXGc00gqtstftvRCXOE7BLwXaBD/taEGyUTc2hBfzMA="
         }
       },
       "is_incremental": false,
@@ -1650,7 +1650,7 @@
       "output": {
         ".html": {
           "relative_path": "api/Terminal.Gui/Terminal.Gui.ToplevelEqualityComparer.html",
-          "hash": "YD7pIqZbWbxhNobvM+lDACMXt4lTaGcHyibZP67zba8="
+          "hash": "+mzKztKooGTlBcIh/zNF94nFAxCjVO6PBIPZ26B5ydY="
         }
       },
       "is_incremental": false,
@@ -1950,7 +1950,7 @@
       "output": {
         ".html": {
           "relative_path": "api/Terminal.Gui/Terminal.Gui.Wizard.WizardStep.html",
-          "hash": "jldHYlYI0VnHAiO+Bvax4dHJEI+8mbuse2PFbQ2Yixo="
+          "hash": "8d8eJFs9c1aszaT+eEXrDGMAarZPeiOAufN877LMTwc="
         }
       },
       "is_incremental": false,
@@ -1962,7 +1962,7 @@
       "output": {
         ".html": {
           "relative_path": "api/Terminal.Gui/Terminal.Gui.Wizard.html",
-          "hash": "SkAdrTwL7jtKuwE+hBI6OoJoCbrCDg2QRUCGwGtRQ7I="
+          "hash": "KZcgK+1/pT39/evzsR0H1pLdHttyseGgiNCXowv6UQU="
         }
       },
       "is_incremental": false,
@@ -1974,7 +1974,7 @@
       "output": {
         ".html": {
           "relative_path": "api/Terminal.Gui/Terminal.Gui.html",
-          "hash": "MB39XKrURJ9mQ7SQJVm3N+qFwUXtuROS9zaBCPYI7uA="
+          "hash": "gn+7KPWov0Hzoe+t3VPfeRGKQXv23FXl9JJurKPESCE="
         }
       },
       "is_incremental": false,

Some files were not shown because too many files changed in this diff