Lines Matching refs:triplet
78 def bind(self, triplet, func):
94 def unbind(self, triplet, func):
204 def bind(self, triplet, func):
205 if triplet[2] not in self.bindedfuncs:
206 self.bindedfuncs[triplet[2]] = [[] for s in _states]
209 for detail in (triplet[2], None)
213 seq = "<%s%s-%s>"% (_state_names[s], self.typename, triplet[2])
216 doit = lambda: self.bindedfuncs[triplet[2]][triplet[0]].append(func)
222 def unbind(self, triplet, func):
223 doit = lambda: self.bindedfuncs[triplet[2]][triplet[0]].remove(func)
296 def _triplet_to_sequence(triplet):
297 if triplet[2]:
298 return '<'+_state_names[triplet[0]]+_types[triplet[1]][0]+'-'+ \
299 triplet[2]+'>'
301 return '<'+_state_names[triplet[0]]+_types[triplet[1]][0]+'>'
331 for triplet in ei[1]:
332 self.__binders[triplet[1]].unbind(triplet, ei[0])
335 for triplet in ei[1]:
336 self.__binders[triplet[1]].bind(triplet, func)
347 for triplet in triplets:
348 self.__binders[triplet[1]].unbind(triplet, func)
359 triplet = _parse_sequence(seq)
360 if triplet is None:
365 self.__binders[triplet[1]].bind(triplet, func)
366 triplets.append(triplet)
373 triplet = _parse_sequence(seq)
374 if triplet is None:
379 self.__binders[triplet[1]].unbind(triplet, func)
380 triplets.remove(triplet)
394 for triplet in triplets:
395 self.__binders[triplet[1]].unbind(triplet, func)