Skip to content
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

Update FindDeepestView to support Adornment #3273

Closed
tig opened this issue Feb 27, 2024 · 0 comments
Closed

Update FindDeepestView to support Adornment #3273

tig opened this issue Feb 27, 2024 · 0 comments
Labels

Comments

@tig
Copy link
Collaborator

tig commented Feb 27, 2024

  • There are no dedicated unit tests for FindDeepestView right now. We need some. Write some that test the current v2_develop version that prove it works.

  • The current version ignores Adornments and returns a view if x/y are anywhere within view.Frame.

  • Simplify FindDeepestView to NOT have the out params.

  • Modify FindDeepestView to return Margin, Padding, or Border if x/y match. In Application.OnMouseEvent, temporarily ignore these. Eg. like this:

        var view = View.FindDeepestView (Current, a.MouseEvent.X, a.MouseEvent.Y, out int screenX, out int screenY);

        // TODO: Remove this temporary filter:
        if (view is Adornment adornment)
        {
            view = adornment.Parent;
        }
  • Add FindDeepestView unit tests to prove this change works.

  • Delete all the Adornment-specific code in Application.OnMouseEvent and add MouseEvent handling code to Adornment, Margin, Border, and Padding as appropriate (e.g. Adornment.MouseClick += Parent.SetFocus()).

  • Don't worry about Adornment.SubViews yet. That should happen in either THIS PR or the Close Box PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: ✅ Done
Development

No branches or pull requests

1 participant