-
Notifications
You must be signed in to change notification settings - Fork 702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #3692++ - Rearchitects drivers #3837
base: v2_develop
Are you sure you want to change the base?
Conversation
Hope you're ok with me updating the title & first post... |
Travelling and had a few minutes to play.... This is looking great. I agree with your plan for mergeing... Some new issues I noticed: Line Drawing pallette is corrupt. Drag about box window broken (and crashes) on .win driver. Drag scroll bar sometimes doesn't restore non-drag color: Numeric up/down does not auto-increment/acellerate when held. Charmap has a bunch of issues. Getting CP info never completes. When loaded, the right hand pane doesn't show until a mouse move. |
Good finds! seems I was not raising released flags on win driver. cc96920 shoulf fix the 'mouse grab' related bugs (drag window etc) |
Initial size is corrupt, if you drag out the bottom and right it appears as it does in normal drivers. The checker pattern for background color is normal. Though I note that background colour doesnt work in any of the drivers - seems like a regression, I remember it used to work. Does need fixing though - Need to understand which views are being wrong size and why - they seem to have minimum size.
Hmn probably it doesn't properly implement NeedsDisplay or part of its layout doesn't trigger it. I think there will quite a bit of this, we need to have things like view becoming visible for first time to set it as NeedsDisplay. The old architecture had a lot more
Seems Relevant code in old Run is public static bool RunIteration (ref RunState state, bool firstIteration = false)
{
// If the driver has events pending do an iteration of the driver MainLoop
if (MainLoop!.Running && MainLoop.EventsPending ())
{
// Notify Toplevel it's ready
if (firstIteration)
{
state.Toplevel.OnReady ();
}
MainLoop.RunIteration (); |
Have fixed the Ready event not being raised in 6b9367f. |
Investigate fix for detecting Alt+Key escape sequences
Creates new drivers that are simpler versions of existing WindowsDriver and NetDriver. Also introduces a shared architecture such that only subcomponents vary between driver implementations, as discussed in #3821 .
After a period of shared execution with both sets of drivers available we will fix any bugs and then retire the old drivers.
Curses driver is not tackled, I am hopeful it can be retired completely now that net input is so strong and well implemented in core dotnet framework.
Fixes
ConsoleDriver
to minimize duplicated code in all drivers #2319EscSeqUtils
#2803ConsoleDriver
s to support ANSI sequences natively (e.g. Virtual Terminal Sequences on Windows) #2610Button1Clicked
events onNetdriver
orCursesDriver
#3374Metrics
You can now see metrics on ant Terminal.Gui program by using its exe name and a metrics tool e.g.
Implementation uses System.Diagnostics.Metrics making it integrate easily with tools such as OpenTelemetry
Logging
You can enable logging of internals of Terminal.Gui by setting
Logging.Logger
to anyMicrosoft.Extensions.Logging
compatible logging framework (nlog, serilog etc).Naturally you must not use a console logger
For example with Serilog to a file:
Progress
MouseInterpreter
)Proposed Changes/Todos
Splits drivers up into logical components, simplifies and centralizes shared code patterns.
Pull Request checklist:
CTRL-K-D
to automatically reformat your files before committing.dotnet test
before commit///
style comments)