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

Allow forwarding resize events #103 #104

Closed
wants to merge 1 commit into from
Closed

Conversation

nagylzs
Copy link

@nagylzs nagylzs commented Jan 18, 2025

No description provided.

@andydotxyz
Copy link
Member

The resize event is already available - by extending the widget and adding your own Resize(fyne.Size) method.
We don't add "OnXxx" handlers for events because it makes a much more cluttered API.
Widgets get events by implementing the interface, and you can get that for an existing widget by extending.

Copy link
Member

@andydotxyz andydotxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've left a comment on the issue about why I don't think this is needed.

If you disagree or there is still a use-case please consider not exposing internal dependencies in the resulting API

}

type ResizeHandler = func(size *pty.Winsize)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not expose a third party API as a type in our APIs - it assumes that Terminal is always connected to a "github.com/creack/pty"

@nagylzs
Copy link
Author

nagylzs commented Jan 20, 2025

Closing this pull request, a different solution is needed to make the Terminal widget extensible. See #103 (comment)

@nagylzs nagylzs closed this Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants