Browse Source

Selected->Selecting

Tig 10 months ago
parent
commit
fc34585256

+ 1 - 1
Terminal.Gui/View/View.Command.cs

@@ -29,7 +29,7 @@ public partial class View // Command APIs
                         return true;
                         return true;
                     });
                     });
 
 
-        // Space or single-click - Raise Selected
+        // Space or single-click - Raise Selecting
         AddCommand (Command.Select, (ctx) =>
         AddCommand (Command.Select, (ctx) =>
                                     {
                                     {
                                         if (RaiseSelecting (ctx) is true)
                                         if (RaiseSelecting (ctx) is true)

+ 1 - 1
Terminal.Gui/View/View.Mouse.cs

@@ -371,7 +371,7 @@ public partial class View // Mouse APIs
         // Post-conditions
         // Post-conditions
 
 
         // Always invoke Select command on MouseClick
         // Always invoke Select command on MouseClick
-        // By default, this will raise Selected/OnSelected - Subclasses can override this via AddCommand (Command.Select ...).
+        // By default, this will raise Selecting/OnSelecting - Subclasses can override this via AddCommand (Command.Select ...).
         args.Handled = InvokeCommand (Command.Select, ctx: new (Command.Select, key: null, data: args.MouseEvent)) == true;
         args.Handled = InvokeCommand (Command.Select, ctx: new (Command.Select, key: null, data: args.MouseEvent)) == true;
 
 
         return args.Handled;
         return args.Handled;

+ 2 - 2
UnitTests/Views/CheckBoxTests.cs

@@ -566,7 +566,7 @@ public class CheckBoxTests (ITestOutputHelper output)
 
 
         ckb.CheckedState = initialState;
         ckb.CheckedState = initialState;
 
 
-        ckb.Selecting += OnSelected;
+        ckb.Selecting += OnSelecting;
 
 
         Assert.Equal (initialState, ckb.CheckedState);
         Assert.Equal (initialState, ckb.CheckedState);
         bool? ret = ckb.InvokeCommand (Command.Select);
         bool? ret = ckb.InvokeCommand (Command.Select);
@@ -576,7 +576,7 @@ public class CheckBoxTests (ITestOutputHelper output)
 
 
         return;
         return;
 
 
-        void OnSelected (object sender, CommandEventArgs e)
+        void OnSelecting (object sender, CommandEventArgs e)
         {
         {
             checkedInvoked = true;
             checkedInvoked = true;
             e.Cancel = true;
             e.Cancel = true;