def editUI(self, setPaddingFn): box = _boxStyle(Bin(Label('Padded element'))).alignHExpand().alignVExpand() left = self.left.editUI(lambda live: RealSpinEntry(live, 0.0, 1048576.0, 1.0, 10.0)) right = self.right.editUI(lambda live: RealSpinEntry(live, 0.0, 1048576.0, 1.0, 10.0)) top = self.top.editUI(lambda live: RealSpinEntry(live, 0.0, 1048576.0, 1.0, 10.0)) bottom = self.bottom.editUI(lambda live: RealSpinEntry(live, 0.0, 1048576.0, 1.0, 10.0)) return _tableStyle(Table([[None, top, None], [left, box, right], [None, bottom, None]]))
def _editUIFormSections(self): width = Form.SmallSection( 'Width', None, self.width.editUI( lambda live: RealSpinEntry(live, 0.0, 1048576.0, 1.0, 10.0))) height = Form.SmallSection( 'Height', None, self.height.editUI( lambda live: RealSpinEntry(live, 0.0, 1048576.0, 1.0, 10.0))) superSections = super(GUISpacer, self)._editUIFormSections() return [width, height] + superSections
def _editUIFormSections(self): width = Form.SmallSection( 'Width', None, self.width.editUI( lambda live: RealSpinEntry(live, 0.0, 1048576.0, 1.0, 10.0))) height = Form.SmallSection( 'Height', None, self.height.editUI( lambda live: RealSpinEntry(live, 0.0, 1048576.0, 1.0, 10.0))) sizeConstraintX = Form.SmallSection( 'Constraint-X', None, self.sizeConstraintX.editUI(_sizeConstraintEditor)) sizeConstraintY = Form.SmallSection( 'Constraint-Y', None, self.sizeConstraintY.editUI(_sizeConstraintEditor)) superSections = super(GUISpaceBin, self)._editUIFormSections() return [width, height, sizeConstraintX, sizeConstraintY ] + superSections
def _editUIFormSections(self): direction = Form.SmallSection( 'Direction', None, self.direction.editUI(self._arrowDirectionEditor)) size = Form.SmallSection( 'Size', None, self.size.editUI( lambda live: RealSpinEntry(live, 0.0, 1048576.0, 1.0, 10.0))) superSections = super(GUIArrow, self)._editUIFormSections() return [direction, size] + superSections
def formSections(self): return [ Form.SmallSection( 'Thickness', None, self.thickness.editUI(lambda live: RealSpinEntry( live, 0.0, 10240.0, 0.1, 10.0))), Form.SmallSection( 'Inset', None, self.inset.editUI(lambda live: RealSpinEntry( live, 0.0, 10240.0, 0.1, 10.0))), Form.SmallSection( 'Round-X', None, self.roundingX.editUI(lambda live: RealSpinEntry( live, 0.0, 10240.0, 0.1, 10.0))), Form.SmallSection( 'Round-Y', None, self.roundingY.editUI(lambda live: RealSpinEntry( live, 0.0, 10240.0, 0.1, 10.0))), Form.SmallSection( 'Border colour', None, self.borderPaint.editUI( lambda live: ColourPicker(live).alignHPack())), Form.SmallSection( 'Background colour', None, self.backgroundPaint.editUI(lambda live: optionalTypedEditor( live, Color.WHITE, lambda live: ColourPicker(live). alignHPack()))), Form.SmallSection( 'Hover border colour', None, self.highlightBorderPaint.editUI( lambda live: optionalTypedEditor( live, Color.BLACK, lambda live: ColourPicker(live). alignHPack()))), Form.SmallSection( 'Hover background colour', None, self.highlightBackgroundPaint.editUI( lambda live: optionalTypedEditor( live, Color.WHITE, lambda live: ColourPicker(live). alignHPack()))), ]
def buildEditorPres(self, fragment, inheritedState): self._incr.onAccess() return RealSpinEntry(self._model.liveValue, self._min, self._max, self._step, self._page)