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

Decouple actions from editor #14

Open
bvssvni opened this issue Oct 10, 2015 · 0 comments
Open

Decouple actions from editor #14

bvssvni opened this issue Oct 10, 2015 · 0 comments

Comments

@bvssvni
Copy link
Member

bvssvni commented Oct 10, 2015

If actions can do all their work through the Editor trait, then it is possible to control actions externally without adding dependencies to the editor controller. The only thing shared between the editor and actions could be the type of the data that gets edited.

For example, one could write a tool controller that had button settings and linked up actions through fn (&mut Editor) -> Result<(), ()>. The editor or tool controller do not need to depend on the actions, so it could be used as a library and extended with new features.

Tool controllers could be part of the library that shares the tool state between editor and actions. There could be a default alternative for tool controller. However, it will be possible to switch it out for another.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant