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

Add Box (and HBox and VBox) to dispatching to contents based on type #86

Open
danielballan opened this issue Jan 12, 2021 · 0 comments
Open

Comments

@danielballan
Copy link
Member

A Box model will hold a list of heterogenous models, as in [figure_spec, slider_spec, figure_spec_list]. Each Box view will iterate this list and build the corresponding view for its framework.

We may wish to make it possible to inject custom classes for the sub-views, as in:

VBoxView(vbox_model, views={bluesky_widgets.models.FigureSpec: CustomQtFigureView})

where these override the defaults. We could also, as usual, accepts strings with an import path in place of the actual classes.

We should also pay attention to the __mro__. We should check if the specific model class has a specific view, and then walk its base classes in order to check them.

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

No branches or pull requests

1 participant