def joinStaticStates(self, enable=doNothing, disable=doNothing): """ adds a enable and a disable sstatic tate function to the state setter/unsetter of this object. """ self._enableStaticStates = joinFunctions(self._enableStaticStates, enable) self._disableStaticStates = joinFunctions(self._disableStaticStates, disable)
def createDrawFunction(self): ModelSegment.createDrawFunction(self) # create evaluator state enabler and draw function for e in self.evaluators: e.createDrawFunction() # include evaluator states self.joinStaticStates(enable=e.enableStaticStates, disable=e.disableStaticStates) self.joinDynamicStates(enable=e.enableDynamicStates, disable=e.disableDynamicStates) # include evaluator draw function self._drawEvaluators = joinFunctions(self._drawEvaluators, e.draw)