def box_init(self):
"""Clear the main screen and redraw the box and/or title
"""
# Touchwin seems to save the underlying screen and refreshes it (for
# example when the help popup is drawn and cleared again)
self.scr.touchwin()
self.scr.refresh()
self.stdscr.clear()
self.stdscr.refresh()
if self.box is True:
self.boxscr.clear()
self.boxscr.box()
if self.title:
addstr(self.boxscr, 1, 1, self.title, curses.A_BOLD)
addstr(self.boxscr, self.title_help, curses.A_STANDOUT)
self.boxscr.refresh()
elif self.title:
self.boxscr.clear()
addstr(self.boxscr, 0, 0, self.title, curses.A_BOLD)
addstr(self.boxscr, self.title_help, curses.A_STANDOUT)
self.boxscr.refresh()
评论列表
文章目录