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

Method __init__

editor/editor_widgets.py:968–989  ·  view source on GitHub ↗
(self, widget, attributeName, propertyDef, attributeDict, appInstance, *args, **kwargs)

Source from the content-addressed store, hash-verified

966
967class EditorAttributeInputCssSize(EditorAttributeInputBase):
968 def __init__(self, widget, attributeName, propertyDef, attributeDict, appInstance, *args, **kwargs):
969 super(EditorAttributeInputCssSize, self).__init__(
970 widget, attributeName, propertyDef, attributeDict, appInstance, *args, **kwargs)
971 self.numInput = gui.SpinBox(
972 '0', -999999999, 999999999, 1, width='100%', height='100%')
973 self.numInput.onchange.do(self.onchange)
974 self.numInput.style['text-align'] = 'right'
975
976 self.dropMeasureUnit = gui.DropDown(width='100%', height='100%')
977 self.dropMeasureUnit.append(gui.DropDownItem('px'), 'px')
978 self.dropMeasureUnit.append(gui.DropDownItem('%'), '%')
979 self.dropMeasureUnit.select_by_key('px')
980 self.dropMeasureUnit.onchange.do(self.onchange)
981 '''
982 self.set_from_asciiart("""
983 |del|lbl |input |meas |
984 """)
985 '''
986 self.style.update({'grid-template-columns': "6% 46% 33% 15%",
987 'grid-template-rows': "100%", 'grid-template-areas': "'del lbl input meas'"})
988 self.append({'del': self.removeAttribute, 'lbl': self.label,
989 'input': self.numInput, 'meas': self.dropMeasureUnit})
990
991 def onchange(self, widget, new_value):
992 new_size = str(self.numInput.get_value()) + \

Callers

nothing calls this directly

Calls 5

__init__Method · 0.45
doMethod · 0.45
appendMethod · 0.45
select_by_keyMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected