mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
* Initial plan
* Rename Command.Select to Command.Activate and Selecting to Activating
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Add Activating event propagation to SuperView
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Update all comments and docs referencing Select to Activate
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Fix event log messages in examples to use Activating/Activate
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Revert automatic Activating event propagation that broke tests
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* Update docfx documentation to use Activate/Activating terminology
Co-authored-by: tig <585482+tig@users.noreply.github.com>
* renames
* Revert "Add Activating event propagation to SuperView"
This reverts commit 6d82bee9ad.
* added command diagrams
* mermaid
* updated level 3
* again
* Select->Activate in MouseTests.cs
* Update Terminal.Gui/Views/Selectors/FlagSelector.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Refactor: Rename Selecting to Activating in View APIs
Renamed the `Selecting` event and `OnSelecting` method to
`Activating` and `OnActivating` to better reflect their purpose.
Updated all related comments, test method names, variables,
and assertions in `View` and `ViewCommandTests` to align with
the new terminology.
Improved code clarity by using `_` for unused parameters in
lambda expressions. Renamed properties like `HandleSelecting`
to `HandleActivating` and adjusted naming conventions for
consistency (e.g., `OnactivatingCount` to `OnActivatingCount`).
These changes enhance readability, maintainability, and
terminology consistency across the codebase.
* Update Terminal.Gui/Views/Selectors/OptionSelector.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Typos
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tig <585482+tig@users.noreply.github.com>
Co-authored-by: Tig <tig@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -134,7 +134,7 @@ public class CharacterMap : Scenario
|
||||
_categoryList.Table = CreateCategoryTable (0, isDescending);
|
||||
|
||||
// if user clicks the mouse in TableView
|
||||
_categoryList.Selecting += (_, e) =>
|
||||
_categoryList.Activating += (_, e) =>
|
||||
{
|
||||
// Only handle mouse clicks
|
||||
if (e.Context is not CommandContext<MouseBinding> { Binding.MouseEventArgs: { } mouseArgs })
|
||||
|
||||
@@ -35,7 +35,7 @@ public class ContextMenus : Scenario
|
||||
Application.Run (_appWindow);
|
||||
_appWindow.Dispose ();
|
||||
_appWindow.KeyDown -= OnAppWindowOnKeyDown;
|
||||
_appWindow.Selecting -= OnAppWindowOnSelecting;
|
||||
_appWindow.Activating -= OnAppWindowOnActivating;
|
||||
_winContextMenu?.Dispose ();
|
||||
|
||||
// Shutdown - Calling Application.Shutdown is required.
|
||||
@@ -81,7 +81,7 @@ public class ContextMenus : Scenario
|
||||
_appWindow.Add (_tfBottomRight);
|
||||
|
||||
_appWindow.KeyDown += OnAppWindowOnKeyDown;
|
||||
_appWindow.Selecting += OnAppWindowOnSelecting;
|
||||
_appWindow.Activating += OnAppWindowOnActivating;
|
||||
|
||||
CultureInfo originalCulture = Thread.CurrentThread.CurrentUICulture;
|
||||
_appWindow.IsRunningChanged += (_, e) => {
|
||||
@@ -91,7 +91,7 @@ public class ContextMenus : Scenario
|
||||
} };
|
||||
}
|
||||
|
||||
void OnAppWindowOnSelecting (object? s, CommandEventArgs e)
|
||||
void OnAppWindowOnActivating (object? s, CommandEventArgs e)
|
||||
{
|
||||
if (e.Context is CommandContext<MouseBinding> { Binding.MouseEventArgs: { } mouseArgs })
|
||||
{
|
||||
|
||||
@@ -81,7 +81,7 @@ public class EventLog : ListView
|
||||
|
||||
_viewToLog.MouseWheel += (_, args) => { Log ($"MouseWheel: {args}"); };
|
||||
_viewToLog.HandlingHotKey += (_, args) => { Log ($"HandlingHotKey: {args.Context}"); };
|
||||
_viewToLog.Selecting += (_, args) => { Log ($"Selecting: {args.Context}"); };
|
||||
_viewToLog.Activating += (_, args) => { Log ($"Activating: {args.Context}"); };
|
||||
_viewToLog.Accepting += (_, args) => { Log ($"Accepting: {args.Context}"); };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ public class ListViewWithSelection : Scenario
|
||||
_listView.OpenSelectedItem += (s, a) => LogEvent (s as View, a, "OpenSelectedItem");
|
||||
_listView.CollectionChanged += (s, a) => LogEvent (s as View, a, "CollectionChanged");
|
||||
_listView.Accepting += (s, a) => LogEvent (s as View, a, "Accept");
|
||||
_listView.Selecting += (s, a) => LogEvent (s as View, a, "Select");
|
||||
_listView.Activating += (s, a) => LogEvent (s as View, a, "Activate");
|
||||
_listView.VerticalScrollBar.AutoShow = true;
|
||||
_listView.HorizontalScrollBar.AutoShow = true;
|
||||
|
||||
|
||||
@@ -425,7 +425,7 @@ public class Shortcuts : Scenario
|
||||
BoxWidth = 1
|
||||
};
|
||||
|
||||
bgColorShortcut.Selecting += (o, args) =>
|
||||
bgColorShortcut.Activating += (o, args) =>
|
||||
{
|
||||
//args.Cancel = true;
|
||||
};
|
||||
@@ -480,18 +480,18 @@ public class Shortcuts : Scenario
|
||||
|
||||
foreach (Shortcut shortcut in Application.TopRunnableView.SubViews.OfType<Shortcut> ())
|
||||
{
|
||||
shortcut.Selecting += (o, args) =>
|
||||
shortcut.Activating += (o, args) =>
|
||||
{
|
||||
if (args.Handled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
eventSource.Add ($"{shortcut!.Id}.Selecting: {shortcut!.CommandView.Text} {shortcut!.CommandView.GetType ().Name}");
|
||||
eventSource.Add ($"{shortcut!.Id}.Activating: {shortcut!.CommandView.Text} {shortcut!.CommandView.GetType ().Name}");
|
||||
eventLog.MoveDown ();
|
||||
};
|
||||
|
||||
shortcut.CommandView.Selecting += (o, args) =>
|
||||
shortcut.CommandView.Activating += (o, args) =>
|
||||
{
|
||||
if (args.Handled)
|
||||
{
|
||||
@@ -499,7 +499,7 @@ public class Shortcuts : Scenario
|
||||
}
|
||||
|
||||
eventSource.Add (
|
||||
$"{shortcut!.Id}.CommandView.Selecting: {shortcut!.CommandView.Text} {shortcut!.CommandView.GetType ().Name}");
|
||||
$"{shortcut!.Id}.CommandView.Activating: {shortcut!.CommandView.Text} {shortcut!.CommandView.GetType ().Name}");
|
||||
eventLog.MoveDown ();
|
||||
//args.Handled = true;
|
||||
};
|
||||
|
||||
@@ -610,7 +610,7 @@ public class TableEditor : Scenario
|
||||
};
|
||||
|
||||
// if user clicks the mouse in TableView
|
||||
_tableView!.Selecting += (s, e) =>
|
||||
_tableView!.Activating += (s, e) =>
|
||||
{
|
||||
if (_currentTable == null)
|
||||
{
|
||||
|
||||
@@ -60,7 +60,7 @@ public class TreeViewFileSystem : Scenario
|
||||
};
|
||||
|
||||
win.Add (_detailsFrame);
|
||||
_treeViewFiles.Selecting += TreeViewFiles_Selecting;
|
||||
_treeViewFiles.Activating += TreeViewFiles_Selecting;
|
||||
_treeViewFiles.KeyDown += TreeViewFiles_KeyPress;
|
||||
_treeViewFiles.SelectionChanged += TreeViewFiles_SelectionChanged;
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ public class ViewExperiments : Scenario
|
||||
//App?.Popover!.Visible = true;
|
||||
}
|
||||
|
||||
testFrame.Selecting += (sender, e) =>
|
||||
testFrame.Activating += (sender, e) =>
|
||||
{
|
||||
if (e.Context is CommandContext<MouseBinding> { Binding.MouseEventArgs: { } mouseArgs })
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user