Example #1
0
File: app.py Project: sunruix/toot
    def refresh_text(self):
        text = self.get_content()
        lines = text.split('\n')
        draw_lines(self.text_window, lines, 0, 0, Color.WHITE)

        text_window_height, text_window_width = self.text_window.getmaxyx()
        text_on_screen = (''.join(self.content)[:self.cursor_pos] + '_').split('\n')
        y, x = size_as_drawn(text_on_screen, text_window_width)
        self.text_window.move(y, x)
Example #2
0
File: app.py Project: sunruix/toot
    def full_redraw(self):
        self.window.erase()
        self.window.box()

        draw_lines(self.window, ["{}  (^D to confirm):".format(self.title)], 1, 2, Color.WHITE)
        if self.footer:
            window_height, window_width = self.window.getmaxyx()
            draw_lines(self.window, [self.footer], window_height - self.pad_y + 1, 2, Color.WHITE)

        self.window.refresh()
        self.refresh_text()
Example #3
0
File: app.py Project: anjandev/toot
    def draw(self, status):
        self.window.erase()
        self.window.box()

        if not status:
            return

        content = self.content_lines(status)
        footer = self.footer_lines(status)

        y = draw_lines(self.window, content, 1, 2, Color.WHITE)
        draw_horizontal_divider(self.window, y)
        draw_lines(self.window, footer, y + 1, 2, Color.WHITE)

        self.window.refresh()
Example #4
0
File: app.py Project: anjandev/toot
 def draw(self):
     self.window.erase()
     self.window.box()
     draw_lines(self.window, self.get_content(), 1, 2, Color.WHITE)
Example #5
0
File: app.py Project: l-n-s/toot
 def full_redraw(self):
     self.setup_windows()
     self.window.box()
     draw_lines(self.window, self.get_content(), 1, 2, Color.WHITE)