0 | Main drawing window |
1-4 | Sub-window (number as shown in title bar) |
The function returns 1 on success, 0 if the indicated window does not exist.
0 | Main drawing window |
1-4 | Sub-window (number as shown in title bar) |
If the pointer is not in a drawing window, 0 is returned.
integer | set expand level |
n | set level to 0 |
a | expand all |
+ | increment expand level |
- | decrement expand level |
This is a primitive to allow Xic to export graphics rendering capability. The intention is that this might be used in a Tk script (for example) that is otherwise using Xic in server mode as a back-end. The machine containing the window to be drawn into must allow X access to the machine running the Xic server (see the xhost Unix command).
One can demonstrate the capability as follows. The ``xwininfo -children'' Unix command can be used to find the window id of a suitable child window in a running application. The top-level window given from xwininfo without the ``-children'' argument is generally obscured by child windows, so this won't work. For example, an xterm window has a single child, which is the id to use. In server mode, a cell must be loaded for editing with the Edit function. Then, a Display command can be given, something like
Display(":0", 0x1800015, -100, -100, 100, 100)
The ":0" is the display name for the local machine, assuming that the Xic server is also running on this machine. In general, this is the same as the DISPLAY environment variable, in the form hostname:0. The second argument is the window id returned from xwininfo. The remaining arguments set the area to display. After giving the command, the window should be overwritten with a display similar to a drawing window in Xic. However, if the window is redrawn, it will revert to its previous contents. The user must set up expose event handling in a real application. The suggested way to do this is to pass the id of a pixmap to Xic, and then copy the pixmap to the destination window. This is usually faster than a direct write, and the pixmap can be used for backing store for expose events.