A Window is a top-level component. In order to be visible on the screen, a component must be directly or indirectly contained in a window.
A newly-created window is initially hidden so that components can be added to it without unsightly flashing. Once constructed, it should be shown using the show method.
- Window(style = 'standard',
- movable = default, closable = default, hidable = default,
- resizable = default, zoomable = default)
- The style parameter determines the appearance of the window, according to platform conventions. It is one of:
- 'standard'
- 'nonmodal_dialog'
- 'modal_dialog'
- 'alert'
- 'fullscreen'
- Not all of these styles are necessarily distinguishable on all platforms.
- Note that the 'modal_dialog'and 'alert' styles only affect the appearance of the window; they do not in themselves cause the window to behave modally. For a window with modal behaviour, use a ModalDialog or one of the alert functions.
- The options'movable', 'closable', 'resizable', 'hidable'(minimizable) and 'zoomable'(maximizable) request the presence or absence of controls for performing these functions. The default values of these options depend on the window style in a platform-dependent way. Some combinations of styles and options may not be available, in which case you will get the nearest available combination.
A 'fullscreen' window is created without any title, borders or other decoration, and with an initial size and position that covers the whole screen. The effect of changing a fullscreen window's size or position is undefined. On MacOSX, the menu bar is hidden when a fullscreen window is the active window.
Note: the fullscreen style is currently not implemented on Gtk.
- title
- Title of the window. Whether and how the title is displayed depends on the window style and platform conventions.
- document
- The Document instance to which this window belongs, if any.
- menus
- List of window-specific menus, i.e. those which should be available only when this window is active.
- Do not modify the contents of this list. To change it, you should construct a new list of menus and then assign the whole list to this property.
- visible
- True if the window is shown on the screen. The visibility of the window can be changed using the show and hide methods, or by assigning to this property. The effect on window stacking order of assigning true to this property is undefined.
- auto_position
- If true, the window will be positioned automatically the first time it is shown. The method of positioning depends on the platform and the style of the window. Typically, dialog windows will be centred on the screen, and other windows will be staggered or the user will be asked to place them.
If false, the initial position of the window is determined by the settings of its geometry properties.
- target
- Read only. The component within the window, if any, that is currently the target of keyboard events and menu commands. May not be implemented on all platforms.