WCREATE(1)
NAME
wcreate − create one or more new windows
SYNOPSIS
wcreate [−w windowtype] [−kboiTtMmNnv] [−l x,y]
[−s w,h] [−r w,h] [window_spec...]
DESCRIPTION
This command creates one or more new windows on the display, of the selected windowtype, named window_spec... (if you give no window_spec, it creates one window with a name selected by the window manager). See windows(1) for explanations of windowtype and window_spec.
New windows have default icon positions set, have default viewing (pan) positions, have default border labels and colors and have null typing aids. Other attributes of new windows are controlled by the options:
−w windowtype
Type of windows to create (see windows(1)). The default window type is the term0 window. The default base and alternate fonts used for this window type are dependent on the resolution of the display screen and the $LANG environment variable. Default fonts are found under the directory /usr/lib/raster/dflt. Under that directory are two directories: b for the base fonts and a for the alternate fonts. Under those directories are three more directories: v for the very high resolution displays, h for the high resolution displays, and l for the low resolution displays. Under those directories is a file named after the current language name as defined by the $LANG environment variable; this file is linked to the default font. For example, if $LANG is set to japanese, the default base font on the high resolution display would be /usr/lib/raster/dflt/b/h/japanese, which would be a link to /usr/lib/raster/8x18/kanji.16K. The default alternate font on the high resolution display would be found in /usr/lib/raster/dflt/a/h/japanese, which would be a link to /usr/lib/raster/8x18/kana.8K. If the $LANG environment variable is not set or an entry for it does not exist in the default directories, then the following default base and alternate fonts are used:
Very High Resolution:
/usr/lib/raster/10x20/lp.8U
/usr/lib/raster/10x20/lp.b.8U
High Resolution:
/usr/lib/raster/8x16/lp.8U
/usr/lib/raster/8x16/lp.b.8U
Low Resolution:
/usr/lib/raster/6x8/lp.8U
/usr/lib/raster/6x8/lp.b.8I
A Very High Resolution display is one having 1280 pixel columns. This includes the HP98720, HP98548, HP98550 and HP98730. High Resolution displays have a pixel width of 1024. Some High Resolution graphics displays are the HP98700, HP98549, and HP98547. Low Resolution displays have a width of 512 pixels. The HP98543 is a Low Resolution display.
If you want a different base and/or alternate font assigned at the time of window creation, set the environment variables $WMBASEFONT and $WMALTFONT to the pathnames (or $WMFONTDIR−relative basenames) of the desired font files.
−k Attach a new window to the keyboard (i.e. select the last window in the list). The default is to leave the currently selected window attached to the keyboard.
−b Put new windows on the bottom of the display stack (in the order created). By default they are created as topmost windows (if not concealed).
−o Conceal new windows "off screen" (make them non-displayable). By default they are displayable, thus visible if not occluded by other windows.
You can only give one of the −b and −o options.
−i Make the new window iconic.
−T Do not display a border for the new window.
−t Make new window borders thin, not normal in width. This also allows very small windows and raster/buffer sizes.
You can only give one of the −T and −t options.
−M Make window rasters retained as byte/pixel. This is the default. This option is ignored for window types like term0 or see_thru, which never retain their rasters.
−m Make window rasters retained as bit/pixel. This option is ignored for window types like term0 or see_thru, which never retain their rasters.
−N Make the window an IMAGE graphics window. This means that the user area of the window is mapped into the image planes while the border is displayed in the overlay planes. This option only applies on the HP98730 display system and is ignored for window types other than graphics.
−n Make window rasters non-retained (see windows(1)). By default they are retained as byte/pixel, so they consume memory, and the windows may be repainted. This option is ignored for window types like term0 or see_thru, which never retain their rasters.
You can only give one of the −M, −m , −N and −n options.
−v Verbose mode: Print the full pathname of each new window (including $WMDIR if it is declared in the environment and is used) to standard output as each window is created. By default wcreate is silent unless there is an error. Verbose mode is useful when you don’t give window_spec, but allow the window manager to create a name for you. You can capture new window names in a shell variable, for example (using sh(1)):
win=‘ wcreate −vw graphics ‘ # save window name.
win=‘ basename "$win" ‘ # get basename only.
−l x,y
Set the upper left corner location (anchor point) for the contents area of all new windows (the border area is outside this point). The x,y coordinates are in screen units (pixels). The default location for the anchor point, set by the window manager (and varied for each window), is near the upper left corner of the screen.
−s w,h
Set the width and height of the contents area in rows and columns, for term0 windows, or in pixels, for other window types. Default sizes are 80,24 for term0 windows and 200,200 for other window types. If an 80,24 window with the specified font will not fit on the display the size of the window is reduced to a size that will fit. For example, if a term0 window is created with an 5x18 font on a low resolution display and the size of the window is not specified, the default size of the window will be 80,18. (400/18 = 22 − 4(adjustment to allow room for border) = 18)
−r w,h
Set raster/buffer sizes associated with new windows. The width and height of the rasters/buffers are specified in units appropriate to the window type. Use rows and columns for term0 windows; use pixel width and pixel height for other window types.
Default values are:
• 80,48 for term0 scroll buffers (two full pages of text),
• the resolution of the display for see_thru window types,
• and the same as the initial window size for other window types.
If you give −r but not −s, the default window width (height) is decreased, if necessary, to be as small as the raster/buffer width (height). Likewise, if you give −s but not −r, the default raster/buffer width (height) is increased, if necessary, to be as large as the window width (height).
If new window borders are normal, the windows and rasters/buffers have minimum allowable sizes greater than one pixel (or one character cell). A window’s contents area can never grow to be larger than its raster/buffer size, or, for term0 windows, its screen size (see below), whichever is smaller. Do not confuse the raster/buffer memory with the amount of graphics/text visible at one time, which depends on a window’s size and pan position.
For term0 windows, the screen size, distinct from window and buffer sizes, is set the same as the initial window size. The screen size is the same as given by the termcap(5) co and li values. If the default window size is used, screen size is always set to 80,24 even if the window size is adjusted to allow the window to fit on the screen. It is only useful with library calls and escape sequences (such as those provided by the curses(3X) library). It remains set to the initial row and column size, so it may change pixel size with font changes, but cannot be otherwise changed using wsize(1) or any other command. See the Programmer’s Manual sections on term0 for details.
Normally the owner of the window’s special file is set to the process id of the wcreate process by the window manager.
EXAMPLES
wcreate Joe John
Create term0 windows named "Joe" and "John" near the upper left corner of the screen, whose special files reside "in the usual place" (e.g. the directory specified by $WMDIR).
wcreate /tmp/windows/w1
Create a term0 window named "w1" near the upper left corner of the screen, whose special file is located in the directory specified in the pathname.
wcreate −w graphics −kotn −l100,200 −s300,300 graphwin
Create an assigned (selected), concealed, thin-border Starbase window named graphwin in the directory $WMDIR, whose raster is non-retained. The upper left corner is at x = 100, y = 200 (pixels). The window is 300 pixels on a side. Its corresponding raster is also 300 pixels on a side.
wcreate −kts80,66
Create a selected, thin-bordered, top-of-display-stack term0 window with a default name, whose window, screen, and scroll buffer sizes are all 80 columns by 66 rows.
wcreate −w see_thru
Create a see_thru widow with default name, location, and size.
wcreate −w see_thru −ib −l 0,0 −s 1280,1024 image_planes
Create a see_thru window named image_planes, which will appear on the screen as an icon on the bottom of the window stack. When the window is made normal, it will be located at the upper-left corner of the display and will have a size of 1280 by 1024 pixels, i.e., it will cover the entire screen. (Use [SHIFT]-[SELECT] to bring another window to the top.)
wcreate −w graphics −Nt −l 100,100 −s 640,512 accelwin
Create an IMAGE graphics window named accelwin, which will be approximately one fourth the screen size of the HP98730 display and which will have a thin border.
SEE ALSO
windows(1),wborder(1),wlist(1), wsh(1),wsize(1), wcreate_graphics(3W), wcreate_term0(3W).
DIAGNOSTICS
The following values are returned by wcreate:
0 If no errors are detected.
1 If any of the following occurs:
bad invocation
invalid window type
anchor point out of bounds
location point out of bounds
negative size (possibly due to bad location point)
raster size out of bounds
any other error which prevents creation of any windows
An appropriate error message is also written to standard output. Also prints a message and returns 1 if it fails to create any one window (but still tries to create the others, unless it has trouble while expanding a window_spec pattern).
2 After each window is created, some window attributes must be set separately (i.e. keyboard selection and top or bottom of stack). If an error is detected in attempting to set them, the new window name is still printed if the −v option was used. Later a 2 is returned, meaning a window was created incorrectly, unless some other error caused a 1 to be returned instead.
Hewlett-Packard Company — HP-UX Release 8.0: January 1991