def __init__(self, parent, x, y, w=None, h=None):
self._children = []
self._parent = parent
self._x = x
self._y = y
self._h = h
self._w = w
self._vcenter, self._hcenter = False, False
self.set_size(w, h)
ax, ay = self.get_screen_coords(0, 0)
self._wnd = curses.newwin(self._h, self._w, ay, ax)
if parent is not None:
parent._children.append(self)
评论列表
文章目录