createWindow(windowClass [, flags [, doc [, geometry [, parent [, xuiPath]]]]] )
|
|
Parameters
|
StringwindowClass
Windows are of two types:
• Document class windows that display a document tree and have a windowClass of edit, helpwin[1-4], or msgwin[1-4].
• Dialog class windows that display either a list selection dialog box of windowClass list or xui.
The class determines the default geometry and, for classes other than list, the class-specific keymap. By default, a new keymap is created for the window on the first map ACL command processed for the window. This keymap has the name windown, where n is the identifier of the window, and is deleted when the window is destroyed. If a set keymap=user ACL command is executed for the window, or if bit 0x00040 is specified in flags, the global keymap for the class will be used. See the flags bit descriptions below.
.
intflags
[optional] The flags parameter is a bit mask that depends on the windowClass and is defined below:
The following are the flag bits for list and xui class windows.
• 0x1 - Supply vertical scrollbar.
• 0x2 - Verify input (that is, set verify Item attribute).
• 0x4 - Supply an Apply button,
• 0x8 - Supply a Help button.
• 0x10 - For XUI dialog boxes, delete the document after the window is destroyed. In the following example, doc will be destroyed automatically after win is destroyed:
Document doc = Application.openDocument("c:\\myproject\\myxuifile", 1);
Window win = Application.createWindow("xui", 0x10, doc);
• 0x040000 - Make the new window a top-level window with its parent being the desktop. This flag is only useful to the xui and list class windows; the windows of all other window classes are created as top-level windows.
OK and Cancel buttons are always supplied.
The following are the flag bits for document class (all non-list) windows.
• 0x00001 - Supply vertical scrollbar (pane).
• 0x00002 - Supply menu bar.
• 0x00004 - Supply command subwindow if windowClass is edit.
• 0x00008 - Supply message footer subwindow.
• 0x00010 - Automatically call ADocument.close() on the attached document when the window is destroyed. (pane).
• 0x00020 -Supply edit toolbar (that is, Toolbar 1) (pane).
• 0x00040 -Attach the global window class keymap to the window instead of creating a private keymap (pane).
• 0x00080 - Supply horizontal scrollbar (pane).
• 0x00100 - Do edit command intializations, include reading the document type instance command files ( instance.acl and instance.js) and document command files (docname.acl and docname .js) if they exist, and calling the ACL editfilehook when a document is attached to the window. This bit applies only to edit class windows (pane).
• 0x00800 - Make the window a typical user edit window (as opposed to a display window).
• 0x01000 - Supply a table column width ruler (pane).
• 0x02000 - Supply a table row height ruler (pane).
• 0x04000 - Supply the Markup toolbar (that is, Toolbar 2).
• 0x08000 - Supply the Table toolbar (that is, Toolbar 3).
• 0x10000 - Supply the Application toolbar (that is, Toolbar 4).
• 0x080000 - Do not update the Arbortext EditorFile menu list of recently edited documents, or the Microsoft Windows list of recently edited documents with the path name associated with the doc parameter (if the 0x00800 flag is specified). Note that this does not apply to documents subsequently loaded in the window.
If a menu bar is requested, it must be initialized using the menu_load or menu_add ACL commands before the window is first displayed.
If a message footer is created, error messages and output from the message ACL command are displayed in the left part of the footer if the message is short enough (otherwise a popup dialog box is used). Any messages directed to the message footer are considered transient and are erased on the next key or button event received in the window.
.
Documentdoc
[optional] Specifies the document tree to be attached to the window. The document must not already be displayed in another window. If it is, the function returns null. If doc is null, a scratch document is created that will automatically be destroyed when the window is destroyed. In this case, the associated document type is ascii for edit class windows or the built-in help document type for other classes.
This parameter does not apply to list class windows and is ignored if given.
.
Stringgeometry
[optional] Specifies the initial geometry for the window and is a string of the form WxH+X+Y, where W and H are the width and height of the window in pixels, and X and Y give the location of the upper left corner of the window.
.
Windowparent
[optional] An optional parameter used to specify the parent window for the new window. Only supports dialog class.
.
StringxuiPath
[optional] An optional parameter used only by edit windows to supply an alternative XUI file to define the toolbars used by the edit window. If xuiPath is not supplied (or empty), then Arbortext-path \lib\dialogs\editwindow.xml is used.
|
Returns
|
Window. A new Window object.
|
Throws
|
AOMException
Raised if the method detects any error.
|