Skip to content

New Plugin trait#7385

Merged
lucasmerlin merged 17 commits intomainfrom
lucas/plugin-trait
Sep 16, 2025
Merged

New Plugin trait#7385
lucasmerlin merged 17 commits intomainfrom
lucas/plugin-trait

Conversation

@lucasmerlin
Copy link
Copy Markdown
Collaborator

@lucasmerlin lucasmerlin commented Jul 23, 2025

This adds a new Plugin trait and new input_hook and output_hook plugin fns. Having a Plugin trait should make it easier to store state in the plugin and improve discoverability of possible plugin hooks.

The old on_begin_pass and on_end_pass have been ported to use the new plugin trait, should we deprecate them?

@github-actions
Copy link
Copy Markdown

Preview available at https://egui-pr-preview.github.io/pr/7385-lucasplugin-trait
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

@lucasmerlin lucasmerlin added feature New feature or request egui labels Jul 23, 2025
@lucasmerlin
Copy link
Copy Markdown
Collaborator Author

Now that I'm done I'm not super convinced that this is better then the previous api. Maybe instead I should just add Context::on_input and Context::on_output?

@lucasmerlin lucasmerlin merged commit f2f00ef into main Sep 16, 2025
47 checks passed
@lucasmerlin lucasmerlin deleted the lucas/plugin-trait branch September 16, 2025 08:56
mankinskin pushed a commit to mankinskin/egui that referenced this pull request Sep 17, 2025
This adds a new `Plugin` trait and new `input_hook` and `output_hook`
plugin fns. Having a `Plugin` trait should make it easier to store state
in the plugin and improve discoverability of possible plugin hooks.

The old `on_begin_pass` and `on_end_pass` have been ported to use the
new plugin trait, should we deprecate them?
Masterchef365 pushed a commit to Masterchef365/egui that referenced this pull request Apr 3, 2026
This adds a new `Plugin` trait and new `input_hook` and `output_hook`
plugin fns. Having a `Plugin` trait should make it easier to store state
in the plugin and improve discoverability of possible plugin hooks.

The old `on_begin_pass` and `on_end_pass` have been ported to use the
new plugin trait, should we deprecate them?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

egui feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants