예제 #1
0
    def __init__(self, *args, **kw):
        """
        A window, plain and simple. Window is a type of :class:`manygui.Frame`, so you can add
        components to it and set its layout property etc. To make your window
        appear, you must remember to add it to your Application, just like you
        add other components to Frames and Windows:

        .. code-block:: python

              win = Window()
              app = Application()
              app.add(win)
              app.run()

        Windows have a title attribute which may be used by the operating
        system or window manager to identify the window to the user in various
        ways. It also has a size:

        .. code-block:: python

              w = Window()
              w.title = 'Hello, world!'
              w.size = (200, 100)

        If we want to, we can supply the widget properties as keyword
        arguments to the constructor:

        .. code-block:: python

              w = Window(title='Hello, world!', size=(200,100))
        """
        AbstractFrame.__init__(self, *args, **kw)

        # Window staggering code:
        # FIXME: Should be offset from current top window, if any
        self._x = Defaults.Window._x
        self._y = Defaults.Window._y
        Defaults.shift_window()
        
        #application()._add_window(self) # Now done explicitly

        """
예제 #2
0
파일: Windows.py 프로젝트: ProgVal/Manygui
 def __init__(self, *args, **kw):
     Frame.__init__(self, *args, **kw)
     Defaults.shift_window()