Browse Source

Tons of V2 API doc fixes (#3932)

* Tons of API doc updates

* tweaked scenario

* try to fix unit test crash in ubuntu action

* try to fix unit test crash in ubuntu action2
Tig 5 months ago
parent
commit
df9549e0a2

+ 3 - 3
Terminal.Gui/Application/Application.Mouse.cs

@@ -254,20 +254,20 @@ public static partial class Application // Mouse handling
 
 #pragma warning disable CS1574 // XML comment has cref attribute that could not be resolved
     /// <summary>
-    /// Raised when a mouse event occurs. Can be cancelled by setting <see cref="MouseEventArgs.Handled"/> to <see langword="true"/>.
+    /// Raised when a mouse event occurs. Can be cancelled by setting <see cref="HandledEventArgs.Handled"/> to <see langword="true"/>.
     /// </summary>
     /// <remarks>
     ///     <para>
     ///         <see cref="MouseEventArgs.ScreenPosition"/> coordinates are screen-relative.
     ///     </para>
     ///     <para>
-    ///         <see cref="MouseEventArgs.View"/> will be the deepest view under the under the mouse.
+    ///         <see cref="MouseEventArgs.View"/> will be the deepest view under the mouse.
     ///     </para>
     ///     <para>
     ///         <see cref="MouseEventArgs.Position"/> coordinates are view-relative. Only valid if <see cref="MouseEventArgs.View"/> is set.
     ///     </para>
     ///     <para>
-    ///         Use this evento to handle mouse events at the application level, before View-specific handling.
+    ///         Use this even to handle mouse events at the application level, before View-specific handling.
     ///     </para>
     /// </remarks>
     public static event EventHandler<MouseEventArgs>? MouseEvent;

+ 5 - 4
Terminal.Gui/Drawing/Glyphs.cs

@@ -1,13 +1,14 @@
-namespace Terminal.Gui;
+#nullable enable
+namespace Terminal.Gui;
 
 /// <summary>Defines the standard set of glyphs used to draw checkboxes, lines, borders, etc...</summary>
 /// <remarks>
 ///     <para>
-///         Access with <see cref="CM.Glyphs"/> (which is a global using alias for
-///         <see cref="ConfigurationManager.Glyphs"/>).
+///         Access with <see cref="Glyphs"/> (which is a global using alias for
+///         <see cref="Glyphs"/>).
 ///     </para>
 ///     <para>
-///         The default glyphs can be changed via the <see cref="ConfigurationManager"/>. Within a <c>config.json</c>
+///         The default glyphs can be changed per-<see cref="ThemeScope"/> in <see cref="ConfigurationManager"/>. Within a <c>config.json</c>
 ///         file the Json property name is the property name prefixed with "Glyphs.".
 ///     </para>
 ///     <para>

+ 3 - 1
Terminal.Gui/Drawing/Region.cs

@@ -1,5 +1,7 @@
 #nullable enable
 
+namespace Terminal.Gui;
+
 using System.Buffers;
 
 /// <summary>
@@ -96,7 +98,7 @@ public class Region : IDisposable
         {
             foreach (Rectangle rect2 in region._rectangles)
             {
-                Rectangle intersected = Rectangle.Intersect (rect1, rect2);
+                Rectangle intersected = Rectangle.Intersect (rect1, rect2); 
 
                 if (!intersected.IsEmpty)
                 {

+ 1 - 1
Terminal.Gui/Input/CommandContext.cs

@@ -5,7 +5,7 @@ namespace Terminal.Gui;
 /// <summary>
 ///     Provides context for a <see cref="Command"/> invocation.
 /// </summary>
-/// <seealso cref="View.Invoke(Command)"/>.
+/// <seealso cref="View.InvokeCommand"/>.
 #pragma warning restore CS1574 // XML comment has cref attribute that could not be resolved
 public record struct CommandContext<TBinding> : ICommandContext
 {

+ 2 - 2
Terminal.Gui/View/Adornment/Adornment.cs

@@ -1,6 +1,6 @@
 #nullable enable
-using Terminal.Gui;
-using Attribute = Terminal.Gui.Attribute;
+namespace Terminal.Gui;
+
 
 /// <summary>
 ///     Adornments are a special form of <see cref="View"/> that appear outside the <see cref="View.Viewport"/>:

+ 42 - 44
Terminal.Gui/View/Adornment/Border.cs

@@ -12,36 +12,24 @@ namespace Terminal.Gui;
 ///     <para>
 ///         The <see cref="View.Title"/> of <see cref="Adornment.Parent"/> will be drawn based on the value of
 ///         <see cref="Thickness.Top"/>:
+///         <example>
+///             // If Thickness.Top is 1:
+///             ┌┤1234├──┐
+///             │        │
+///             └────────┘
+///             // If Thickness.Top is 2:
+///              ┌────┐
+///             ┌┤1234├──┐
+///             │        │
+///             └────────┘
+///             If Thickness.Top is 3:
+///              ┌────┐
+///             ┌┤1234├──┐
+///             │└────┘  │
+///             │        │
+///             └────────┘
+///         </example>
 ///     </para>
-///     <para>
-///         If <c>1</c>:
-///         <code>
-/// ┌┤1234├──┐
-/// │        │
-/// └────────┘
-/// </code>
-///     </para>
-///     <para>
-///         If <c>2</c>:
-///         <code>
-///  ┌────┐
-/// ┌┤1234├──┐
-/// │        │
-/// └────────┘
-/// </code>
-///     </para>
-///     <para>
-///         If <c>3</c>:
-///         <code>
-///  ┌────┐
-/// ┌┤1234├──┐
-/// │└────┘  │
-/// │        │
-/// └────────┘
-/// </code>
-///     </para>
-///     <para/>
-///     <para>See the <see cref="Adornment"/> class.</para>
 /// </remarks>
 public class Border : Adornment
 {
@@ -77,13 +65,14 @@ public class Border : Adornment
             ShowHideDrawIndicator ();
         }
     }
+
     private void ShowHideDrawIndicator ()
     {
         if (View.Diagnostics.HasFlag (ViewDiagnosticFlags.DrawIndicator) && Thickness != Thickness.Empty)
         {
             if (DrawIndicator is null)
             {
-                DrawIndicator = new SpinnerView ()
+                DrawIndicator = new()
                 {
                     Id = "DrawIndicator",
                     X = 1,
@@ -282,7 +271,6 @@ public class Border : Adornment
             ColorScheme = cs;
         }
 
-
         if (e.NewValue == HighlightStyle.None && _savedForeColor.HasValue)
         {
             var cs = new ColorScheme (ColorScheme)
@@ -304,9 +292,10 @@ public class Border : Adornment
     {
         // BUGBUG: See https://github.com/gui-cs/Terminal.Gui/issues/3312
         if (!_dragPosition.HasValue && mouseEvent.Flags.HasFlag (MouseFlags.Button1Pressed)
-                                // HACK: Prevents Window from being draggable if it's Top
-                                //&& Parent is Toplevel { Modal: true }
-                                )
+
+            // HACK: Prevents Window from being draggable if it's Top
+            //&& Parent is Toplevel { Modal: true }
+           )
         {
             Parent!.SetFocus ();
 
@@ -501,8 +490,9 @@ public class Border : Adornment
                                                            parentLoc.Y - _startGrabPoint.Y,
                                                            out int nx,
                                                            out int ny
-                                                          //,
-                                                          // out _
+
+                                                           //,
+                                                           // out _
                                                           );
 
                         Parent.X = parentLoc.X - _startGrabPoint.X;
@@ -712,7 +702,12 @@ public class Border : Adornment
             }
         }
 
-        if (Parent is { } && canDrawBorder && Thickness.Top > 0 && maxTitleWidth > 0 && Settings.FastHasFlags (BorderSettings.Title) && !string.IsNullOrEmpty (Parent?.Title))
+        if (Parent is { }
+            && canDrawBorder
+            && Thickness.Top > 0
+            && maxTitleWidth > 0
+            && Settings.FastHasFlags (BorderSettings.Title)
+            && !string.IsNullOrEmpty (Parent?.Title))
         {
             Attribute focus = Parent.GetNormalColor ();
 
@@ -723,11 +718,12 @@ public class Border : Adornment
             }
 
             Rectangle titleRect = new (borderBounds.X + 2, titleY, maxTitleWidth, 1);
-            Parent.TitleTextFormatter.Draw (titleRect
-                                           ,
+
+            Parent.TitleTextFormatter.Draw (
+                                            titleRect,
                                             Parent.HasFocus ? focus : GetNormalColor (),
                                             Parent.HasFocus ? focus : GetHotNormalColor ());
-            Parent?.LineCanvas.Exclude(new(titleRect));
+            Parent?.LineCanvas.Exclude (new (titleRect));
         }
 
         if (canDrawBorder && LineStyle != LineStyle.None)
@@ -944,13 +940,15 @@ public class Border : Adornment
             }
         }
 
-        return true; ;
+        return true;
+
+        ;
     }
 
     /// <summary>
     ///     Gets the subview used to render <see cref="ViewDiagnosticFlags.DrawIndicator"/>.
     /// </summary>
-    public SpinnerView? DrawIndicator { get; private set; } = null;
+    public SpinnerView? DrawIndicator { get; private set; }
 
     private void SetupGradientLineCanvas (LineCanvas lc, Rectangle rect)
     {
@@ -1392,13 +1390,13 @@ public class Border : Adornment
 
         HotKeyBindings.Add (Key.Esc, Command.Quit);
         HotKeyBindings.Add (Application.ArrangeKey, Command.Quit);
-        HotKeyBindings.Add (Key.CursorUp,  Command.Up);
+        HotKeyBindings.Add (Key.CursorUp, Command.Up);
         HotKeyBindings.Add (Key.CursorDown, Command.Down);
         HotKeyBindings.Add (Key.CursorLeft, Command.Left);
         HotKeyBindings.Add (Key.CursorRight, Command.Right);
 
         HotKeyBindings.Add (Key.Tab, Command.Tab);
-        HotKeyBindings.Add (Key.Tab.WithShift,  Command.BackTab);
+        HotKeyBindings.Add (Key.Tab.WithShift, Command.BackTab);
     }
 
     private void ApplicationOnMouseEvent (object? sender, MouseEventArgs e)

+ 2 - 6
Terminal.Gui/View/View.Drawing.cs

@@ -398,14 +398,12 @@ public partial class View // Drawing APIs
     protected virtual bool OnDrawingText () { return false; }
 
 
-#pragma warning disable CS1574 // XML comment has cref attribute that could not be resolved
     /// <summary>Raised when the <see cref="Text"/> of the View is to be drawn.</summary>
     /// <returns>
-    ///     Set <see cref="DrawEventArgs.Cancel"/> to <see langword="true"/> to stop further drawing of
+    ///     Set <see cref="CancelEventArgs.Cancel"/> to <see langword="true"/> to stop further drawing of
     ///     <see cref="Text"/>.
     /// </returns>
     public event EventHandler<DrawEventArgs>? DrawingText;
-#pragma warning restore CS1574 // XML comment has cref attribute that could not be resolved
 
     /// <summary>
     ///     Draws the <see cref="Text"/> of the View using the <see cref="TextFormatter"/>.
@@ -503,16 +501,14 @@ public partial class View // Drawing APIs
     protected virtual bool OnDrawingSubviews () { return false; }
 
 
-#pragma warning disable CS1574 // XML comment has cref attribute that could not be resolved
     /// <summary>Raised when the <see cref="Subviews"/> are to be drawn.</summary>
     /// <remarks>
     /// </remarks>
     /// <returns>
-    ///     Set <see cref="DrawEventArgs.Cancel"/> to <see langword="true"/> to stop further drawing of
+    ///     Set <see cref="CancelEventArgs.Cancel"/> to <see langword="true"/> to stop further drawing of
     ///     <see cref="Subviews"/>.
     /// </returns>
     public event EventHandler<DrawEventArgs>? DrawingSubviews;
-#pragma warning restore CS1574 // XML comment has cref attribute that could not be resolved
 
     /// <summary>
     ///     Draws the <see cref="Subviews"/>.

+ 8 - 249
Terminal.Gui/View/View.cs

@@ -9,257 +9,16 @@ namespace Terminal.Gui;
 /// <summary>
 ///     View is the base class all visible elements. View can render itself and
 ///     contains zero or more nested views, called SubViews. View provides basic functionality for layout, arrangement, and
-///     drawing. In addition, View provides keyboard and mouse event handling. See the
-///     <see href="../docs/view.html">
-///         View
-///         Deep Dive
-///     </see>
-///     for more.
-/// </summary>
-/// <remarks>
-///     <list type="table">
-///         <listheader>
-///             <term>Term</term><description>Definition</description>
-///         </listheader>
-///         <item>
-///             <term>SubView</term>
-///             <description>
-///                 A View that is contained in another view and will be rendered as part of the containing view's
-///                 ContentArea. SubViews are added to another view via the <see cref="View.Add(View)"/>` method. A View
-///                 may only be a SubView of a single View.
-///             </description>
-///         </item>
-///         <item>
-///             <term>SuperView</term><description>The View that is a container for SubViews.</description>
-///         </item>
-///         <item>
-///             <term>Input</term>
-///             <description>
-///                 <para>
-///                     Key Bindings is the preferred way of handling keyboard input in View implementations.
-///                     The View calls
-///                     <see cref="AddCommand(Terminal.Gui.Command,Terminal.Gui.View.CommandImplementation)"/> to declare
-///                     it supports a particular command and then uses <see cref="KeyBindings"/>
-///                     to indicate which key presses will invoke the command.
-///                 </para>
-///                 <para>
-///                     Mouse Bindings is the preferred way of handling mouse input in View implementations. The View calls
-///                     <see cref="AddCommand(Terminal.Gui.Command,Terminal.Gui.View.CommandImplementation)"/> to declare
-///                     it supports a
-///                     particular command and then uses <see cref="MouseBindings"/> to indicate which mouse events will
-///                     invoke the command.
-///                 </para>
-///                 <para>
-///                     See the
-///                     <see href="../docs/mouse.html">
-///                         Mouse
-///                         Deep Dive
-///                     </see>
-///                     and
-///                     <see href="../docs/keyboard.html">
-///                         Keyboard
-///                         Deep Dive
-///                     </see>
-///                     for more information.
-///                 </para>
-///             </description>
-///         </item>
-///         <item>
-///             <term>Layout</term>
-///             <description>
-///                 <para>
-///                     Terminal.Gui provides a rich system for how View objects are laid out relative to each other. The
-///                     layout system also defines how coordinates are specified.
-///                 </para>
-///                 <para>
-///                     The <see cref="X"/>, <see cref="Y"/>, <see cref="Width"/>, and <see cref="Height"/> properties are
-///                     <see cref="Dim"/> and <see cref="Pos"/> objects that dynamically update the position of a view. The
-///                     X and Y properties are of type <see cref="Pos"/> and you can use either absolute positions,
-///                     percentages, or anchor points. The Width and Height properties are of type <see cref="Dim"/> and
-///                     can use absolute position, percentages, and anchors. These are useful as they will take care of
-///                     repositioning views when view's adornments are resized or if the terminal size changes.
-///                 </para>
-///                 <para>
-///                     See the
-///                     <see href="../docs/layout.html">
-///                         Layout
-///                         Deep Dive
-///                     </see>
-///                     for more information.
-///                 </para>
-///             </description>
-///         </item>
-///         <item>
-///             <term>Arrangement</term>
-///             <description>
-///                 <para>
-///                     Complimenting the Layout system, <see cref="Arrangement"/> controls how the user can use the mouse
-///                     and keyboard to arrange views and enables either Tiled or Overlapped layouts.
-///                 </para>
-///                 <para>
-///                     See the
-///                     <see href="../docs/arrangement.html">
-///                         Arrangement
-///                         Deep Dive
-///                     </see>
-///                     for more information.
-///                 </para>
-///             </description>
-///         </item>
-///         <item>
-///             <term>Drawing</term>
-///             <description>
-///                 <para>
-///                     Apps draw using the <see cref="Move"/> and <see cref="AddRune(Rune)"/> APIs. Move selects the
-///                     column and row of the Cell and AddRune places
-///                     the specified glyph in that cell using the <see cref="Attribute"/> that was most recently set via
-///                     <see cref="SetAttribute"/>.
-///                     The ConsoleDriver caches all changed Cells and efficiently outputs them to the terminal each
-///                     iteration of the Application. In other words, Terminal.Gui uses deferred rendering.
-///                 </para>
-///                 <para>
-///                     The View draw APIs all take coordinates specified in Viewport-Relative coordinates. That is,
-///                     <c>(0,0)</c> is the top-left cell visible to the user.
-///                 </para>
-///                 <para>
-///                     If a View need to redraw because something changed within it's Content Area it can call
-///                     <see cref="SetNeedsDraw()"/>.
-///                 </para>
-///                 <para>
-///                     Terminal.Gui supports the full range of Unicode/wide characters.
-///                     This includes emoji, CJK characters, and other wide characters. For Unicode characters that require
-///                     more than one cell,
-///                     AddRune and the ConsoleDriver automatically manage the cells. Extension methods to Rune are
-///                     provided to determine if a Rune is a wide character and to get the width of a Rune.
-///                 </para>
-///                 <para>
-///                     The <see cref="ColorScheme"/> provides consistent colors across all views. The
-///                     <see cref="ColorScheme"/> is inherited from the <see cref="SuperView"/>. The
-///                     <see cref="ColorScheme"/> is used to set the <see cref="Attribute"/> for drawing.
-///                 </para>
-///                 The <see cref="Color"/> class represents a color. It provides automatic mapping between the legacy
-///                 4-bit (16-color) system and 24-bit colors. It contains properties for the red, green, and blue
-///                 components of the color.
-///                 The Color class also contains a static property for each of the 16 ANSI colors. Use
-///                 <see cref="SetAttribute"/> to change the colors used when drawing.</para>
-///                 <para>
-///                 </para>
-///                 <para>
-///                     Clipping enables better performance by ensuring on regions of the terminal that need to be drawn
-///                     actually get drawn by the ConsoleDriver. Terminal.Gui supports non-rectangular clip regions with
-///                     <see cref="Region"/>.
-///                     There is an <see cref="Application"/>-managed clip region. Developers cannot change this directly,
-///                     but can use <see cref="ClipFrame"/>, <see cref="ClipViewport"/>, and <see cref="SetClip"/> to
-///                     modify the clip region.
-///                 </para>
-///                 <para>
-///                     <see cref="LineCanvas"/> provides auto join, a smart TUI drawing system that automatically selects
-///                     the correct line/box drawing glyphs for intersections making drawing complex shapes easy.
-///                 </para>
-///                 <para>
-///                     A set of static properties are provided for the common glyphs used in TUI apps. See
-///                     <see cref="Glyphs"/>.
-///                 </para>
-///                 <para>
-///                     See the
-///                     <see href="../docs/drawing.html">
-///                         Drawing
-///                         Deep Dive
-///                     </see>
-///                     for more information.
-///                 </para>
-///             </description>
-///         </item>
-///         <item>
-///             <term>Text</term>
-///             <description>
-///                 <para>
-///                     A rich text formatting engine is provided in <see cref="TextFormatter"/>. TextFormatter provides
-///                     methods for formatting text with horizontal and vertical alignment, word wrapping, and hotkeys.
-///                 </para>
-///                 <para>
-///                     See the
-///                     <see href="../docs/navigation.html">
-///                         Navigation
-///                         Deep Dive
-///                     </see>
-///                     for more information.
-///                 </para>
-///             </description>
-///         </item>
-///         <item>
-///             <term>Navigation</term>
-///             <description>
-///                 <para>
-///                     Navigation refers to the user experience for moving focus between views in the application
-///                     view-hierarchy. Focus is a concept that is used to describe which View is currently receiving user
-///                     input. Only
-///                     Views that are
-///                     <see cref="Enabled"/>, <see cref="Visible"/>, and <see cref="CanFocus"/> will receive focus. NOTE:
-///                     <see cref="CanFocus"/> is <see langword="false"/> by default.
-///                 </para>
-///                 <para>
-///                     Views that are focusable should override <see cref="PositionCursor"/> to make sure that the cursor
-///                     is
-///                     placed in a location that makes sense. Some terminals do not have a way of hiding the cursor, so it
-///                     can be
-///                     distracting to have the cursor left at the last focused view. So views should make sure that they
-///                     place the
-///                     cursor in a visually sensible place. The default implementation of <see cref="PositionCursor"/>
-///                     will place the
-///                     cursor at either the hotkey (if defined) or <c>0,0</c>.
-///                 </para>
-///                 <para>
-///                     See the
-///                     <see href="../docs/navigation.html">
-///                         Navigation
-///                         Deep Dive
-///                     </see>
-///                     for more information.
-///                 </para>
-///             </description>
-///         </item>
-///         <item>
-///             <term>Scrolling</term>
-///             <description>
-///                 <para>
-///                     The ability to scroll content is built into View. The <see cref="Viewport"/> represents the
-///                     scrollable "viewport" into the View's Content Area (which is defined by the return value of
-///                     <see cref="GetContentSize"/>).
-///                 </para>
-///                 <para>
-///                     Terminal.Gui also provides the ability show a visual scroll bar that responds to mouse input. This
-///                     ability is not enabled by default given how precious TUI screen real estate is.
-///                     Use <see cref="VerticalScrollBar"/> and <see cref="HorizontalScrollBar"/> to enable this feature.
-///                 </para>
-///                 <para>
-///                     Use <see cref="ViewportSettings"/> to adjust the behavior of scrolling.
-///                 </para>
-///                 <para>
-///                     See the
-///                     <see href="../docs/scrolling.html">
-///                         Scrolling
-///                         Deep Dive
-///                     </see>
-///                     for more information.
-///                 </para>
-///             </description>
-///         </item>
-///     </list>
-///     <para>
-///         Views can opt in to more sophisticated initialization by implementing overrides to
-///         <see cref="ISupportInitialize.BeginInit"/> and <see cref="ISupportInitialize.EndInit"/> which will be called
-///         when the view is added to a <see cref="SuperView"/>.
-///     </para>
+///     drawing. In addition, View provides keyboard and mouse event handling.
 ///     <para>
-///         If first-run-only initialization is preferred, overrides to <see cref="ISupportInitializeNotification"/> can
-///         be implemented, in which case the <see cref="ISupportInitialize"/> methods will only be called if
-///         <see cref="ISupportInitializeNotification.IsInitialized"/> is <see langword="false"/>. This allows proper
-///         <see cref="View"/> inheritance hierarchies to override base class layout code optimally by doing so only on
-///         first run, instead of on every run.
+///         See the
+///         <see href="../docs/view.md">
+///             View
+///             Deep Dive
+///         </see>
+///         for more.
 ///     </para>
-///     <para>See <see href="../docs/keyboard.md"> for an overview of View keyboard handling.</see></para>
-/// </remarks>
+/// </summary>
 
 #endregion API Docs
 

+ 3 - 4
Terminal.Gui/Views/CharMap/CharMap.cs

@@ -10,7 +10,7 @@ namespace Terminal.Gui;
 ///     A scrollable map of the Unicode codepoints.
 /// </summary>
 /// <remarks>
-///     See <see href="CharacterMap/README.md"/> for details.
+///     See <see href="../docs/CharacterMap.md"/> for details.
 /// </remarks>
 public class CharMap : View, IDesignable
 {
@@ -20,7 +20,6 @@ public class CharMap : View, IDesignable
 
     private ContextMenu _contextMenu = new ();
 
-
     /// <summary>
     ///     Initializes a new instance.
     /// </summary>
@@ -62,7 +61,7 @@ public class CharMap : View, IDesignable
         KeyBindings.Add (ContextMenu.DefaultKey, Command.Context);
 
         MouseBindings.Add (MouseFlags.Button1DoubleClicked, Command.Accept);
-        MouseBindings.ReplaceCommands(MouseFlags.Button3Clicked, Command.Context);
+        MouseBindings.ReplaceCommands (MouseFlags.Button3Clicked, Command.Context);
         MouseBindings.ReplaceCommands (MouseFlags.Button1Clicked | MouseFlags.ButtonCtrl, Command.Context);
         MouseBindings.Add (MouseFlags.WheeledDown, Command.ScrollDown);
         MouseBindings.Add (MouseFlags.WheeledUp, Command.ScrollUp);
@@ -460,7 +459,6 @@ public class CharMap : View, IDesignable
 
     [RequiresUnreferencedCode ("AOT")]
     [RequiresDynamicCode ("AOT")]
-
     private bool? HandleAcceptCommand (ICommandContext? commandContext)
     {
         if (RaiseAccepting (commandContext) is true)
@@ -570,6 +568,7 @@ public class CharMap : View, IDesignable
             // Some unit tests invoke Accept without Init
             return;
         }
+
         UcdApiClient? client = new ();
         var decResponse = string.Empty;
         var getCodePointError = string.Empty;

+ 1 - 1
Terminal.Gui/Views/FrameView.cs

@@ -9,7 +9,7 @@ namespace Terminal.Gui;
 /// <remarks>
 ///     <para>
 ///         FrameView has <see cref="View.BorderStyle"/> set to <see cref="LineStyle.Single"/> and
-///         inherits it's color scheme from the <see cref="SuperView"/>.
+///         inherits it's color scheme from the <see cref="View.SuperView"/>.
 ///     </para>
 ///     <para>
 ///         

+ 4 - 4
Terminal.Gui/Views/TableView/CheckBoxTableSourceWrapper.cs

@@ -33,24 +33,24 @@ public abstract class CheckBoxTableSourceWrapperBase : ITableSource
     }
 
     /// <summary>
-    ///     Gets or sets the character to use for checked entries. Defaults to <see cref="GlyphDefinitions.CheckStateChecked"/>
+    ///     Gets or sets the character to use for checked entries. Defaults to <see cref="Glyphs.CheckStateChecked"/>
     /// </summary>
     public Rune CheckedRune { get; set; } = Glyphs.CheckStateChecked;
 
     /// <summary>
     ///     Gets or sets the character to use for checked entry when <see cref="UseRadioButtons"/> is true. Defaults to
-    ///     <see cref="GlyphDefinitions.Selected"/>
+    ///     <see cref="Glyphs.Selected"/>
     /// </summary>
     public Rune RadioCheckedRune { get; set; } = Glyphs.Selected;
 
     /// <summary>
     ///     Gets or sets the character to use for unchecked entries when <see cref="UseRadioButtons"/> is true. Defaults
-    ///     to <see cref="GlyphDefinitions.UnSelected"/>
+    ///     to <see cref="Glyphs.UnSelected"/>
     /// </summary>
     public Rune RadioUnCheckedRune { get; set; } = Glyphs.UnSelected;
 
     /// <summary>
-    ///     Gets or sets the character to use for UnChecked entries. Defaults to <see cref="GlyphDefinitions.CheckStateUnChecked"/>
+    ///     Gets or sets the character to use for UnChecked entries. Defaults to <see cref="Glyphs.CheckStateUnChecked"/>
     /// </summary>
     public Rune UnCheckedRune { get; set; } = Glyphs.CheckStateUnChecked;
 

+ 1 - 0
Terminal.sln.DotSettings

@@ -383,6 +383,7 @@
 	<s:Boolean x:Key="/Default/CodeStyle/EditorConfig/SyncToVisualStudio/@EntryValue">True</s:Boolean>
 	<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=LL/@EntryIndexedValue">LL</s:String>
 	<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=LR/@EntryIndexedValue">LR</s:String>
+	<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=UI/@EntryIndexedValue">UI</s:String>
 	<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=UL/@EntryIndexedValue">UL</s:String>
 	<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=UR/@EntryIndexedValue">UR</s:String>
 	<s:Boolean x:Key="/Default/CodeStyle/Naming/CSharpNaming/ApplyAutoDetectedRules/@EntryValue">False</s:Boolean>

+ 0 - 3
UICatalog/Scenarios/CharacterMap/CharacterMap.cs

@@ -14,9 +14,6 @@ namespace UICatalog.Scenarios;
 ///     "Character Map" application (like Windows' charmap.exe). - Helps test unicode character rendering in Terminal.Gui -
 ///     Illustrates how to do infinite scrolling
 /// </summary>
-/// <remarks>
-///     See <see href="CharacterMap/README.md"/>.
-/// </remarks>
 [ScenarioMetadata ("Character Map", "Unicode viewer. Demos infinite content drawing and scrolling.")]
 [ScenarioCategory ("Text and Formatting")]
 [ScenarioCategory ("Drawing")]

+ 1 - 0
UICatalog/Scenarios/Clipping.cs

@@ -9,6 +9,7 @@ namespace UICatalog.Scenarios;
 [ScenarioCategory ("Layout")]
 [ScenarioCategory ("Arrangement")]
 [ScenarioCategory ("Tests")]
+[ScenarioCategory ("Drawing")]
 public class Clipping : Scenario
 {
     private int _hotkeyCount;

+ 0 - 1
UICatalog/Scenarios/Editors/EventLog.cs

@@ -10,7 +10,6 @@ namespace UICatalog.Scenarios;
 /// </summary>
 /// <remarks>
 /// </remarks>
-/// </example>
 public class EventLog : ListView
 {
     public EventLog ()

+ 0 - 5
UICatalog/UICatalog.cs

@@ -1,11 +1,9 @@
 global using Attribute = Terminal.Gui.Attribute;
-global using CM = Terminal.Gui.ConfigurationManager;
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.CommandLine;
 using System.CommandLine.Builder;
-using System.CommandLine.Help;
 using System.CommandLine.Parsing;
 using System.Data;
 using System.Diagnostics;
@@ -18,10 +16,7 @@ using System.Runtime.InteropServices;
 using System.Text;
 using System.Text.Json;
 using System.Text.Json.Serialization;
-using System.Threading;
-using System.Threading.Tasks;
 using Terminal.Gui;
-using UICatalog.Scenarios;
 using static Terminal.Gui.ConfigurationManager;
 using Command = Terminal.Gui.Command;
 using RuntimeEnvironment = Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment;

+ 3 - 0
UnitTests/Application/ApplicationScreenTests.cs

@@ -8,6 +8,7 @@ public class ApplicationScreenTests (ITestOutputHelper output)
     public void ClearScreenNextIteration_Resets_To_False_After_LayoutAndDraw ()
     {
         // Arrange
+        Application.ResetState (true);
         Application.Init ();
 
         // Act
@@ -64,6 +65,8 @@ public class ApplicationScreenTests (ITestOutputHelper output)
         Application.Top.Dispose ();
         Application.Top = null;
         Application.Shutdown ();
+        Application.ResetState (true);
+
     }
 
     [Fact]

+ 4 - 2
UnitTests/Configuration/SettingsScopeTests.cs

@@ -30,6 +30,7 @@ public class SettingsScopeTests
 
         // clean up
         Locations = ConfigLocations.All;
+        Reset ();
     }
 
     [Fact]
@@ -63,7 +64,7 @@ public class SettingsScopeTests
         Assert.Equal (Key.F, Application.NextTabGroupKey);
         Assert.Equal (Key.B, Application.PrevTabGroupKey);
 
-        Locations = ConfigLocations.Default;
+        Locations = ConfigLocations.All;
         Reset ();
 
     }
@@ -109,6 +110,7 @@ public class SettingsScopeTests
         Assert.True (Settings ["Themes"].PropertyValue is Dictionary<string, ThemeScope>);
         Assert.Single ((Dictionary<string, ThemeScope>)Settings ["Themes"].PropertyValue);
 
-        Locations = savedLocations;
+        Locations = ConfigLocations.All;
+        Reset ();
     }
 }

+ 0 - 0
UICatalog/Scenarios/CharacterMap/README.md → docfx/docs/CharacterMap.md


+ 2 - 2
docfx/docs/arrangement.md

@@ -5,9 +5,9 @@ Terminal.Gui provides a feature of Layout known as **Arrangement**, which contro
 
 * **Arrangement** - Describes the feature of [Layout](layout.md) which controls how the user can use the mouse and keyboard to arrange views and enables either **Tiled** or **Overlapped** layouts.
 
-* **Arrange Mode** - The Arrange Modes are set via @Terminal.Gui.View.ViewArrangement. When a user presses `Ctrl+F5` (configurable via the @Terminal.Gui.Application.ArrangeKey) the application goes into **Arrange Mode**. In this mode, indicators are displayed on an arrangeable view indicating which aspect of the View can be arranged. If @Terminal.Gui.ViewArrangement.Movable, a `◊` will be displayed in the top-left corner of the @Terminal.Gui.View.Border. If @Terminal.Gui.ViewArrangement.Resizable , pressing `Tab` (or `Shift+Tab`) will cycle to an an indictor in the bottom-right corner of the Border. The up/down/left/right cursor keys will act appropriately. `Esc`, `Ctrl+F5` or clicking outside of the Border will exit Arrange Mode.
+* **Arrange Mode** - The Arrange Modes are set via the @Terminal.Gui.View.Arrangement property. When a user presses `Ctrl+F5` (configurable via the @Terminal.Gui.Application.ArrangeKey property) the application goes into **Arrange Mode**. In this mode, indicators are displayed on an arrangeable view indicating which aspect of the View can be arranged. If @Terminal.Gui.ViewArrangement.Movable, a `◊` will be displayed in the top-left corner of the @Terminal.Gui.View.Border. If @Terminal.Gui.ViewArrangement.Resizable, pressing `Tab` (or `Shift+Tab`) will cycle to an an indictor in the bottom-right corner of the Border. The up/down/left/right cursor keys will act appropriately. `Esc`, `Ctrl+F5` or clicking outside of the Border will exit Arrange Mode.
 
-* **Modal** - A modal view is one that is run as an "application" via @Terminal.Gui.Application.Run(System.Func{System.Exception,System.Boolean},Terminal.Gui.ConsoleDriver) where `Modal == true`. `Dialog`, `Messagebox`, and `Wizard` are the prototypical examples. When run this way, there IS a `z-order` but it is highly-constrained: the modal view has a z-order of 1 and everything else is at 0. 
+* **Modal** - A modal view is one that is run as an "application" via @Terminal.Gui.Application.Run(System.Func{System.Exception,System.Boolean},Terminal.Gui.IConsoleDriver) where `Modal == true`. `Dialog`, `Messagebox`, and `Wizard` are the prototypical examples. When run this way, there IS a `z-order` but it is highly-constrained: the modal view has a z-order of 1 and everything else is at 0. 
 
 * **Movable** - Describes a View that can be moved by the user using the keyboard or mouse. **Movable** is enabled on a per-View basis by setting the @Terminal.Gui.ViewArrangement.Movable flag on @Terminal.Gui.View.Arrangement. Dragging on the top @Terminal.Gui.View.Border of a View will move such a view. Pressing `Ctrl+F5` will activate **Arrange Mode** letting the user move the view with the up/down/left/right cursor keys.
 

+ 18 - 16
docfx/docs/config.md

@@ -26,13 +26,14 @@ Settings are applied using the following precedence (higher precedence settings
 
 7. @Terminal.Gui.ConfigLocations.GlobalCurrent - Global settings in the directory the app was launched from (`./.tui/config.json`) --- Hightest precedence.
 
-The `UI Catalog` application provides an example of how to use the [`ConfigurationManager`](~/api/Terminal.Gui.ConfigurationManager.yml) class to load and save configuration files. The `Configuration Editor` scenario provides an editor that allows users to edit the configuration files. UI Catalog also uses a file system watcher to detect changes to the configuration files to tell [`ConfigurationManager`](~/api/Terminal.Gui.ConfigurationManager.yml) to reload them; allowing users to change settings without having to restart the application.
+The `UICatalog` application provides an example of how to use the [`ConfigurationManager`](~/api/Terminal.Gui.ConfigurationManager.yml) class to load and save configuration files. The `Configuration Editor` scenario provides an editor that allows users to edit the configuration files. UI Catalog also uses a file system watcher to detect changes to the configuration files to tell [`ConfigurationManager`](~/api/Terminal.Gui.ConfigurationManager.yml) to reload them; allowing users to change settings without having to restart the application.
 
 # What Can Be Configured
 
 ## Settings
 
-(Note, this list may not be complete; search the source code for `SerializableConfigurationProperty` to find all settings that can be configured.)
+> [!IMPORTANT]
+> This list is not complete; search the source code for `SerializableConfigurationProperty` to find all settings that can be configured.
 
   * @Terminal.Gui.Application.QuitKey
   * @Terminal.Gui.Application.NextTabKey
@@ -44,9 +45,14 @@ The `UI Catalog` application provides an example of how to use the [`Configurati
   * @Terminal.Gui.Application.Force16Colors
   * @Terminal.Gui.Application.IsMouseDisabled
   
-## Glyphs
 
-The standard set of glyphs used for standard views (e.g. the default indicator for [Button](~/api/Terminal.Gui.Button.yml)) and line drawing (e.g. [LineCanvas](~/api/Terminal.Gui.LineCanvas.yml)) can be configured.
+## Themes
+
+A Theme is a named collection of settings that impact the visual style of Terminal.Gui applications. The default theme is named "Default". The built-in configuration within the Terminal.Gui library defines two more themes: "Dark", and "Light". Additional themes can be defined in the configuration files. The JSON property `Theme` defines the name of the theme that will be used. If the theme is not found, the default theme will be used.
+
+Themes support defining ColorSchemes as well as various default settings for Views. Both the default color schemes and user-defined color schemes can be configured. See [ColorSchemes](~/api/Terminal.Gui.Colors.yml) for more information.
+
+Themes support changing the standard set of glyphs used by views (e.g. the default indicator for [Button](~/api/Terminal.Gui.Button.yml)) and line drawing (e.g. [LineCanvas](~/api/Terminal.Gui.LineCanvas.yml)).
 
 The value can be either a decimal number or a string. The string may be:
 
@@ -55,23 +61,19 @@ The value can be either a decimal number or a string. The string may be:
 - A hex value in UTF-16 format (e.g. "\\u2611")
 
 ```json
-  "Glyphs": {
-    "RightArrow": "►",
-    "LeftArrow": "U+25C4",
-    "DownArrow": "\\u25BC",
-    "UpArrow": 965010
-  }
+  "Glyphs.RightArrow": "►",
+  "Glyphs.LeftArrow": "U+25C4",
+  "Glyphs.DownArrow": "\\u25BC",
+  "Glyphs.UpArrow": 965010
 ```
 
-## Themes
-
-A Theme is a named collection of settings that impact the visual style of Terminal.Gui applications. The default theme is named "Default". The built-in configuration within the Terminal.Gui library defines two more themes: "Dark", and "Light". Additional themes can be defined in the configuration files. The JSON property `Theme` defines the name of the theme that will be used. If the theme is not found, the default theme will be used.
-
-Themes support defining ColorSchemes as well as various default settings for Views. Both the default color schemes and user-defined color schemes can be configured. See [ColorSchemes](~/api/Terminal.Gui.Colors.yml) for more information.
-
+The `UI Catalog` application defines a `UICatlog` Theme. Look at the UI Catalog's `./Resources/config.json` file to see how to define a theme.
 
 # Key Bindings
 
+> [!WARNING]
+>  Configuration Manager support for key bindings is not yet implemented.
+
 Key bindings are defined in the `KeyBindings` property of the configuration file. The value is an array of objects, each object defining a key binding. The key binding object has the following properties:
 
 - `Key`: The key to bind to. The format is a string describing the key (e.g. "q", "Q,  "Ctrl+Q"). Function keys are specified as "F1", "F2", etc. 

+ 3 - 0
docfx/docs/cursor.md

@@ -1,5 +1,8 @@
 # Proposed Design for a modern Cursor system in v2
 
+> [!IMPORTANT]
+> This document is a work in progress and does not represent the final design or even the current implementation.
+
 See end for list of issues this design addresses.
 
 ## Tenets for Cursor Support (Unless you know better ones...)

+ 17 - 13
docfx/docs/drawing.md

@@ -6,30 +6,30 @@ Color is supported on all platforms, including Windows, Mac, and Linux. The defa
 
 ## View Drawing API
 
-Terminal.Gui apps draw using the @Terminal.Gui.View.Move and @Terminal.Gui.View.AddRune APIs. @Terminal.Gui.View.Move selects the column and row of the @Terminal.Gui.Cell and @Terminal.Gui.AddRune places the specified glyph in that cell using the @Terminal.Gui.Attribute that was most recently set via @Terminal.Gui.SetAttribute. The @Terminal.Gui.ConsoleDriver caches all changed Cells and efficiently outputs them to the terminal each iteration of the Application. In other words, Terminal.Gui uses deferred rendering. 
+Terminal.Gui apps draw using the @Terminal.Gui.View.Move(System.Int32,System.Int32) and @Terminal.Gui.View.AddRune(System.Text.Rune) APIs. Move selects the column and row of the cell and AddRune places the specified glyph in that cell using the @Terminal.Gui.Attribute that was most recently set via @Terminal.Gui.View.SetAttribute(Terminal.Gui.Attribute). The @Terminal.Gui.ConsoleDriver caches all changed Cells and efficiently outputs them to the terminal each iteration of the Application. In other words, Terminal.Gui uses deferred rendering. 
 
 Outputting unformatted text involves:
 
-a) Moving the draw cursor using @Terminal.Gui.View.Move.
-b) Setting the attributes using @Terminal.Gui.View.SetAttribute.
-c) Outputting glyphs by calling @Terminal.Gui.View.AddRune or @Terminal.Gui.View.AddStr.
+1) Moving the draw cursor using @Terminal.Gui.View.Move(System.Int32,System.Int32).
+2) Setting the attributes using @Terminal.Gui.View.SetAttribute(Terminal.Gui.Attribute).
+3) Outputting glyphs by calling @Terminal.Gui.View.AddRune(System.Text.Rune) or @Terminal.Gui.View.AddStr(System.String) .
 
 Outputting formatted text involves:
 
-a) Adding the text to a @Terminal.Gui.TextFormatter object.
-b) Setting formatting options, such as @Terminal.Gui.TextFormatter.TextAlignment.
-c) Calling @Terminal.Gui.TextFormatter.Draw.
+1) Adding the text to a @Terminal.Gui.TextFormatter object.
+2) Setting formatting options, such as @Terminal.Gui.TextFormatter.Alignment.
+3) Calling @Terminal.Gui.TextFormatter.Draw(System.Drawing.Rectangle,Terminal.Gui.Attribute,Terminal.Gui.Attribute,System.Drawing.Rectangle,Terminal.Gui.IConsoleDriver).
 
 Line drawing is accomplished using the @Terminal.Gui.LineCanvas API:
 
-a) Add the lines via @Terminal.Gui.LineCanvas.Add.
-b) Either render the line canvas via @Terminal.Gui.LineCanvas.GetMap() or let the @Terminal.Gui.View do so automatically (which enables automatic line joining across Views).
+1) Add the lines via @Terminal.Gui.LineCanvas.AddLine(System.Drawing.Point,System.Int32,Terminal.Gui.Orientation,Terminal.Gui.LineStyle,System.Nullable{Terminal.Gui.Attribute}).
+2) Either render the line canvas via @Terminal.Gui.LineCanvas.GetMap or let the @Terminal.Gui.View do so automatically (which enables automatic line joining across Views).
 
 ### Drawing occurs each MainLoop Iteration
 
 The @Terminal.Gui.Application MainLoop will iterate over all Views in the view hierarchy, starting with @Terminal.Gui.Application.Toplevels. The @Terminal.Gui.View.Draw method will be called which, in turn:
 
-0) Determines if @Terminal.Gui.View.NeedsDraw or @Terminal.Gui.View.SubviewsNeedsDraw are set. If neither is set, processing stops.
+0) Determines if @Terminal.Gui.View.NeedsDraw or @Terminal.Gui.View.SubviewNeedsDraw are set. If neither is set, processing stops.
 1) Sets the clip to the view's Frame.
 2) Draws the @Terminal.Gui.View.Border and @Terminal.Gui.View.Padding (but NOT the Margin).
 3) Sets the clip to the view's Viewport.
@@ -55,7 +55,11 @@ If a View need to redraw because something changed within it's Content Area it c
 
 ### Clipping
 
-Clipping enables better performance by ensuring on regions of the terminal that need to be drawn actually get drawn by the @Terminal.Gui.ConsoleDriver. Terminal.Gui supports non-rectangular clip regions with @Terminal.Gui.Region. @Terminal.Gui.ConsoleDriver.Clip is the application managed clip region and is managed by @Terminal.Gui.Application. Developers cannot change this directly, but can use @Terminal.Gui.Application.ClipToScreen, @Terminal.Gui.Application.SetClip(Region), @Terminal.Gui.View.ClipToFrame, and @Terminal.Gui.ClipToViewPort.
+> [!IMPORTANT]
+> Clipping is still under development and the API is subject to change.
+
+
+Clipping enables better performance and features like transparent margins by ensuring regions of the terminal that need to be drawn actually get drawn by the @Terminal.Gui.ConsoleDriver. Terminal.Gui supports non-rectangular clip regions with @Terminal.Gui.Region. @Terminal.Gui.ConsoleDriver.Clip is the application managed clip region and is managed by @Terminal.Gui.Application. Developers cannot change this directly, but can use @Terminal.Gui.View.ClipToScreen, @Terminal.Gui.View.SetClip(Region), @Terminal.Gui.View.ClipToFrame, and @Terminal.Gui.ClipToViewPort.
 
 ## Coordinate System for Drawing
 
@@ -110,7 +114,7 @@ Terminal.Gui supports text formatting using @Terminal.Gui.View.TextFormatter. @T
 
 ## Glyphs
 
-Terminal.Gui supports rendering glyphs using the @Terminal.Gui.Glyph class. The @Terminal.Gui.Glyph class represents a single glyph. It contains a character and an attribute. The character is of type `Rune` and the attribute is of type @Terminal.Gui.Attribute. A set of static properties are provided for the standard glyphs used for standard views (e.g. the default indicator for @Terminal.Gui.Button) and line drawing (e.g. @Terminal.Gui.LineCanvas).
+The @Terminal.Gui.Glyphs class defines the common set of glyphs used to draw checkboxes, lines, borders, etc... The default glyphs can be changed per-ThemeScope via @Terminal.Gui.ConfigurationManager. 
 
 ## Line Drawing
 
@@ -124,4 +128,4 @@ See [View Deep Dive](View.md) for details.
 
 ## Diagnostics
 
-The @Terminal.Gui.ViewDiagnostics.DisplayIndicator flag can be set on @Terminal.Gui.View.Diagnostics to cause an animated glyph to appear in the `Border` of each View. The glyph will animate each time that View's `Draw` method is called where either @Terminal.Gui.View.NeedsDraw or @Terminal.Gui.View.SubviewNeedsDraw is set. 
+The @Terminal.Gui.ViewDiagnostics.DisplayIndicator flag can be set on @Terminal.Gui.View.Diagnostics to cause an animated glyph to appear in the `Border` of each View. The glyph will animate each time that View's `Draw` method is called where either @Terminal.Gui.View.NeedsDraw or @Terminal.Gui.View.SubViewNeedsDraw is set. 

+ 1 - 1
docfx/docs/index.md

@@ -53,7 +53,7 @@ This example shows a prompt and returns an integer value depending on which valu
 
 More interesting user interfaces can be created by composing some of the various `View` classes that are included. 
 
-In the example above, [Application.Init()](xref:Terminal.Gui.Application.Init(Terminal.Gui.ConsoleDriver,System.String)) sets up the environment, initializes the color schemes, and clears the screen to start the application.
+In the example above, @Terminal.Gui.Application.Init(Terminal.Gui.IConsoleDriver,System.String) sets up the environment, initializes the color schemes, and clears the screen to start the application.
 
 The [Application](~/api/Terminal.Gui.Application.yml) class additionally creates an instance of the [Toplevel](~/api/Terminal.Gui.Toplevel.yml) View available in the `Application.Top` property, and can be used like this:
 

+ 9 - 9
docfx/docs/keyboard.md

@@ -19,14 +19,14 @@ Tenets higher in the list have precedence over tenets lower in the list.
 *Terminal.Gui* provides the following APIs for handling keyboard input:
 
 * **Key** - @Terminal.Gui.Key provides a platform-independent abstraction for common keyboard operations. It is used for processing keyboard input and raising keyboard events. This class provides a high-level abstraction with helper methods and properties for common keyboard operations. Use this class instead of the low-level `KeyCode` enum when possible.
-* **Key Bindings** - Key Bindings provide a declarative method for handling keyboard input in View implementations. The View calls @Terminal.Gui.AddCommand to declare it supports a particular command and then uses @Terminal.Gui.KeyBindings to indicate which key presses will invoke the command. 
+* **Key Bindings** - Key Bindings provide a declarative method for handling keyboard input in View implementations. The View calls Terminal.Gui.View.AddCommand(Terminal.Gui.Command,System.Func{System.Nullable{System.Boolean}}) to declare it supports a particular command and then uses @Terminal.Gui.KeyBindings to indicate which key presses will invoke the command. 
 * **Key Events** - The Key Bindings API is rich enough to support the vast majority of use-cases. However, in some cases subscribing directly to key events is needed (e.g. when capturing arbitrary typing by a user). Use @Terminal.Gui.View.KeyDown and related events in these cases.
 
 Each of these APIs are described more fully below.
 
 ### **[Key Bindings](~/api/Terminal.Gui.KeyBindings.yml)**
 
-Key Bindings is the preferred way of handling keyboard input in View implementations. The View calls @Terminal.Gui.AddCommand to declare it supports a particular command and then uses @Terminal.Gui.KeyBindings to indicate which key presses will invoke the command. For example, if a View wants to respond to the user pressing the up arrow key to scroll up it would do this
+Key Bindings is the preferred way of handling keyboard input in View implementations. The View calls @Terminal.Gui.View.AddCommand(Terminal.Gui.Command,System.Func{System.Nullable{System.Boolean}}) to declare it supports a particular command and then uses @Terminal.Gui.KeyBindings to indicate which key presses will invoke the command. For example, if a View wants to respond to the user pressing the up arrow key to scroll up it would do this
 
 ```cs
 public MyView : View
@@ -54,7 +54,7 @@ Key Bindings can be added at the `Application` or `View` level.
 
 For **Application-scoped Key Bindings** there are two categories of Application-scoped Key Bindings:
 
-1) **Application Command Key Bindings** - Bindings for `Command`s supported by @Terminal.Gui.Application. For example, @Terminal.Gui.Application.QuitKey, which is bound to `Command.Quit` and results in @Terminal.Gui.Application.RequestStop being called.
+1) **Application Command Key Bindings** - Bindings for `Command`s supported by @Terminal.Gui.Application. For example, @Terminal.Gui.Application.QuitKey, which is bound to `Command.Quit` and results in @Terminal.Gui.Application.RequestStop(Terminal.Gui.Toplevel) being called.
 2) **Application Key Bindings** - Bindings for `Command`s supported on arbitrary `Views` that are meant to be invoked regardless of which part of the application is visible/active. 
 
 Use @Terminal.Gui.Application.KeyBindings to add or modify Application-scoped Key Bindings.
@@ -84,20 +84,20 @@ The Command can be invoked even if the `View` that defines them is not focused o
 
 ### **Key Events**
 
-Keyboard events are retrieved from [Console Drivers](drivers.md) each iteration of the [Application](~/api/Terminal.Gui.Application.yml) [Main Loop](mainloop.md). The console driver raises the @Terminal.Gui.ConsoleDriver.KeyDown and @Terminal.Gui.ConsoleDriver.KeyUp events which invoke @Terminal.Gui.Application.RaiseKeyDown(Terminal.Gui.Key) and @Terminal.Gui.Application.RaiseKeyUp(Terminal.Gui.Key) respectively.
+Keyboard events are retrieved from [Console Drivers](drivers.md) each iteration of the [Application](~/api/Terminal.Gui.Application.yml) [Main Loop](mainloop.md). The console driver raises the @Terminal.Gui.ConsoleDriver.KeyDown and @Terminal.Gui.ConsoleDriver.KeyUp events which invoke @Terminal.Gui.Application.RaiseKeyDownEvent(Terminal.Gui.Key) and @Terminal.Gui.Application.RaiseKeyUpEvent(Terminal.Gui.Key) respectively.
 
-    NOTE: Not all drivers/platforms support sensing distinct KeyUp events. These drivers will simulate KeyUp events by raising @Terminal.Gui.ConsoleDriver.KeyUp after @Terminal.Gui.ConsoleDriver.KeyDown.
+> [!NOTE]
+> Not all drivers/platforms support sensing distinct KeyUp events. These drivers will simulate KeyUp events by raising KeyUp after KeyDown.
+ 
 
[email protected](Terminal.Gui.Key) raises @Terminal.Gui.Application.KeyDown and then calls @Terminal.Gui.View.NewKeyDownEvent(Terminal.Gui.Key) on all toplevel Views. If no View handles the key event, any Application-scoped key bindings will be invoked.
-
[email protected](Terminal.Gui.Key) raises @Terminal.Gui.Application.KeyDown and then calls @Terminal.Gui.View.NewKeyUpEvent(Terminal.Gui.Key) on all toplevel Views.
[email protected](Terminal.Gui.Key) raises @Terminal.Gui.Application.KeyDown and then calls @Terminal.Gui.View.NewKeyDownEvent(Terminal.Gui.Key) on all toplevel Views. If no View handles the key event, any Application-scoped key bindings will be invoked.
 
 If a view is enabled, the @Terminal.Gui.View.NewKeyDownEvent(Terminal.Gui.Key) method will do the following: 
 
 1) If the view has a subview that has focus, 'NewKeyDown' on the focused view will be called. This is recursive. If the most-focused view handles the key press, processing stops.
 2) If there is no most-focused sub-view, or a most-focused sub-view does not handle the key press, @Terminal.Gui.View.OnKeyDown(Terminal.Gui.Key) will be called. If the view handles the key press, processing stops.
 3) If @Terminal.Gui.View.OnKeyDown(Terminal.Gui.Key) does not handle the event. @Terminal.Gui.View.KeyDown will be raised.
-4) If the view does not handle the key down event, any bindings for the key will be invoked (see @Terminal.Gui.View.KeyBindings). If the key is bound and any of it's command handlers return true, processing stops.
+4) If the view does not handle the key down event, any bindings for the key will be invoked (see the @Terminal.Gui.View.KeyBindings property). If the key is bound and any of it's command handlers return true, processing stops.
 5) If the key is not bound, or the bound command handlers do not return true, @Terminal.Gui.View.OnKeyDownNotHandled(Terminal.Gui.Key) is called. 
 
 ## **Application Key Handling**

+ 2 - 2
docfx/docs/mouse.md

@@ -13,14 +13,14 @@ Tenets higher in the list have precedence over tenets lower in the list.
 *Terminal.Gui* provides the following APIs for handling mouse input:
 
 * **MouseEventArgs** - @Terminal.Gui.MouseEventArgs provides a platform-independent abstraction for common mouse operations. It is used for processing mouse input and raising mouse events.
-* **Mouse Bindings** - Mouse Bindings provide a declarative method for handling mouse input in View implementations. The View calls @Terminal.Gui.AddCommand to declare it supports a particular command and then uses @Terminal.Gui.MouseBindings to indicate which mouse events will invoke the command. 
+* **Mouse Bindings** - Mouse Bindings provide a declarative method for handling mouse input in View implementations. The View calls Terminal.Gui.View.AddCommand(Terminal.Gui.Command,System.Func{System.Nullable{System.Boolean}}) to declare it supports a particular command and then uses @Terminal.Gui.MouseBindings to indicate which mouse events will invoke the command. 
 * **Mouse Events** - The Mouse Bindings API is rich enough to support the  majority of use-cases. However, in some cases subscribing directly to key events is needed (e.g. drag & drop). Use @Terminal.Gui.View.MouseEvent and related events in these cases.
 
 Each of these APIs are described more fully below.
 
 ## Mouse Bindings
 
-Mouse Bindings is the preferred way of handling mouse input in View implementations. The View calls @Terminal.Gui.AddCommand to declare it supports a particular command and then uses @Terminal.Gui.MouseBindings to indicate which mouse events will invoke the command. For example, if a View wants to respond to the user using the mouse wheel to scroll up, it would do this:
+Mouse Bindings is the preferred way of handling mouse input in View implementations. The View calls Terminal.Gui.View.AddCommand(Terminal.Gui.Command,System.Func{System.Nullable{System.Boolean}}) to declare it supports a particular command and then uses @Terminal.Gui.MouseBindings to indicate which mouse events will invoke the command. For example, if a View wants to respond to the user using the mouse wheel to scroll up, it would do this:
 
 ```cs
 public MyView : View

+ 13 - 497
docfx/docs/navigation.md

@@ -35,8 +35,6 @@ Tenets higher in the list have precedence over tenets lower in the list.
 
 * **Decouple Concepts** - In v1 `CanFocus` is tightly coupled with `HasFocus`, `TabIndex`, `TabIndexes`, and `TabStop` and vice-versa. There was a bunch of "magic" logic that automatically attempted to keep these concepts aligned. This resulted in a poorly specified, hard-to-test, and fragile API. In v2 we strive to keep the related navigation concepts decoupled. For example, `CanFocus` and `TabStop` are decoupled. A view with `CanFocus == true` can have `TabStop == NoStop` and still be focusable with the mouse.
 
-# Design
-
 ## Keyboard Navigation
 
 The majority of the Terminal.Gui Navigation system is dedicated to enabling the keyboard to be used to navigate Views. 
@@ -56,13 +54,13 @@ Terminal.Gui defines these keys for keyboard navigation:
 
 These keys are all registered as `KeyBindingScope.Application` key bindings by `Application`. Because application-scoped key bindings have the lowest priority, Views can override the behaviors of these keys (e.g. `TextView` overrides `Key.Tab` by default, enabling the user to enter `\t` into text). The `AllViews_AtLeastOneNavKey_Leaves` unit test ensures all built-in Views have at least one of the above keys that can advance. 
 
-### `HotKey`
+### HotKeys
 
 See also [Keyboard](keyboard.md) where HotKey is covered more deeply...
 
-In v2, `HotKey`s can be used to navigate across the entire application view-hierarchy. They work independently of `Focus`. This enables a user to navigate across a complex UI of nested subviews if needed (even in overlapped scenarios). An example use case is the `AllViewsTester` scenario.
+`HotKeys` can be used to navigate across the entire application view-hierarchy. They work independently of `Focus`. This enables a user to navigate across a complex UI of nested subviews if needed (even in overlapped scenarios). An example use case is the `AllViewsTester` Scenario.
 
-Additionally, in v2, multiple Views in an application (even within the same SuperView) can have the same HotKey. Each press of the HotKey will invoke the next HotKey across the View hierarchy (NOT IMPLEMENTED YET see https://github.com/gui-cs/Terminal.Gui/issues/3554).
+Additionally, multiple Views in an application (even within the same SuperView) can have the same HotKey. Each press of the HotKey will invoke the next HotKey across the View hierarchy (NOT IMPLEMENTED YET see https://github.com/gui-cs/Terminal.Gui/issues/3554).
 
 ## Mouse Navigation
 
@@ -80,21 +78,15 @@ If the View was not previously focused, `AdvanceFocus()` is called.
 
 For this to work properly, there must be logic that removes the focus-cache used by `RestoreFocus()` if something changes that makes the previously-focusable view not focusable (e.g. if Visible has changed).
 
-## `Application`
-
-At the application level, navigation is encapsulated within the `ApplicationNavigation` helper class which is publicly exposed via the `Application.Navigation` property.
-
-### `Application.Navigation.GetFocused ()`
+## Application Level Navigation
 
-Gets the most-focused View in the application. Will return `null` if there is no view with focus (an extremely rare situation). This replaces `View.MostFocused` in v1.
+At the application level, navigation is encapsulated within the @Terminal.Gui.ApplicationNavigation helper class which is publicly exposed via the @Terminal.Gui.Application.Navigation property.
 
-### `Application.Navigation.FocusedChanged` and `Application.Navigation.FocusedChanging`
[email protected] gets the most-focused View in the application. Will return `null` if there is no view with focus (an extremely rare situation). This replaces `View.MostFocused` in v1.
 
-Events raised when the most-focused View in the application is changing or has changed. `FocusedChanged` is useful for apps that want to do something with the most-focused view (e.g. see `AdornmentsEditor`). `FocusChanging` is useful apps that want to override what view can be focused across an entire app. 
+The @Terminal.Gui.ApplicationNavigation.FocusedChanged and @Terminal.Gui.ApplicationNavigation.FocusedChanging events are raised when the most-focused View in the application is changing or has changed. `FocusedChanged` is useful for apps that want to do something with the most-focused view (e.g. see `AdornmentsEditor`). `FocusChanging` is useful apps that want to override what view can be focused across an entire app. 
 
-### `Application.Navigation.AdvanceFocus (NavigationDirection direction, TabBehavior? behavior)`
-
-Causes the focus to advance (forward or backwards) to the next View in the application view-hierarchy, using `behavior` as a filter.
+The @Terminal.Gui.ApplicationNavigation.AdvanceFocus(Terminal.Gui.NavigationDirection,System.Nullable{Terminal.Gui.TabBehavior}) method causes the focus to advance (forward or backwards) to the next View in the application view-hierarchy, using `behavior` as a filter.
 
 The implementation is simple:
 
@@ -106,10 +98,11 @@ This method is called from the `Command` handlers bound to the application-scope
 
 This method replaces about a dozen functions in v1 (scattered across `Application` and `Toplevel`).
 
-## `View`
+## View Level Navigation
 
-At the View-level, navigation is encapsulated within `View.Navigation.cs`.
+@Terminal.Gui.View.AdvanceFocus(Terminal.Gui.NavigationDirection,System.Nullable{Terminal.Gui.TabBehavior}) is the primary method for developers to cause a view to gain or lose focus.
 
+Various events are raised when a View's focus is changing. For example, @Terminal.Gui.View.HasFocusChanging and @Terminal.Gui.View.HasFocusChanged.
 
 ## What makes a View focusable?
 
@@ -173,41 +166,9 @@ In v2, developers need to explicitly set `CanFocus` for any view in the view-hie
 
 In v2, the automatic setting of `TabStop` in `Add` is retained because it is not overly complex to do so and is a nice convenience for developers to not have to set both `Tabstop` and `CanFocus`. Note we do NOT automatically change `CanFocus` if `TabStop` is changed.
 
-## Overriding `HasFocus` changes - `OnEnter/OnLeave` and `Enter/Leave`
-
-These virtual methods and events are raised when a View's `HasFocus` property is changing. In v1 they were poorly defined and weakly implemented. For example, `OnEnter` was `public virtual OnEnter` and it raised `Enter`. This meant overrides needed to know that the base raised the event and remember to call base. Poor API design. 
-
-`FocusChangingEventArgs.Handled` in v1 was documented as
-
-```cs
-    /// <summary>
-    ///     Indicates if the current focus event has already been processed and the driver should stop notifying any other
-    ///     event subscriber. It's important to set this value to true specially when updating any View's layout from inside the
-    ///     subscriber method.
-    /// </summary>
-```
-
-This is clearly copy/paste documentation from keyboard code and describes incorrect behavior. In practice this is not what the implementation does. Instead the system never even checks the return value of `OnEnter` and `OnLeave`.
+## Knowing When a View's Focus is Changing
 
-Additionally, in v1 `private void SetHasFocus (bool newHasFocus, View view, bool force = false)` is confused too complex. 
-
-In v2, `SetHasFocus ()` is replaced by `private bool EnterFocus (View view)` and `private bool LeaveFocus (View view)`. These methods follow the standard virtual/event pattern:
-
-- Check pre-conditions:
-    - For `EnterFocus` - If the view is not focusable (not visible, not enabled, or `CanFocus == false`) returns `true` indicating the change was cancelled.
-    - For `EnterFocus` - If `CanFocus == true` but the `SuperView.CanFocus == false` throws an invalid operation exception.
-    - For `EnterFocus` - If `HasFocus` is already `true` throws an invalid operation exception.
-    - For `LeaveFocus` - If `HasFocus` is already `false` throws an invalid operation exception.
-- Call the `protected virtual bool OnEnter/OnLeave (View?)` method. If the return value is `true` stop and return `true`, preventing the focus change. The base implementations of these simply return `false`.
-- Otherwise, raise the cancelable event (`Enter`/`Leave`). If `args.Cancel == true` stop and return `true`, preventing the focus change. 
-- Check post-conditions: If `HasFocus` has not changed, throw an invalid operation exception.
-- Return `false` indicating the change was not cancelled (or invalid).
-
-The `Enter` and `Leave` events use `FocusChangingEventArgs` which provides both the old and new Views. `FocusChangingEventArgs.Handled` changes to `Cancel` to be more clear on intent.
-
-These could also be named `Gain/Lose`. They could also be combined into a single method/event: `HasFocusChanging`. 
-
-QUESTION: Should we retain the same names as in v1 to simplify porting? Or, given the semantics of `Handled` v. `Cancel` are reversed would it be better to rename and/or combine?
[email protected] and @Terminal.Gui.View.HasFocusChanged are raised when a View's focus is changing.
 
 ## Built-In Views Interactivity
 
@@ -222,454 +183,9 @@ QUESTION: Should we retain the same names as in v1 to simplify porting? Or, give
 | **Slider**     | > 1                     | No         | No            | 1            | SetFocusedOption      | SetFocusedOption<br>OnAccept | Focus                     | SetFocus<br>SetFocusedOption |                              | SetFocus<br>SetFocusedOption |                | Yes           |
 | **ListView**   | > 1                     | No         | No            | 1            | MarkUnMarkRow         | OpenSelectedItem<br>OnAccept | OnAccept                  | SetMark<br>OnSelectedChanged | OpenSelectedItem<br>OnAccept |                              |                | No            |
 
-### v1 Behavior
-
-In v1, within a set of focusable subviews that are TabStops, and within a view hierarchy containing TabGroups, the default order in which views gain focus is the same as the order the related views were added to the SuperView. As `superView.Add (view)` is called, each view is added to the end of the `TabIndexes` list. 
-
-`TabIndex` allows this order to be changed without changing the order in `SubViews`. When `view.TabIndex` is set, the `TabIndexes` list is re-ordered such that `view` is placed in the list after the peer-view with `TabIndex-1` and before the peer-view with `TabIndex+1`. 
-
-QUESTION: With this design, devs are required to ensure `TabIndex` is unique. It also means that `set_TabIndex` almost always will change the passed value. E.g. this code will almost always assert:
-
-```cs
-view.TabIndex = n;
-Debug.Assert (view.TabIndex == n);
-```
-
-This is horrible API design. 
-
-### Proposed New Design
-
-In `Win32` there is no concept of tab order beyond the Z-order (the equivalent to the order superview.Add was called).
-
-In `WinForms` the `Control.TabIndex` property:
-
-> can consist of any valid integer greater than or equal to zero, lower numbers being earlier in the tab order. If more than one control on the same parent control has the same tab index, the z-order of the controls determines the order to cycle through the controls.
-
-In `WPF` the `UserControl.Tabindex` property:
-
-> When no value is specified, the default value is MaxValue. The system then attempts a tab order based on the declaration order in the XAML or child collections.
-
-Terminal.Gui v2 should adopt the `WinForms` model.
-
-# Implementation Plan
-
-A bunch of the above is the proposed design. Eventually `Toplevel` will be deleted. Before that happens, the implementation will retain dual code paths:
-
-- The old `Toplevel` and `OverlappedTop` code. Only utilized when `IsOverlappedContainer == true`
-- The new code path that treats all Views the same but relies on the appropriate combination of `TabBehavior` and `ViewArrangement` settings as well as `IRunnable`.
-
-
-# Rough Design Notes 
-
 ## Accesibilty Tenets
 
 See https://devblogs.microsoft.com/dotnet/the-journey-to-accessible-apps-keyboard-accessible/
 
 https://github.com/dotnet/maui/issues/1646 
 
-## Focus Chain & DOM ideas
-
-The navigation/focus code in `View.Navigation.cs` has been rewritten in v2 (in https://github.com/gui-cs/Terminal.Gui/pull/3627) to simplify and make more robust.
-
-The design is fundamentally the same as in v1: The logic for tracking and updating the focus chain is based on recursion up and down the `View.Subviews`/`View.SuperView` hierarchy. In this model, there is the need for tracking state during recursion, leading to APIs like the following:
-
-```cs
-// From v1/early v2: Note the `force` param.
-private void SetHasFocus (bool newHasFocus, View view, bool force = false)
-
-// From #3627: Note the `traversingUp` param
- private bool EnterFocus ([CanBeNull] View leavingView, bool traversingUp = false)
-```
-
-The need for these "special-case trackers" is clear evidence of poor architecture. Both implementations work, and the #3627 version is far cleaner, but a better design could result in further simplification. 
-
-For example, moving to a model where `Application` is responsible for tracking and updating the focus chain instead `View`. We would introduce a formalization of the *Focus Chain*.
-
-**Focus Chain**: A sequence or hierarchy of UI elements (Views) that determines the order in which keyboard focus is navigated within an application. This chain represents the potential paths that focus can take, ensuring that each element can be reached through keyboard navigation. Instead of using recursion, the Focus Chain can be implemented using lists or trees to maintain and update the focus state efficiently at the `Application` level.
-
-By using lists or trees, you can manage the focus state without the need for recursive traversal, making the navigation model more scalable and easier to maintain. This approach allows you to explicitly define the order and structure of focusable elements, providing greater control over the navigation flow.
-
-Now, the interesting thing about this, is it really starts to look like a DOM!
-
-Designing a DOM (Document Object Model) for UI library involves creating a structured representation of the UI elements and their relationships. 
-
-1. Hierarchy and Structure- Root Node: The top-level node representing the entire application or window.
-    - View Nodes: Each UI element (View) is a node in the DOM. These nodes can have child nodes, representing nested or contained elements.
-2. Node Properties- Attributes: Each node can have attributes such as id, class, style, and custom properties specific to the View.
-    - State: Nodes can maintain state information, such as whether they are focused, visible, enabled, etc.
-3. Traversal Methods- Parent-Child Relationships: Nodes maintain references to their parent and children, allowing traversal up and down the hierarchy.
-    - Sibling Relationships: Nodes can also maintain references to their previous and next siblings for easier navigation.
-4. Event Handling- Event Listeners: Nodes can have event listeners attached to handle user interactions like clicks, key presses, and focus changes.
-    - Event Propagation: Events can propagate through the DOM, allowing for capturing and bubbling phases similar to web DOM events.
-5. Focus Management- Focus Chain: Maintain a list or tree of focusable nodes to manage keyboard navigation efficiently.
-    - Focus Methods: Methods to programmatically set and get focus, ensuring the correct element is focused based on user actions or application logic.
-6. Mouse Events - Mouse handling in Terminal.Gui involves capturing and responding to mouse events such as clicks, drags, and scrolls. In v2, mouse events are managed at the View level, but for a DOM-like structure, this should be centralized.
-7. Layout - The Pos/Dim system in Terminal.Gui is used for defining the layout of views. It allows for dynamic positioning and sizing based on various constraints. For a DOM-model we'd maintain the Pos/Dim system but ensure the layout calculations are managed by the DOM manager.
-8. Drawing  - Drawing in Terminal.Gui involves rendering text, colors, and shapes. This is handled within the View class today. In a DOM model we'd centralize the drawing logic in the DOM manager to ensure consistent rendering.
-
-This is all well and good, however we are NOT going to fully transition to a DOM in v2. But we may start with Focus/Navigation (item 3 above). Would could retain the existing external `View` API for focus (e.g. `View.SetFocus`, `Focused`, `CanFocus`, `TabIndexes`, etc...) but refactor the implementation of those to leverage a `FocusChain` (or `FocusManager`) at the `Application` level.
-
-(Crap code generated by Copilot; but gets the idea across):
-
-```cs
-public class FocusChain {
-    private List<View> focusableViews = new List<View>();
-    private View currentFocusedView;
-
-    public void RegisterView(View view) {
-        if (view.CanFocus) {
-            focusableViews.Add(view);
-            focusableViews = focusableViews.OrderBy(v => v.TabIndex).ToList();
-        }
-    }
-
-    public void UnregisterView(View view) {
-        focusableViews.Remove(view);
-    }
-
-    public void SetFocus(View view) {
-        if (focusableViews.Contains(view)) {
-            currentFocusedView?.LeaveFocus();
-            currentFocusedView = view;
-            currentFocusedView.EnterFocus();
-        }
-    }
-
-    public View GetFocusedView() {
-        return currentFocusedView;
-    }
-
-    public void MoveFocusNext() {
-        if (focusableViews.Count == 0) return;
-        int currentIndex = focusableViews.IndexOf(currentFocusedView);
-        int nextIndex = (currentIndex + 1) % focusableViews.Count;
-        SetFocus(focusableViews[nextIndex]);
-    }
-
-    public void MoveFocusPrevious() {
-        if (focusableViews.Count == 0) return;
-        int currentIndex = focusableViews.IndexOf(currentFocusedView);
-        int previousIndex = (currentIndex - 1 + focusableViews.Count) % focusableViews.Count;
-        SetFocus(focusableViews[previousIndex]);
-    }
-}
-```
-
-
-
-# NOTES
-
-v1 was all over the map for how the built-in Views dealt with common keyboard user-interactions such as pressing `Space`, `Enter`, or the `Hotkey`. Same for mouse interactions such as `Click` and`DoubleClick`.
-
-I fixed a bunch of this a while back in v2 for `Accept` and `Hotkey` as part of making `Shortcut` and the new `StatusBar` work. `Shortcut` is a compbound View that needs to be able to host any view as `CommandView` and translate user-actions of those subviews in a consistent way. 
-
-As I've been working on really making `Bar` support a replacement for `Menu`, `ContextMenu`, and `MenuBar` I've found that my work wasn't quite right and didn't go far enough.
-
-This issue is to document and track what I've learned and lay out the design for addressing this correcxtly.
-
-Related Issues:
-
-- #2975 
-- #3493 
-- #2404 
-- #3631 
-- #3209 
-- #385 
-
-I started fixing this in 
-
-- #3749 
-
-However, I'm going to branch that work off to a new branch derived from `v2_develop` to address this issue separately. 
-
-Here's a deep-dive into the existing built-in Views that indicate the inconsistencies.
-
-|                |                         |            |               | **Keyboard** |                                      |                                                  |                                       | **Mouse**                     |                              |                               |                |               |
-|----------------|-------------------------|------------|---------------|--------------|--------------------------------------|--------------------------------------------------|---------------------------------------|-------------------------------|------------------------------|-------------------------------|----------------|---------------|
-|                | **Number<br>of States** | **Static** | **IsDefault** | **Hotkeys**  | **Select<br>Command<br>`Space`**     | **Accept<br>Command<br>`Enter`**                 | **Hotkey<br>Command**                 | **CanFocus<br>Click**         | **CanFocus<br>DblCLick**     | **!CanFocus<br>Click**        | **RightClick** | **GrabMouse** |
-| **View**       | 1                       | Yes        | No            | 1            |                                      | OnAccept                                         | Focus                                 | Focus                         |                              |                               |                | No            |
-| **Label**      | 1                       | Yes        | No            | 1            |                                      | OnAccept                                         | FocusNext                             | Focus                         |                              | FocusNext                     |                | No            |
-| **Button**     | 1                       | No         | Yes           | 1            | Focus<br>OnAccept                    | Focus<br>OnAccept                                | Focus<br>OnAccept                     | Focus<br>OnAccept             |                              | OnAccept                      |                | No            |
-| **Checkbox**   | 3                       | No         | No            | 1            | AdvanceCheckState<br>OnAccept        | AdvanceCheckState<br>OnAccept                    | AdvanceCheckState<br>OnAccept         | AdvanceCheckState<br>OnAccept |                              | AdvanceCheckState<br>OnAccept |                | No            |
-| **RadioGroup** | > 1                     | No         | No            | 2+           | Set SelectedItem<br>OnAccept         | Set SelectedItem<br>OnAccept                     | Focus<br>Set SelectedItem<br>OnAccept | SetFocus<br>Set _cursor       |                              | SetFocus<br>Set _cursor       |                | No            |
-| **Slider**     | > 1                     | No         | No            | 1            | SetFocusedOption<br>OnOptionsChanged | SetFocusedOption<br>OnOptionsChanged<br>OnAccept | Focus                                 | SetFocus<br>SetFocusedOption  |                              | SetFocus<br>SetFocusedOption  |                | Yes           |
-| **ListView**   | > 1                     | No         | No            | 1            | MarkUnMarkRow                        | OpenSelectedItem<br>OnAccept                     | OnAccept                              | SetMark<br>OnSelectedChanged  | OpenSelectedItem<br>OnAccept |                               |                | No            |
-
-Next, I'll post a table showing the proposed design.
-
-This will involve adding `View.OnSelect` virtual method and a `Select` event to `View`.
-
-## User Interaction Model
-
-Here's what we're really talking about here: What is the correct user interaction model for common actions on Views within a container. See `navigation.md` for the baseline. Here we're going beyond that to focus on:
-
-- What happens when there are bunch of SubViews and the user presses `Enter` with the intention of "accepting the current state".
-- What happens when the user presses `Space` with the intention of changing the selection of the currently focused View. E.g. which list item is selected or the check state?
-- What happens when the user presses `HotKey` with the intention of causing some non-focused View to EITHER "accept the current state" (`Button`), or "change a selection" (`RadioGroup`). 
-
-Same for mouse interaction: 
-
-- What happens when I click on a non-focused View?
-- What if that view has `CanFocus == false`?
-
-This gets really interesting when there's a View like a `Shortcut` that is a composite of several subviews. 
-
-### New Model
-
-|                |                         |            |               | **Keyboard** |                                                                                |                                                  |                                       | **Mouse**                                  |                                                                   |                                 |                |               |
-|----------------|-------------------------|------------|---------------|--------------|--------------------------------------------------------------------------------|--------------------------------------------------|---------------------------------------|--------------------------------------------|-------------------------------------------------------------------|---------------------------------|----------------|---------------|
-|                | **Number<br>of States** | **Static** | **IsDefault** | **Hotkeys**  | **Select<br>Command<br>`Space`**                                               | **Accept<br>Command<br>`Enter`**                 | **Hotkey<br>Command**                 | **CanFocus<br>Click**                      | **CanFocus<br>DblCLick**                                          | **!CanFocus<br>Click**          | **RightClick** | **GrabMouse** |
-| **View**       | 1                       | Yes        | No            | 1            |                                                                                | OnAccept                                         | Focus                                 | SetFocus                                   |                                                                   |                                 |                | No            |
-| **Label**      | 1                       | Yes        | No            | 1            |                                                                                | OnAccept                                         | FocusNext                             | SetFocus                                   |                                                                   | FocusNext                       |                | No            |
-| **Button**     | 1                       | No         | Yes           | 1            | Focus<br>OnAccept                                                              | Focus<br>OnAccept                                | Focus<br>OnAccept                     | SetFocus<br>OnAccept                       |                                                                   | OnAccept                        |                | No            |
-| **Checkbox**   | 3                       | No         | No            | 1            | AdvanceCheckState<br>OnSelect                                                  | OnAccept                                         | AdvanceCheckState<br>OnSelect         | AdvanceCheckState<br>OnSelect              |                                                                   | AdvanceCheckState<br>OnAccept   |                | No            |
-| **RadioGroup** | > 1                     | No         | No            | 2+           | If cursor not selected,<br>select. Else, Advance <br>selected item<br>OnSelect | Set SelectedItem<br>OnSelect<br>OnAccept         | Focus<br>Set SelectedItem<br>OnSelect | Set Cursor<br>Set SelectedItem<br>OnSelect | SetFocus<br>SetCursor<br>Set SelectedItem<br>OnSelect<br>OnAccept | AdvanceSelectedItem<br>OnSelect |                | No            |
-| **Slider**     | > 1                     | No         | No            | 1            | SetFocusedOption<br>OnOptionsChanged                                           | SetFocusedOption<br>OnOptionsChanged<br>OnAccept | Focus                                 | SetFocus<br>SetFocusedOption               |                                                                   | SetFocus<br>SetFocusedOption    |                | Yes           |
-| **ListView**   | > 1                     | No         | No            | 1            | MarkUnMarkRow                                                                  | OpenSelectedItem<br>OnAccept                     | OnAccept                              | SetMark<br>OnSelectedChanged               | OpenSelectedItem<br>OnAccept                                      |                                 |                | No            |
-
-## `View` - base class
-
-### `!HasFocus`
-
-* `Enter` - n/a because no focus
-* `Space` - n/a because no focus
-* `Hotkey` - `Command.Hotkey` which does `OnHotkey/Hotkey`
-* `Click` - If `CanFocus`, sets focus, then invoke `Command.Hotkey`. If `!CanFocus` n/a.
-
-### `HasFocus`
-
-* `Enter` - `Command.Accept` which does `OnAccept/Accept`
-* `Space` - `Command.Select` which does `OnSelect/Select`
-* `Hotkey` - `Command.Hotkey` which does `OnHotkey/Hotkey`
-* `Click` -  `Command.Hotkey`. 
-
-## `Label` - Purpose is to be a "label" for another View. 
-
-Said "label" can contain a Hotkey that will be forward to that other View. 
-
-(Side note, with the `Border` adornment, and the decoupling of `Title` and `Text`, `Label` is not needed if the developer is OK with the Title appearing ABOVE the View... just enable `Border.Thickness.Top`. It is my goal that `Border` will support the `Title` being placed in `Border.Thick.ess.Left` at some point; which will eliminate the need for `Label` in many cases.)
-
-### `!HasFocus`
-
-99% of the time `Label` will be `!HasFocus`.
-
-* `Enter` - n/a because no focus
-* `Space` - n/a because no focus
-* `Hotkey` - `Command.Hotkey` - Invoke the `Hotkey` Command on the next enabled & visible View (note, today AdvanceFocus is called which is not quite rigtht`
-* `Click` - If `CanFocus`, sets focus. If `!CanFocus` Invoke the `Hotkey` Command on the next enabled & visible View (note, today AdvanceFocus is called which is not quite right).
-
-### `HasFocus`
-
-The below is debatable. An alternative is a `Label` with `CanFocus` effectively is a "meld" of the next view and `Enter`, `Space`, `HotKey`, and `Click` all just get forwarded to the next View. 
-
-* `Enter` - `Command.Accept` which does `OnAccept/Accept` 
-* `Space` - `Command.Select` which does `OnSelect/Select`
-* `Hotkey` - `Command.Hotkey` - 
-* `Click` - If `CanFocus`, sets focus. If `!CanFocus` Invoke the `Hotkey` Command on the next enabled & visible View (note, today AdvanceFocus is called which is not quite right).
-
-## `Button` - A View where the user expects some action to happen when pressed.
-
-Note: `Button` has `IsDefault` which does two things: 
-
-1) change how a `Button` appears (adds an indicator indicating it's the default`). 
-2) `Window`'s `Command.Accept` handler searches the subviews for the first `Button` with `IsDefault` and invokes `Command.Accept` on that button. If no such `Button` is found, or none do `Handled=true`, the `Window.OnAccept` is invoked. 
-
-The practical impact of the above is devs have a choice for how to tell if the user "accepts" a superview:
-
-a) Set `IsDefault` on one button, and subscribe to `Accept` on that button.
-b) Subscribe to `Accept` on the superview. 
-
-The `Dialogs` Scenario is illustrative:
-
-For the `app` (Window):
-
-```cs
-        showDialogButton.Accepting += (s, e) =>
-                                   {
-                                       Dialog dlg = CreateDemoDialog (
-                                                                      widthEdit,
-                                                                      heightEdit,
-                                                                      titleEdit,
-                                                                      numButtonsEdit,
-                                                                      glyphsNotWords,
-                                                                      alignmentGroup,
-                                                                      buttonPressedLabel
-                                                                     );
-                                       Application.Run (dlg);
-                                       dlg.Dispose ();
-                                   };
-```
-
-Changing this to 
-
-```cs
-        app.Accepting += (s, e) =>
-                                   {
-                                       Dialog dlg = CreateDemoDialog (
-                                                                      widthEdit,
-                                                                      heightEdit,
-                                                                      titleEdit,
-                                                                      numButtonsEdit,
-                                                                      glyphsNotWords,
-                                                                      alignmentGroup,
-                                                                      buttonPressedLabel
-                                                                     );
-                                       Application.Run (dlg);
-                                       dlg.Dispose ();
-                                   };
-```
-
-... should do exactly the same thing. However, there's a bug in `v2_develop` where the `Command.Accept` handler for `Window` ignores the return value of `defaultBtn.InvokeCommand (Command.Accept)`. Fixing this bug makes this work as I would expect.
-
-However, for `Dialog` the `Dialogs` scenario illustrates why a dev might actually want multiple buttons and to have one be `Default`:
-
-```cs
-                button.Accepting += (s, e) =>
-                                 {
-                                     clicked = buttonId;
-                                     Application.RequestStop ();
-                                 };
-
-...
-
-dialog.Closed += (s, e) => { buttonPressedLabel.Text = $"{clicked}"; };
-```
-
-With this, the `Accept` handler sets `clicked` so the dev can tell what button the user clicked to end the Dialog. 
-
-Removing the code in `Window`'s `Command.Accept` handler that special-cases `IsDefault` changes nothing. Any subview that `Handles = true` `Accept` will, BY DEFINITION be the "default" `Enter` handler. 
-
-If `Enter` is pressed and no Subview handles `Accept` with `Handled = true`, the Superview (e..g `Dialog` or `Window`) will get `Command.Accept`. Thus developers need to do nothing to make it so `Enter` "accepts". 
-
-ANOTHER BUG in v2_develop: This code in `View.Mouse` is incorect as it ignores if an `MouseClick` handler sets `Handled = true`. 
-
-```cs
-           // If mouse is still in bounds, generate a click
-           if (!WantContinuousButtonPressed && Viewport.Contains (mouseEvent.Position))
-           {
-                return OnMouseClick (new (MouseEvent));
-           }
-
-           return mouseEvent.Handled = true;
-```
-
-This is more correct:
-
-```cs
-            // If mouse is still in bounds, generate a click
-            if (!WantContinuousButtonPressed && Viewport.Contains (mouseEvent.Position))
-            {
-                var meea = new MouseEventEventArgs (mouseEvent);
-
-                // We can ignore the return value of OnMouseClick; if the click is handled
-                // meea.Handled and meea.MouseEvent.Handled will be true
-                OnMouseClick (meea);
-            }
-```
-
-AND, `Dialogs` should set `e.Handled = true` in the `Accept` handler. 
-
-Finally, `Button`'s (or any View that wants to be an explicit-"IsDefault" view) `HotKey` handler needs to do this:
-
-```cs
-        AddCommand (
-                    Command.HotKey,
-                    () =>
-                    {
-                        bool cachedIsDefault = IsDefault; // Supports "Swap Default" in Buttons scenario
-
-                        bool? handled = OnAccept ();
-
-                        if (handled == true)
-                        {
-                            return true;
-                        }
-
-                        SetFocus ();
-
-                        // TODO: If `IsDefault` were a property on `View` *any* View could work this way. That's theoretical as 
-                        // TODO: no use-case has been identified for any View other than Button to act like this.
-                        // If Accept was not handled...
-                        if (cachedIsDefault && SuperView is { })
-                        {
-                            return SuperView.InvokeCommand (Command.Accept);
-                        }
-
-                        return false;
-                    });
-```
-
-With these changes, both mouse and keyboard "default accept" handling work without `View`, `Window` or anyone else knowing about `Button.IsDefault`.
-
-## `CheckBox` - An interesting use case because it has potentially 3 states...
-
-Here's what it SHOULD do:
-
-### `!HasFocus`
-
-* `Enter` - n/a because no focus
-* `Space` - n/a because no focus
-* `Hotkey` - `Command.Hotkey` -> does NOT set focus, but advances state
-* `Click` - If `CanFocus`, sets focus AND advances state
-* `Double Click` - Advances state and then raises `Accept` (this is what Office does; it's pretty nice. Windows does nothing).
-
-### `HasFocus`
-
-* `Enter` - `Command.Accept` -> Raises `Accept` 
-* `Space` - `Command.Select` -> Advances state
-* `Hotkey` - `Command.Hotkey` -> Advances state
-* `Click` - Advances state
-* `Double Click` - Advances state and then raises `Accept` (this is what Office does; it's pretty nice. Windows does nothing).
-
-An interesting tid-bit about the above is for `Checkbox` the right thing to do is for Hotkey to NOT set focus. Why? If the user is in a TextField and wants to change a setting via a CheckBox, they should be able to use the hotkey and NOT have to then re-focus back on the TextView. The `TextView` in `Text Input Controls` Scenario is a good example of this.
-
-## `RadioGroup` - Has > 1 state AND multiple hotkeys
-
-In v2_develop it's all kinds of confused. Here's what it SHOULD do:
-
-### `!HasFocus`
-
-* `Enter` - n/a because no focus
-* `Space` - n/a because no focus
-* `Title.Hotkey` - `Command.Hotkey` -> Set focus. Do NOT advance state.
-* `RadioItem.Hotkey` - `Command.Select` -> DO NOT set Focus. Advance State to RadioItem with hotkey.
-* `Click` - `Command.Hotkey` -> If `CanFocus`, sets focus and advances state to clicked RadioItem.
-* `Double Click` - Advances state to clicked RadioItem and then raises `Accept` (this is what Office does; it's pretty nice. Windows does nothing).
-
-### `HasFocus`
-
-* `Enter` - `Command.Accept` -> Advances state to selected RadioItem and Raises `Accept` 
-* `Space` - `Command.Select` -> Advances state
-* `Title.Hotkey` - `Command.Hotkey` -> Advance state
-* `RadioItem.Hotkey` - `Command.Select` -> Advance State to RadioItem with hotkey.
-* `Click` - advances state to clicked RadioItem.
-* `Double Click` - Advances state to clicked RadioItem and then raises `Accept` (this is what Office does; it's pretty nice. Windows does nothing).
-
-Like `Checkbox` the right thing to do is for Hotkey to NOT set focus. Why? If the user is in a TextField and wants to change a setting via a RadioGroup, they should be able to use the hotkey and NOT have to then re-focus back on the TextView. The `TextView` in `Text Input Controls` Scenario is a good example of this.
-
-## `Slider` - Should operate just like RadioGroup
-
-- BUGBUG: Slider should support Hotkey w/in Legends
-
-## `NumericUpDown`
-
-## `ListView`
-
-### `!HasFocus`
-
-* `Enter` - n/a because no focus
-* `Space` - n/a because no focus
-* `Title.Hotkey` - `Command.Hotkey` -> Set focus. Do NOT advance state.
-* `Click` - `Command.Select` -> If `CanFocus`, sets focus and advances state to clicked ListItem.
-* `Double Click` - Sets focus and advances state to clicked ListItem and then raises `Accept`.
-
-### `HasFocus`
-
-* `Enter` - `Command.Accept` -> Raises `Accept` 
-* `Space` - `Command.Select` -> Advances state
-* `Title.Hotkey` - `Command.Hotkey` -> does nothing
-* `RadioItem.Hotkey` - `Command.Select` -> Advance State to RadioItem with hotkey.
-* `Click` - `Command.Select` -> If `CanFocus`, sets focus and advances state to clicked ListItem.
-* `Double Click` - Sets focus and advances state to clicked ListItem and then raises `Accept`.
-
-What about `ListView.MultiSelect` and `ListViews.AllowsMarking`?

+ 15 - 15
docfx/docs/scrolling.md

@@ -6,14 +6,14 @@ Terminal.Gui provides a rich system for how [View](View.md) users can scroll con
 
 See [View Deep Dive](View.md) for broader definitions.
 
-* *Scroll* (Verb) - The act of causing content to move either horizontally or vertically within the [View.Viewport](~/api/Terminal.Gui.View.Viewport.yml). Also referred to as "Content Scrolling".
-* *ScrollSlider* - A visual indicator that shows the proportion of the scrollable content to the size of the [View.Viewport](~/api/Terminal.Gui.View.Viewport.yml) and allows the user to use the mouse to scroll. 
+* *Scroll* (Verb) - The act of causing content to move either horizontally or vertically within the @Terminal.Gui.View.Viewport. Also referred to as "Content Scrolling".
+* *ScrollSlider* - A visual indicator that shows the proportion of the scrollable content to the size of the @Terminal.Gui.View.Viewport and allows the user to use the mouse to scroll. 
 * *[ScrollBar](~/api/Terminal.Gui.ScrollBar.yml)* -  Indicates the size of scrollable content and controls the position of the visible content, either vertically or horizontally. At each end, a @Terminal.Gui.Button is provided, one to scroll up or left and one to scroll down or right. Between the
- buttons is a @Terminal.Gui.ScrollSlider that can be dragged to control the position of the visible content. The ScrollSlier is sized to show the proportion of the scrollable content to the size of the @Terminal.Gui.View.Viewport.
+ buttons is a @Terminal.Gui.ScrollSlider that can be dragged to control the position of the visible content. The ScrollSlider is sized to show the proportion of the scrollable content to the size of the @Terminal.Gui.View.Viewport.
 
 ## Overview
 
-The ability to scroll content is built into View. The [View.Viewport](~/api/Terminal.Gui.View.Viewport.yml) represents the scrollable "viewport" into the View's Content Area (which is defined by the return value of [View.GetContentSize()](~/api/Terminal.Gui.View.GetContentSize.yml)). 
+The ability to scroll content is built into View. The @Terminal.Gui.View.Viewport represents the scrollable "viewport" into the View's Content Area (which is defined by the return value of @Terminal.Gui.View.GetContentSize ). 
 
 By default, [View](~/api/Terminal.Gui.View.yml), includes no bindings for the typical directional keyboard and mouse input and cause the Content Area.
 
@@ -21,12 +21,12 @@ Terminal.Gui also provides the ability show a visual scroll bar that responds to
 
 Scrolling with the mouse and keyboard are enabled by:
 
-1) Making the [View.Viewport](~/api/Terminal.Gui.View.Viewport.yml) size smaller than the size returned by [View.GetContentSize()](~/api/Terminal.Gui.View.GetContentSize.yml). 
-2) Creating key bindings for the appropriate directional keys (e.g. [Key.CursorDown](~/api/Terminal.Gui.Key)), and calling [View.ScrollHorizontal()](~/api/Terminal.Gui.View.ScrollHorizontal.yml)/[ScrollVertical()](~/api/Terminal.Gui.View.ScrollVertical.yml) as needed.
-3) Subscribing to [View.MouseEvent](~/api/Terminal.Gui.View.MouseEvent.yml) and calling calling [View.ScrollHorizontal()](~/api/Terminal.Gui.View.ScrollHorizontal.yml)/[ScrollVertical()](~/api/Terminal.Gui.View.ScrollVertical.yml) as needed.
-4) Enabling the [ScrollBar](~/api/Terminal.Gui.ScrollBar.yml)s built into View ([View.HorizontalScrollBar/VerticalScrollBar](~/api/Terminal.Gui.View.HorizontalScrollBar.yml)) by either enabling automatic show/hide behavior (see @Terminal.Gui.ScrollBar.AutoShow) or explicitly making them visible (see @Terminal.Gui.View.Visible).
+1) Making the @Terminal.Gui.View.Viewport size smaller than the size returned by @Terminal.Gui.View.GetContentSize. 
+2) Creating key bindings for the appropriate directional keys, and calling @Terminal.Gui.View.ScrollHorizontal(System.Int32) / @Terminal.Gui.View.ScrollVertical(System.Int32) as needed.
+3) Subscribing to @Terminal.Gui.View.MouseEvent and calling calling @Terminal.Gui.View.ScrollHorizontal(System.Int32) / @Terminal.Gui.View.ScrollVertical(System.Int32) as needed.
+4) Enabling the ScrollBars built into View by making @Terminal.Gui.View.HorizontalScrollBar or @Terminal.Gui.View.VerticalScrollBar visible or by enabling automatic show/hide behavior (seethe @Terminal.Gui.ScrollBar.AutoShow property).
 
-While *[ScrollBar](~/api/Terminal.Gui.ScrollBar.yml)* can be used in a standalone manner to provide proportional scrolling, it is typically enabled automatically via the [View.HorizontalScrollBar](~/api/Terminal.Gui.View.HorizontalScrollBar.yml) and  [View.VerticalScrollBar](~/api/Terminal.Gui.View.VerticalScrollBar.yml) properties.
+While @Terminal.Gui.ScrollBar can be used in a standalone manner to provide proportional scrolling, it is typically enabled automatically via the @Terminal.Gui.View.HorizontalScrollBar and @Terminal.Gui.View.VerticalScrollBar properties.
 
 ## Examples
 
@@ -34,19 +34,19 @@ These Scenarios illustrate Terminal.Gui scrolling:
 
 * *Scrolling* - Demonstrates the @Terminal.Gui.ScrollBar objects built into-View.
 * *ScrollBar Demo* - Demonstrates using @Terminal.Gui.ScrollBar view in a standalone manner.
-* *ViewportSettings* - Demonstrates the various [Viewport Settings](~/api/Terminal.Gui.ViewportSettings.yml) (see below) in an interactive manner. Used by the development team to visually verify that convoluted View layout and arrangement scenarios scroll properly.
-* *Character Map* - Demonstrates a sophisticated scrolling use-case. The entire set of Unicode code-points can be scrolled and searched. From a scrolling perspective, this Scenario illustrates how to manually configure `Viewport`, `SetContentArea()`, and `ViewportSettings` to enable horizontal and vertical headers (as might appear in a spreadsheet), full keyboard and mouse support, and more. 
+* *ViewportSettings* - Demonstrates the various @Terminal.Gui.ViewportSettings (see below) in an interactive manner. Used by the development team to visually verify that convoluted View layout and arrangement scenarios scroll properly.
+* *Character Map* - Demonstrates a sophisticated scrolling use-case. The entire set of Unicode code-points can be scrolled and searched. From a scrolling perspective, this Scenario illustrates how to manually configure Viewport, Content Area, and Viewport Settings to enable horizontal and vertical headers (as might appear in a spreadsheet), full keyboard and mouse support, and more. 
 * *ListView* and *HexEdit* - The source code to these built-in Views are good references for how to support scrolling and ScrollBars in a re-usable View sub-class. 
 
-## [Viewport Settings](~/api/Terminal.Gui.ViewportSettings.yml)
+## ViewportSettings
 
 Use @Terminal.Gui.ViewportSettings to adjust the behavior of scrolling. 
 
 * `AllowNegativeX/Y` - If set, Viewport.Size can be set to negative coordinates enabling scrolling beyond the top-left of the content area.
 
-* `AllowX/YGreaterThanContentWidth` - If set, Viewport.Size can be set values greater than GetContentSize() enabling scrolling beyond the bottom-right of the Content Area. When not set, `Viewport.X/Y` are constrained to the dimension of the content area - 1. This means the last column of the content will remain visible even if there is an attempt to scroll the Viewport past the last column. The practical effect of this is that the last column/row of the content will always be visible.
+* `AllowX/YGreaterThanContentWidth` - If set, @Terminal.Gui.View.Viewport `.Size` can be set to values greater than @Terminal.Gui.View.GetContentSize enabling scrolling beyond the bottom-right of the Content Area. When not set, @Terminal.Gui.View.Viewport `.Location` is constrained to the dimension of the content area - 1. This means the last column of the content will remain visible even if there is an attempt to scroll the Viewport past the last column. The practical effect of this is that the last column/row of the content will always be visible.
 
-* `ClipContentOnly` - By default, clipping is applied to [Viewport](~/api/Terminal.Gui.View.Viewport.yml). Setting this flag will cause clipping to be applied to the visible content area.
+* `ClipContentOnly` - By default, clipping is applied to @Terminal.Gui.View.Viewport. Setting this flag will cause clipping to be applied to the visible content area.
 
-* `ClearContentOnly`- If set [View.Clear()](~/api/Terminal.Gui.View.Clear.yml) will clear only the portion of the content area that is visible within the Viewport. This is useful for views that have a content area larger than the Viewport and want the area outside the content to be visually distinct.
+* `ClearContentOnly`- If set @Terminal.Gui.View.ClearViewport will clear only the portion of the content area that is visible within the Viewport. This is useful for views that have a content area larger than the Viewport and want the area outside the content to be visually distinct.
 

+ 1 - 2
docfx/docs/views.md

@@ -16,8 +16,7 @@
 * [MessageBox](~/api/Terminal.Gui.MessageBox.yml) - Displays a modal (pup-up) message to the user, with a title, a message and a series of options that the user can choose from. 
 * [ProgressBar](~/api/Terminal.Gui.ProgressBar.yml) - Displays a progress Bar indicating progress of an activity.
 * [RadioGroup](~/api/Terminal.Gui.RadioGroup.yml) - Displays a group of labels each with a selected indicator. Only one of those can be selected at a given time
-* [ScrollView](~/api/Terminal.Gui.ScrollView.yml) - Present a window into a virtual space where subviews are added. Similar to the iOS UIScrollView.
-* [ScrollBarView](~/api/Terminal.Gui.ScrollBarView.yml) - display a 1-character scrollbar, either horizontal or vertical.
+* [ScrollBarView](~/api/Terminal.Gui.ScrollBar.yml) - A scrollbar, either horizontal or vertical.
 * [StatusBar](~/api/Terminal.Gui.StatusBar.yml) - A View that snaps to the bottom of a Toplevel displaying set of status items. Includes support for global app keyboard shortcuts.
 * [TableView](~/api/Terminal.Gui.TableView.yml) - A View for tabular data based on a System.Data.DataTable. 
 * [TimeField](~/api/Terminal.Gui.TimeField.yml) & [DateField](~/api/Terminal.Gui.TimeField.yml) - Enables structured editing of dates and times.

BIN
local_packages/Terminal.Gui.2.0.0.nupkg


BIN
local_packages/Terminal.Gui.2.0.0.snupkg