def draw_boxes(stdscr: window): """ This method draws the boxes on startup """ h = curses.LINES #Total height w = curses.COLS #Total width #Some debug values, remove these later text = "This is the start of a new window" # Clear screen stdscr.clear() stdscr.addstr(0, 0, 'This is the start of a new window') stdscr.noutrefresh() theight = 2 swidth = 15 mheight = h - theight - 2 mwidth = w - swidth - 2 win['t'] = curses.newwin(theight, mwidth, h - 1 - theight, 1) win['t'].addstr(0, 0, "This is the messages windows") win['m'] = curses.newwin(mheight, mwidth, 1, 1) win['m'].addstr(0, 0, "Type something here.") win['m'].timeout(0) win['s'] = curses.newwin(h - 2, swidth, 1, w - swidth - 1) win['s'].addstr(0, 0, "This is a side pane")
def redraw(self, wnd: _curses.window): "Refresh the view display" wnd.clear() self.fits = self.app.renderer.on_wnd(wnd, self.app.theme, 0, 0, self.scroll, "issue_view.j2", key=self.issue.key, issue=self.issue.fields)
def redraw(self, wnd: _curses.window): "Refresh the view display" wnd.clear() wnd.addstr(0, 0, "Dashboard", self.app.theme.TITLE) if self.update_in_progress: wnd.addstr(2, 0, "Updating database")