MCPcopy Index your code
hub / github.com/bqplot/bqplot / _create_selector

Function _create_selector

bqplot/pyplot.py:1088–1111  ·  view source on GitHub ↗

Create a selector of the specified type. Also attaches the function `func` as an `on_trait_change` listener for the trait `trait` of the selector. This is an internal function which should not be called by the user. Parameters ---------- int_type: type The type of

(int_type, func, trait, **kwargs)

Source from the content-addressed store, hash-verified

1086
1087
1088def _create_selector(int_type, func, trait, **kwargs):
1089 """Create a selector of the specified type.
1090
1091 Also attaches the function `func` as an `on_trait_change` listener
1092 for the trait `trait` of the selector.
1093
1094 This is an internal function which should not be called by the user.
1095
1096 Parameters
1097 ----------
1098
1099 int_type: type
1100 The type of selector to be added.
1101 func: function
1102 The call back function. It should take at least two arguments. The name
1103 of the trait and the value of the trait are passed as arguments.
1104 trait: string
1105 The name of the Selector trait whose change triggers the
1106 call back function `func`.
1107 """
1108 interaction = _add_interaction(int_type, **kwargs)
1109 if func is not None:
1110 interaction.on_trait_change(func, trait)
1111 return interaction
1112
1113
1114def brush_int_selector(func=None, trait='selected', **kwargs):

Callers 6

brush_int_selectorFunction · 0.85
int_selectorFunction · 0.85
index_selectorFunction · 0.85
brush_selectorFunction · 0.85
multi_selectorFunction · 0.85
lasso_selectorFunction · 0.85

Calls 1

_add_interactionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…