comparison urwid_satext/sat_widgets.py @ 124:db9bc68ca0a8

minor docstring correction
author Goffi <goffi@goffi.org>
date Tue, 12 Jul 2016 20:23:07 +0200
parents 00b012549f88
children 88722f920b3c
comparison
equal deleted inserted replaced
123:f2589475269f 124:db9bc68ca0a8
61 def getValue(self): 61 def getValue(self):
62 return self.get_edit_text() 62 return self.get_edit_text()
63 63
64 def setCompletionMethod(self, callback): 64 def setCompletionMethod(self, callback):
65 """Define method called when completion is asked 65 """Define method called when completion is asked
66
66 @callback: method with 2 arguments: 67 @callback: method with 2 arguments:
67 - the text to complete 68 - the text to complete (part after cursor position is ignored)
68 - if there was already a completion, a dict with 69 - if there was already a completion, a dict with
69 - 'completed':last completion 70 - 'completed':last completion
70 - 'completion_pos': cursor position where the completion starts 71 - 'completion_pos': cursor position where the completion starts
71 - 'position': last completion cursor position 72 - 'position': last completion cursor position
72 this dict must be used (and can be filled) to find next completion) 73 this dict must be used (and can be filled) to find next completion)
73 and which return the full text completed""" 74 and which return the full text completed
75 """
74 self.completion_cb = callback 76 self.completion_cb = callback
75 self.completion_data = {} 77 self.completion_data = {}
76 78
77 def keypress(self, size, key): 79 def keypress(self, size, key):
78 #TODO: insert mode is not managed yet 80 #TODO: insert mode is not managed yet