def register(registry): """ Register interactions pertaining to (wx) FontEditor for the given registry. Parameters ---------- registry : TargetRegistry The registry being registered to. """ register_editable_textbox_handlers( registry=registry, target_class=TextFontEditor, widget_getter=lambda wrapper: wrapper._target.control, )
def register(registry): """Register interactions for the given registry. If there are any conflicts, an error will occur. Parameters ---------- registry : TargetRegistry The registry being registered to. """ register_editable_textbox_handlers( registry=registry, target_class=SimpleEditor, widget_getter=lambda wrapper: wrapper._target._file_name, )
def register(cls, registry): """ Class method to register interactions on a LocatedTextbox for the given registry. If there are any conflicts, an error will occur. Parameters ---------- registry : TargetRegistry The registry being registered to. """ _registry_helper.register_editable_textbox_handlers( registry=registry, target_class=cls, widget_getter=lambda wrapper: wrapper._target.textbox, )
def register(registry): """ Register interactions for the given registry. If there are any conflicts, an error will occur. Parameters ---------- registry : TargetRegistry The registry being registered to. """ register_editable_textbox_handlers( registry=registry, target_class=TextEditor, widget_getter=lambda wrapper: wrapper._target.control, ) registry.register_interaction( target_class=ReadonlyEditor, interaction_class=DisplayedText, handler=lambda wrapper, _: _interaction_helpers. readonly_textbox_displayed_text(wrapper._target.control), )
def register(registry): """Register interactions for the given registry. If there are any conflicts, an error will occur. Parameters ---------- registry : TargetRegistry The registry being registered to. """ targets = [ SimpleSliderEditor, LogRangeSliderEditor, LargeRangeSliderEditor, ] for target_class in targets: registry.register_location( target_class=target_class, locator_class=Textbox, solver=lambda wrapper, _: LocatedTextbox(textbox=wrapper._target. control.text), ) registry.register_location( target_class=target_class, locator_class=Slider, solver=lambda wrapper, _: LocatedSlider(slider=wrapper._target. control.slider), ) _registry_helper.register_editable_textbox_handlers( registry=registry, target_class=RangeTextEditor, widget_getter=lambda wrapper: wrapper._target.control, ) LocatedTextbox.register(registry) LocatedSlider.register(registry)