Lines Matching refs:sequence
66 # methods: bind and unbind, which get a function and a parsed sequence, as
76 self.sequence = '<'+_types[type][0]+'>'
95 self.sequence, handler)
101 self.widget.unbind(self.widgetinst, self.sequence, self.handlerid)
107 self.widget.unbind(self.widgetinst, self.sequence,
267 def _parse_sequence(sequence):
268 """Get a string which should describe an event sequence. If it is
273 if not sequence or sequence[0] != '<' or sequence[-1] != '>':
275 words = sequence[1:-1].split('-')
334 def bind(self, sequence=None, func=None, add=None):
335 #print("bind(%s, %s, %s)" % (sequence, func, add),
337 if type(sequence) is str and len(sequence) > 2 and \
338 sequence[:2] == "<<" and sequence[-2:] == ">>":
339 if sequence in self.__eventinfo:
340 ei = self.__eventinfo[sequence]
349 self.__eventinfo[sequence] = [func, []]
350 return widget.bind(self, sequence, func, add)
352 def unbind(self, sequence, funcid=None):
353 if type(sequence) is str and len(sequence) > 2 and \
354 sequence[:2] == "<<" and sequence[-2:] == ">>" and \
355 sequence in self.__eventinfo:
356 func, triplets = self.__eventinfo[sequence]
360 self.__eventinfo[sequence][0] = None
361 return widget.unbind(self, sequence, funcid)