(self, parent, wnd=None, pos=None)
Wrap window object wnd. Create new window if wnd was omitted.
Wrap window object wnd. Create new window if wnd was omitted.
Wrap window object wnd . Create new window if wnd was omitted .
def __init__(self, parent, wnd=None, pos=None):
        """Wrap window object wnd. Create new window if wnd was omitted."""

        super().__init__()

        w, h = 1, 1
        x = y = 0
        if parent:
            w, h = parent.getsize()

        if wnd:
            self._cwnd = wnd
        else:
            if pos:
                x, y = pos
            else:
                x = y = 0

            w = max(1, w)
            h = max(1, h)
            self._cwnd = curses.newwin(h, w, y, x)

        self._panel = curses.panel.new_panel(self._cwnd)
        self._cwnd.keypad(1)
        self.parent = parent
        self.children = []
        if self.parent:
            self.parent.children.append(self)

        self.rect = (x, y, x + w, y + h)

        self._oninit()
def __init__ ( self , parent , wnd = None , pos = None ) : super ( ) . __init__ ( ) w , h = 1 , 1 x = y = 0 if parent : w , h = parent . getsize ( ) if wnd : self . _cwnd = wnd else : if pos : x , y = pos else : x = y = 0 w = max ( 1 , w ) h = max ( 1 , h ) self . _cwnd = curses . newwin ( h , w , y , x ) self . _panel = curses . panel . new_panel ( self . _cwnd ) self . _cwnd . keypad ( 1 ) self . parent = parent self . children = [ ] if self . parent : self . parent . children . append ( self ) self . rect = ( x , y , x + w , y + h ) self . _oninit ( )