Terminal.Gui icon indicating copy to clipboard operation
Terminal.Gui copied to clipboard

Re-factor `Cursor` handling per `./docfx/docs/cursor.md`

Open tig opened this issue 1 year ago • 1 comments

Related:

  • #3432

See:

https://github.com/gui-cs/Terminal.Gui/blob/v2_develop/docfx/docs/cursor.md

Note, in this we need to fix Focused and MostFocused such that these unit tests are addressed:

    [Fact, Trait("BUGBUG", "Fix in Issue #3444")]
    public void Focused_NoSubviews ()
    {
        var view = new View ();
        Assert.Null (view.Focused);

        view.CanFocus = true;
        view.SetFocus ();
        Assert.True (view.HasFocus);
        Assert.Null (view.Focused); // BUGBUG: Should be view
    }

    // View.MostFocused - No subviews
    [Fact, Trait ("BUGBUG", "Fix in Issue #3444")]
    public void Most_Focused_NoSubviews ()
    {
        var view = new View ();
        Assert.Null (view.Focused);

        view.CanFocus = true;
        view.SetFocus ();
        Assert.True (view.HasFocus);
        Assert.Null (view.MostFocused); // BUGBUG: Should be view
    }

tig avatar Apr 30 '24 20:04 tig

👍

Remember to include the using for those Views.

[MustDisposeResource] whining

Too bad the MustDisposeResourceAttribute is not more flexible like being able to tell it to only care about locals or something, because that'd make these show codefixes.

You _can_ use it in conjunction with HandlesResourseDisposalAttribute, but it's applied by the consuming code. I'd like to be able to specify some sort of filter where MustDisposeResource is used. Oh well...

I do think I've seen something similar on their tracker for feature requests, so maybe some day... *wistfully stares out a window*

dodexahedron avatar May 09 '24 03:05 dodexahedron