MCPcopy Index your code
hub / github.com/rawpython/remi / add_widget_to_collection

Method add_widget_to_collection

editor/editor_widgets.py:668–679  ·  view source on GitHub ↗
(self, widgetClass, group='standard_tools', **kwargs_to_widget)

Source from the content-addressed store, hash-verified

666 'error loading external widgets', exc_info=True)
667
668 def add_widget_to_collection(self, widgetClass, group='standard_tools', **kwargs_to_widget):
669 # create an helper that will be created on click
670 # the helper have to search for function that have 'return' annotation 'event_listener_setter'
671 if group not in self.widgetsContainer.children.keys():
672 self.widgetsContainer.append(EditorAttributesGroup(group), group)
673 self.widgetsContainer.children[group].style['width'] = "100%"
674
675 helper = WidgetHelper(
676 self.appInstance, widgetClass, **kwargs_to_widget)
677 helper.attributes['title'] = widgetClass.__doc__
678 #self.widgetsContainer.append( helper )
679 self.widgetsContainer.children[group].append(helper)
680
681
682class EditorAttributesGroup(gui.VBox):

Callers 2

__init__Method · 0.95

Calls 3

WidgetHelperClass · 0.85
appendMethod · 0.45

Tested by

no test coverage detected