Arbortext Command Language > Using the Arbortext Command Language > Creating and Manipulating Windows
  
Creating and Manipulating Windows
An unlimited number of application-defined windows may be created using the function window_create. The class (or type) of the window is specified as the first argument to window_create. It may be one of the strings: “edit,” “msg,” “msgwin1 ” through “msgwin4,” “help,” “helpwin1 ” through “helpwin4,” or “list.”
The class determines the default geometry and whether a document tree is associated with the window. If the class is list , then a list selection dialog is created. Otherwise, the window displays a document tree and has a class-specific keymap associated with it. For document class windows (all except list class), the second argument to window_create is a bit mask of flags that controls whether a menu bar is created for the window, whether a vertical scrollbar is created, whether a message area is provided at the bottom of the window, and for edit class windows, whether a Command window is supplied below the Edit subwindow.
The third argument to window_create is a document identifier obtained from a previous call to doc_open or if -1, then a scratch document (doctype ascii for edit classes, or the built-in help document type for other classes) is created and attached to the window. (The associated document tree may be changed later by calling doc_show.) Since doc_open supports arbitrary document types, windows created using window_create may display different arbitrary document types, and in fact, for edit classes, full interactive context checking is enabled. There is a slight performance slowdown when switching between document types, since the parser does not support simultaneous parsing of disparate document types. Internally, the parser is reinitialized when switching between document types, which typically takes one second or so.
The window names edit and cmd do not specify unique windows. These are window classes and when used on commands like caret refer to a window relative to the current document's window, or on the map command refer to a window class map. For example, caret edit issued from a command window keymapping, moves the focus to the corresponding Edit window. If issued from outside an edit or cmd -class window, it will give focus to the last edit class window having focus. The window names msg, msgwin [1-4], help, and helpwin [1-4] refer to the built-in fixed windows (for backward compatibility). These names, when used on commands like caret, or as a window argument to the various window_xxx functions like window_close, always refer to the built-in windows and never to window of that class created by window_create. A window ID must be used to refer to such windows created by window_create.
There are several window manipulation functions, which are listed in the Window manipulation functions table.
Example of edit window function
Example of list response panel
window_class built-in function
window_get built-in function
window_id built-in function
window_name built-in function