diff --git a/Terminal.Gui/Application/Application.cs b/Terminal.Gui/Application/Application.cs
index f1b161118..741c7ab75 100644
--- a/Terminal.Gui/Application/Application.cs
+++ b/Terminal.Gui/Application/Application.cs
@@ -177,15 +177,15 @@ public static partial class Application
///
///
/// must be called when the application is closing (typically after
- /// has returned) to ensure resources are cleaned up and
+ /// has returned) to ensure resources are cleaned up and
/// terminal settings
/// restored.
///
///
- /// The function combines
+ /// The function combines
/// and
/// into a single
- /// call. An application cam use without explicitly calling
+ /// call. An application cam use without explicitly calling
/// .
///
///
diff --git a/Terminal.Gui/Input/CommandContext.cs b/Terminal.Gui/Input/CommandContext.cs
index 555b179c8..5b6c23557 100644
--- a/Terminal.Gui/Input/CommandContext.cs
+++ b/Terminal.Gui/Input/CommandContext.cs
@@ -4,7 +4,7 @@ namespace Terminal.Gui;
#pragma warning disable CS1574 // XML comment has cref attribute that could not be resolved
///
/// Provides context for a that is being invoked.
-///
///
///
/// To define a that is invoked with context,
diff --git a/Terminal.Gui/View/Layout/Pos.cs b/Terminal.Gui/View/Layout/Pos.cs
index f6966e64f..2213524ae 100644
--- a/Terminal.Gui/View/Layout/Pos.cs
+++ b/Terminal.Gui/View/Layout/Pos.cs
@@ -336,10 +336,16 @@ public abstract class Pos
///
internal virtual bool ReferencesOtherViews () { return false; }
+ ///
+ /// Indicates whether the specified type is in the hierarchy of this Pos object.
+ ///
+ ///
+ ///
+ ///
public bool Has (Type type, out Pos pos)
{
pos = this;
- if (type == GetType())
+ if (type == GetType ())
{
return true;
}
diff --git a/Terminal.Gui/View/ViewAdornments.cs b/Terminal.Gui/View/ViewAdornments.cs
index bc2a93468..89b8ff0e7 100644
--- a/Terminal.Gui/View/ViewAdornments.cs
+++ b/Terminal.Gui/View/ViewAdornments.cs
@@ -107,7 +107,7 @@ public partial class View
/// Called when the is changing. Invokes , which allows the event to be cancelled.
///
///
- /// Override to prevent the from changing. Set to `true` to cancel the event.
+ /// Override to prevent the from changing.
///
///
protected void OnBorderStyleChanging (StateEventArgs e)
@@ -163,6 +163,9 @@ public partial class View
Border.LineStyle = value;
}
+ ///
+ /// Fired when the is changing. Allows the event to be cancelled.
+ ///
public event EventHandler> BorderStyleChanging;
///
diff --git a/Terminal.Gui/View/ViewKeyboard.cs b/Terminal.Gui/View/ViewKeyboard.cs
index 935765bf9..e43103381 100644
--- a/Terminal.Gui/View/ViewKeyboard.cs
+++ b/Terminal.Gui/View/ViewKeyboard.cs
@@ -783,10 +783,11 @@ public partial class View
///
///
/// The key that caused the commands to be invoked, if any.
+ ///
///
/// if no command was found.
- /// if the command was invoked and it handled the command.
- /// if the command was invoked and it did not handle the command.
+ /// if the command was invoked the command was handled.
+ /// if the command was invoked and the command was not handled.
///
public bool? InvokeCommands (Command [] commands, [CanBeNull] Key key = null, [CanBeNull] KeyBinding? keyBinding = null)
{
diff --git a/Terminal.Gui/Views/Bar.cs b/Terminal.Gui/Views/Bar.cs
index 1c040436e..e95f9623f 100644
--- a/Terminal.Gui/Views/Bar.cs
+++ b/Terminal.Gui/Views/Bar.cs
@@ -85,7 +85,7 @@ public class Bar : View
}
}
- /// Inserts a in the specified index of .
+ /// Inserts a in the specified index of .
/// The zero-based index at which item should be inserted.
/// The item to insert.
public void AddShortcutAt (int index, Shortcut item)
@@ -107,7 +107,7 @@ public class Bar : View
SetNeedsDisplay ();
}
- /// Removes a at specified index of .
+ /// Removes a at specified index of .
/// The zero-based index of the item to remove.
/// The removed.
public Shortcut RemoveShortcut (int index)
@@ -157,8 +157,6 @@ public class Bar : View
// All CommandView's are the same width, all HelpView's are the same width,
// all KeyView's are the same width
- var maxCommandWidth = 0;
- var maxHelpWidth = 0;
var minKeyWidth = 0;
List shortcuts = Subviews.Where (s => s is Shortcut && s.Visible).Cast ().ToList ();
diff --git a/Terminal.Gui/Views/Dialog.cs b/Terminal.Gui/Views/Dialog.cs
index 96a55f229..2ab97a98e 100644
--- a/Terminal.Gui/Views/Dialog.cs
+++ b/Terminal.Gui/Views/Dialog.cs
@@ -9,7 +9,7 @@ namespace Terminal.Gui;
///
///
/// To run the modally, create the , and pass it to
-/// . This will execute the dialog until
+/// . This will execute the dialog until
/// it terminates via the
/// [ESC] or [CTRL-Q] key, or when one of the views or buttons added to the dialog calls
/// .
diff --git a/Terminal.Gui/Views/OpenDialog.cs b/Terminal.Gui/Views/OpenDialog.cs
index ec7f8eb43..8197671d8 100644
--- a/Terminal.Gui/Views/OpenDialog.cs
+++ b/Terminal.Gui/Views/OpenDialog.cs
@@ -36,7 +36,7 @@ public enum OpenMode
///
///
/// To use, create an instance of , and pass it to
-/// . This will run the dialog modally, and when this returns,
+/// . This will run the dialog modally, and when this returns,
/// the list of files will be available on the property.
///
/// To select more than one file, users can use the spacebar, or control-t.
diff --git a/Terminal.Gui/Views/SaveDialog.cs b/Terminal.Gui/Views/SaveDialog.cs
index f1075159d..61ffb88e4 100644
--- a/Terminal.Gui/Views/SaveDialog.cs
+++ b/Terminal.Gui/Views/SaveDialog.cs
@@ -17,7 +17,7 @@ namespace Terminal.Gui;
///
///
/// To use, create an instance of , and pass it to
-/// . This will run the dialog modally, and when this returns,
+/// . This will run the dialog modally, and when this returns,
/// the property will contain the selected file name or null if the user canceled.
///
///
diff --git a/Terminal.Gui/Views/Shortcut.cs b/Terminal.Gui/Views/Shortcut.cs
index 0042d08c4..0e16fd714 100644
--- a/Terminal.Gui/Views/Shortcut.cs
+++ b/Terminal.Gui/Views/Shortcut.cs
@@ -8,18 +8,6 @@ namespace Terminal.Gui;
// TODO: It can mean "Application-scoped key binding" or "A key binding that is displayed in a visual way".
// TODO: I tried `BarItem` but that's not great either as it implies it can only be used in `Bar`s.
-[Flags]
-[GenerateEnumExtensionMethods (FastHasFlags = true)]
-public enum ShortcutStyles
-{
- None = 0,
-
- SeparatorBefore = 8,
-
- SeparatorAfter = 16,
-}
-
-
///
/// Displays a command, help text, and a key binding. When the key is pressed, the command will be invoked. Useful for
/// displaying a command in such as a
@@ -29,7 +17,7 @@ public enum ShortcutStyles
///
/// When the user clicks on the or presses the key
/// specified by the command is invoked, causing the
-/// event to be fired
+/// event to be fired
///
///
/// If is , the
@@ -53,13 +41,13 @@ public enum ShortcutStyles
///
public class Shortcut : View
{
-
///
/// Creates a new instance of ;
///
///
- ///
+ ///
///
+ ///
public Shortcut (Key key, string commandText, Action action, string helpText = null)
{
Id = "_shortcut";
@@ -166,8 +154,6 @@ public class Shortcut : View
}
}
- public ShortcutStyles ShortcutStyle { get; set; } = ShortcutStyles.None;
-
// When one of the subviews is "empty" we don't want to show it. So we
// Use Add/Remove. We need to be careful to add them in the right order
// so Pos.Align works correctly.
@@ -417,7 +403,7 @@ public class Shortcut : View
{
// When the CommandView fires its Accept event, we want to act as though the
// Shortcut was clicked.
- if (base.OnAccept() == true)
+ if (base.OnAccept () == true)
{
e.Cancel = true;
}
@@ -646,7 +632,7 @@ public class Shortcut : View
/// Gets or sets the action to be invoked when the shortcut key is pressed or the shortcut is clicked on with the mouse.
///
///
- /// Note, the event is fired first, and if cancelled, will not be invoked.
+ /// Note, the event is fired first, and if cancelled, the event will not be invoked.
///
[CanBeNull]
public Action Action { get; set; }
@@ -691,7 +677,7 @@ public class Shortcut : View
}
// Set KeyView's colors to show "hot"
- if (IsInitialized && base.ColorScheme is {})
+ if (IsInitialized && base.ColorScheme is { })
{
var cs = new ColorScheme (base.ColorScheme)
{
diff --git a/Terminal.Gui/Views/TextView.cs b/Terminal.Gui/Views/TextView.cs
index 8b4f17424..f97254410 100644
--- a/Terminal.Gui/Views/TextView.cs
+++ b/Terminal.Gui/Views/TextView.cs
@@ -1961,7 +1961,6 @@ public class TextView : View
private readonly HistoryText _historyText = new ();
private bool _allowsReturn = true;
private bool _allowsTab = true;
- private int _bottomOffset, _rightOffset;
private bool _clickWithSelecting;
// The column we are tracking, or -1 if we are not tracking any column
diff --git a/Terminal.Gui/Views/Toplevel.cs b/Terminal.Gui/Views/Toplevel.cs
index 22af364f2..d9bd4d1be 100644
--- a/Terminal.Gui/Views/Toplevel.cs
+++ b/Terminal.Gui/Views/Toplevel.cs
@@ -7,7 +7,7 @@ namespace Terminal.Gui;
///
///
/// Toplevels can run as modal (popup) views, started by calling
-/// . They return control to the caller when
+/// . They return control to the caller when
/// has been called (which sets the
/// property to false).
///
@@ -15,7 +15,7 @@ namespace Terminal.Gui;
/// A Toplevel is created when an application initializes Terminal.Gui by calling .
/// The application Toplevel can be accessed via . Additional Toplevels can be created
/// and run (e.g. s. To run a Toplevel, create the and call
-/// .
+/// .
///
///
public partial class Toplevel : View
@@ -445,7 +445,7 @@ public partial class Toplevel : View
/// perform tasks when the has been laid out and focus has been set. changes.
///
/// A Ready event handler is a good place to finalize initialization after calling
- /// on this .
+ /// on this .
///
///
public event EventHandler Ready;
diff --git a/Terminal.Gui/Views/Wizard/Wizard.cs b/Terminal.Gui/Views/Wizard/Wizard.cs
index ab81e515a..1f11036c1 100644
--- a/Terminal.Gui/Views/Wizard/Wizard.cs
+++ b/Terminal.Gui/Views/Wizard/Wizard.cs
@@ -125,7 +125,7 @@ public class Wizard : Dialog
/// Add the Wizard to a containing view with .
///
///
- /// If a non-Modal Wizard is added to the application after has
+ /// If a non-Modal Wizard is added to the application after has
/// been called the first step must be explicitly set by setting to
/// :
///