(self, l, t, r, b)
Set window coordinate
Set window coordinate
Set window coordinate
def set_rect(self, l, t, r, b):
        """Set window coordinate"""

        if hasattr(self, 'splitter') and self.splitter:
            assert t <= self.splitter.rect[1]

        try:
            self._cwnd = curses.newwin(b - t, r - l, t, l)
            self.rect = (l, t, r, b)
        except curses.error:
            log.debug('error on resizing window: {} {}'.format(self,
                                                               (l, t, r, b), exc_info=True))
            # shrink window to avoid segfault in curses
            self._cwnd = curses.newwin(1, 1, 0, 0)
            self.rect = (0, 0, 1, 1)

        # surprisingly enough, the following assert fails sometime.
#        t, l = self._cwnd.getbegyx()
#        h, w = self._cwnd.getmaxyx()
#        assert (l, t, l+w, t+h) == self.rect

        self._cwnd.keypad(1)

        self._panel = curses.panel.new_panel(self._cwnd)
        self.on_setrect(*self.rect)
def set_rect ( self , l , t , r , b ) : if hasattr ( self , 'splitter' ) and self . splitter : assert t <= self . splitter . rect [ 1 ] try : self . _cwnd = curses . newwin ( b - t , r - l , t , l ) self . rect = ( l , t , r , b ) except curses . error : log . debug ( 'error on resizing window: {} {}' . format ( self , ( l , t , r , b ) , exc_info = True ) ) # shrink window to avoid segfault in curses self . _cwnd = curses . newwin ( 1 , 1 , 0 , 0 ) self . rect = ( 0 , 0 , 1 , 1 ) # surprisingly enough, the following assert fails sometime. #        t, l = self._cwnd.getbegyx() #        h, w = self._cwnd.getmaxyx() #        assert (l, t, l+w, t+h) == self.rect self . _cwnd . keypad ( 1 ) self . _panel = curses . panel . new_panel ( self . _cwnd ) self . on_setrect ( * self . rect )