(
            self, mode, pages, attr, vpagenum, apagenum,
        )
Reset the text screen for new video mode.
Reset the text screen for new video mode.
Reset the text screen for new video mode .
def init_mode(
            self, mode, pages, attr, vpagenum, apagenum,
        ):
        """Reset the text screen for new video mode."""
        self.mode = mode
        self._attr = attr
        self._apagenum = apagenum
        self._vpagenum = vpagenum
        # character buffers
        self._pages = pages
        # pixel buffer
        self._apage = self._pages[self._apagenum]
        # redraw key line
        self.redraw_bar()
        # initialise text viewport & move cursor home
        self.scroll_area.init_mode(self.mode)
        self.set_pos(self.scroll_area.top, 1)
def init_mode ( self , mode , pages , attr , vpagenum , apagenum , ) : self . mode = mode self . _attr = attr self . _apagenum = apagenum self . _vpagenum = vpagenum # character buffers self . _pages = pages # pixel buffer self . _apage = self . _pages [ self . _apagenum ] # redraw key line self . redraw_bar ( ) # initialise text viewport & move cursor home self . scroll_area . init_mode ( self . mode ) self . set_pos ( self . scroll_area . top , 1 )