.. _Window: ================================================ Window ================================================ Description ----------- The instance represents a top-level window or dialog box, which contains user-interface elements. The globally available?Window?object provides access to predefined and script-defined windows. Properties ^^^^^^^^^^ +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`active` readonly | Set to true to make this window active. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`alignChildren` readonly | Tells the layout manager how unlike-sized children of this container should be aligned within a column or row. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`alignment` readonly | The alignment style for child elements of a container. If defined, this value overrides the alignChildren setting for the parent container. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bounds` readonly | The bounds of the window's drawable area, excluding the frame, in screen coordinates. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`cancelElement` readonly | For windows of type dialog, the UI element to notify when the user presses a cancellation key combination. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`characters` readonly | A number of characters for which to reserve space when calculating the preferred size of the window. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`children` readonly | The collection of UI elements that have been added to this container. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`defaultElement` readonly | For windows of type dialog, the UI element to notify when the user presses a Enter key. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`enabled` readonly | True if this element is enabled. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`frameBounds` readonly | The bounds of the window frame in screen coordinates. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`frameLocation` readonly | The top left corner of the window frame in screen coordinates. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`frameSize` readonly | The size and location of the window's frame in screen coordinates. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`graphics` readonly | The graphics object that can be used to customize the window?s appearance, in response to the onDraw event. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`helpTip` readonly | The help text that is displayed when the mouse hovers over the element. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`indent` readonly | The number of pixels to indent the element. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`justify` readonly | The default text justification style for child text elements. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`layout` readonly | The layout manager for this container. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`location` readonly | The upper left corner of the window's drawable area. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`margins` readonly | The number of pixels between the edges of a container and the outermost child elements. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`maximized` readonly | True if the window is expanded. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`maximumSize` readonly | The largest rectangle to which the window can be resized. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`minimized` readonly | True if the window is minimized or iconified. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`minimumSize` readonly | The smallest rectangle to which the window can be resized. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`opacity` readonly | The opacity of the window, in the range [0..1]. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`orientation` readonly | The layout orientation of children in a container. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`parent` readonly | The immediate parent element. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`preferredSize` readonly | The preferred size of the window. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`properties` readonly | An object that contains one or more creation properties of the container (properties used only when the element is created). | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`shortcutKey` readonly | The keypress combination that invokes this element's?onShortcutKey()?callback. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`size` readonly | The current size and location of the content area of the window in screen coordinates. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`spacing` readonly | The number of pixels separating one child element from its adjacent sibling element. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`text` readonly | The title, label, or displayed text, a localizeable string. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`type` readonly | The element type; "dialog", "palette", or "window". | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`visible` readonly | When true, the element is shown, when false it is hidden. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`window` readonly | The window that this element belongs to. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`windowBounds` readonly | The bounds of this window relative to the top-level parent window. | +-------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+ Static Properties ^^^^^^^^^^^^^^^^^ +-----------------------------------------------------+-------------------------------------------------+ | :ref:`frameworkName` readonly | Deprecated. Use?ScriptUI.frameworkName?instead. | +-----------------------------------------------------+-------------------------------------------------+ | :ref:`version` readonly | Deprecated. Use?ScriptUI.version?instead. | +-----------------------------------------------------+-------------------------------------------------+ Constructors ^^^^^^^^^^^^ +---------------------------------------+-----------------------+ | :ref:`Window` readonly | Creates a new window. | +---------------------------------------+-----------------------+ Methods ^^^^^^^ +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+ | :ref:`add` readonly | Creates and returns a new control or container object and adds it to the children of this window. | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+ | :ref:`addEventListener` readonly | Registers an event handler for a particular type of event occuring in this window. | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+ | :ref:`center` readonly | Centers this window on screen or with repect to another window. | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+ | :ref:`close` readonly | Closes this window. | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+ | :ref:`dispatchEvent` readonly | Simulates the occurrence of an event in this target. | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+ | :ref:`hide` readonly | Hides this windows. | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+ | :ref:`notify` readonly | Sends a notification message to all listeners, simulating the specified user interaction event. | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+ | :ref:`remove` readonly | Removes the specified child control from this window?s children array. | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+ | :ref:`removeEventListener` readonly | Unregisters an event handler for a particular type of event occuring in this window. | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+ | :ref:`show` readonly | Makes this window visible. | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------+ Static Methods ^^^^^^^^^^^^^^ +-----------------------------------------+----------------------------------------------------------------------------------------------------+ | :ref:`alert` readonly | Displays a platform-standard dialog containing a short message and an OK button. | +-----------------------------------------+----------------------------------------------------------------------------------------------------+ | :ref:`confirm` readonly | Displays a platform-standard dialog containing a short message and two buttons labeled Yes and No. | +-----------------------------------------+----------------------------------------------------------------------------------------------------+ | :ref:`find` readonly | Use this method to find an existing window. | +-----------------------------------------+----------------------------------------------------------------------------------------------------+ | :ref:`prompt` readonly | Displays a modal dialog that returns the user?s text input. | +-----------------------------------------+----------------------------------------------------------------------------------------------------+ Events ^^^^^^ +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`onActivate` readonly | An event-handler callback function, called when the window acquires the keyboard focus. | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`onClose` readonly | An event-handler callback function, called when the window is about to be closed. | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`onDeactivate` readonly | An event-handler callback function, called when the window loses the keyboard focus. | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`onMove` readonly | An event-handler callback function, called when the window has been moved | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`onMoving` readonly | An event-handler callback function, called when the window is being moved | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`onResize` readonly | An event-handler callback function, called after the window has been resized | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`onResizing` readonly | An event-handler callback function, called while a window is being resized | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`onShortcutKey` readonly | In Windows only, an event-handler callback function, called a shortcut-key sequence is typed that matches the?shortcutKey?value for this window. | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`onShow` readonly | An event-handler callback function, called just before the window is displayed | +-----------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ .. container:: hide .. toctree:: :hidden: :maxdepth: 1 Window/graphics.rst Window/visible.rst Window/bounds.rst Window/frameBounds.rst Window/frameLocation.rst Window/frameSize.rst Window/location.rst Window/maximumSize.rst Window/minimumSize.rst Window/preferredSize.rst Window/size.rst Window/windowBounds.rst Window/characters.rst Window/justify.rst Window/text.rst Window/active.rst Window/shortcutKey.rst Window/cancelElement.rst Window/defaultElement.rst Window/maximized.rst Window/minimized.rst Window/alignChildren.rst Window/children.rst Window/layout.rst Window/margins.rst Window/orientation.rst Window/spacing.rst Window/alignment.rst Window/properties.rst Window/enabled.rst Window/helpTip.rst Window/indent.rst Window/parent.rst Window/window.rst Window/type.rst Window/opacity.rst Window/frameworkName.rst Window/version.rst Window/show.rst Window/hide.rst Window/notify.rst Window/center.rst Window/close.rst Window/add.rst Window/remove.rst Window/addEventListener.rst Window/removeEventListener.rst Window/dispatchEvent.rst Window/find.rst Window/alert.rst Window/confirm.rst Window/prompt.rst Window/onActivate.rst Window/onDeactivate.rst Window/onClose.rst Window/onMove.rst Window/onMoving.rst Window/onResize.rst Window/onResizing.rst Window/onShortcutKey.rst Window/onShow.rst Window/window.rst