Take a clicked word into the box the cursor is in

GrabIntoFocused puts text in whichever box has the cursor, whatever kind of
value that box normally holds. It is what N1MM's digital window does on
Ctrl+click, for the exchange element the contest has no box for.

The entry window also says when a CQ has gone out, which the digital window
needs to clear its grab list on: a run that starts again brings new callers.

GrabList.N1mmDepth is the ten calls N1MM's grab window holds.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RoGtneMQaz4M9w7Kk49AVD
This commit is contained in:
2026-09-01 00:03:08 +00:00
parent f536b1b6a1
commit 871a28c10f
3 changed files with 23 additions and 0 deletions

View File

@@ -105,6 +105,7 @@ public sealed partial class EntryWindow
if (index == Esm.CallCq)
{
session.Alternating?.CarryOn();
CqSent?.Invoke(this, EventArgs.Empty);
}
else
{

View File

@@ -589,10 +589,29 @@ public sealed partial class EntryWindow : Window
return true;
}
/// The digital window's Ctrl+click: whatever was clicked goes in the box
/// the cursor is in, whatever kind of value the box normally holds.
internal void GrabIntoFocused(string text)
{
if (Logging is null || text.Length == 0)
{
return;
}
int field = Math.Clamp(Logging.Entry.Focus, 0, boxes.Count - 1);
Logging.Entry[field] = field == 0 ? text.ToUpperInvariant() : text;
SyncBoxes();
boxes[field].Focus();
Refresh();
}
/// The digital window's right click, which N1MM makes the same as pressing
/// Enter here.
internal void PressEnter() => OnEnter();
/// A CQ has gone out. The digital window clears its grab list on it, the
/// way N1MM does: a run that starts again brings new callers.
internal event EventHandler? CqSent;
private void MoveFocus(bool forward)
{
if (Logging is null || boxes.Count == 0)