l, r = self.cols(maxcol) return CanvasJoin([ Text.render(self, (l,), focus), maxcol - r, self.info.render((r,)), ]) else: def render(self, (maxcol,), focus=False): l, r = self.cols(maxcol) return CanvasJoin([ (Text.render(self, (l,), focus), None, True, maxcol - r), (self.info.render((r,)), None, False, r), ]) def rows(self, (maxcol,), focus=False): l, r = self.cols(maxcol) return max(Text.rows(self, (l,), focus), self.info.rows((r,))) class Input(Edit): _end = False def __init__(self, enter, leave): self._top = enter, leave Edit.__init__(self) def do(self, done, caption='', text='', tab=None): self._done = done self._tab = tab self.set_caption(caption) self.set_edit_text(text) self._end = True # TODO: find a better way to move the cursor the end.
def rows(self, xxx_todo_changeme3, focus=False): (maxcol, ) = xxx_todo_changeme3 lines, r = self.cols(maxcol) return max(Text.rows(self, (lines, ), focus), self.info.rows((r, )))