ToggleMapper¶
- class spectacoular.factory.ToggleMapper(obj, traitname)¶
Bases:
NumericInputMapper
Factory that creates
Toggle
widget from a class trait attribute of type Bool.- create_widget(**kwargs)¶
creates a Bokeh Toggle instance
- Parameters:
- **kwargsargs of Toggle
additional arguments of Toggle widget.
- Returns:
- instance(Toggle).
- set_widget(widget)¶
connects a Bokeh Toggle widget instance to a class trait attribute
- Parameters:
- widgetinstance(Toggle)
instance of a Toggle widget.
- Returns:
- None.