(self, cls, *args, **kwargs)
return processor
Add a new processor, which handles processing of interaction events.
        Several processors can be defined in an InteractionManager instance.
        One event can be handled by several processors.
Add a new processor, which handles processing of interaction events.
        Several processors can be defined in an InteractionManager instance.
        One event can be handled by several processors.
Add a new processor which handles processing of interaction events . Several processors can be defined in an InteractionManager instance . One event can be handled by several processors .
def add_processor(self, cls, *args, **kwargs):
        """Add a new processor, which handles processing of interaction events.
        Several processors can be defined in an InteractionManager instance.
        One event can be handled by several processors.
        """
        # get the name of the visual from kwargs
        name = kwargs.pop('name', 'processor%d' % (len(self.get_processors())))
        if self.get_processor(name):
            raise ValueError("Processor name '%s' already exists." % name)
        activated = kwargs.pop('activated', True)
        processor = cls(self, *args, **kwargs)
        self.processors[name] = processor
        processor.activate(activated)
        return processor
def add_processor ( self , cls , * args , * * kwargs ) : # get the name of the visual from kwargs name = kwargs . pop ( 'name' , 'processor%d' % ( len ( self . get_processors ( ) ) ) ) if self . get_processor ( name ) : raise ValueError ( "Processor name '%s' already exists." % name ) activated = kwargs . pop ( 'activated' , True ) processor = cls ( self , * args , * * kwargs ) self . processors [ name ] = processor processor . activate ( activated ) return processor