Terminal.Gui
Terminal.Gui copied to clipboard
Refactor `MouseEvent` and `MouseEventEventArgs` to simplify
Similar in spirit, but somewhat less scope, than #2927
- [x]
New/OnMouseEventnow uses justMouseEvent. - [x]
New/OnMouseClickednow uses justMouseEvent. - [ ] Beef-up/refactor mouse unit tests
- [ ] Merge MouseEvent and MouseEventEventArgs into a single class.
- [x] Better document/rename
OfX/OfY - [x] Move mouse stuff out of
Responderand intoViewsoRespondercan be nuked - [ ] Engineer something that removes the need for
Responder.IsOverriddenwhich breaks all rules of OO design. - [ ] Ensure all library code uses consistent naming/usage
- [ ] Ensure all Scenario code uses best practices related to new design.
- [ ] Ensure all API documentation is awesome
- [x] Add a
docs/mouse.md
Partially fixed in #3372.
BTW:
For adherence to the dotnet design guidelines for events, all EventArgs classes should end in "EventArgs" and should not be mixed use classes outside of events themselves (Key, for example, is used both ways - I have a stashed change somewhere that's probably way obsolete by now that fixed that).
Inheriting from EventArgs also used to be recommended, but is now just a soft suggestion.
Here's one of the best of the various documents about guidelines for events:
https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/events/how-to-publish-events-that-conform-to-net-framework-guidelines