Annotation of lucent/sys/man/1/f002478, revision 1.1.1.1

1.1       root        1: .TH 8½ 1
                      2: .SH NAME
                      3: 8½, label, window, wloc \- window system
                      4: .SH SYNOPSIS
                      5: .B 8½
                      6: [
                      7: .BI "-i '"cmd '
                      8: ]
                      9: [
                     10: .B -s
                     11: ]
                     12: [
                     13: .B -f
                     14: .I font
                     15: ]
                     16: .PP
                     17: .B label
                     18: .I name
                     19: .PP
                     20: .B window
                     21: .BI ' "minx miny maxx maxy" '
                     22: .I cmd
                     23: .I arg ...
                     24: .PP
                     25: .B wloc
                     26: .SH DESCRIPTION
                     27: .I 8½
                     28: manages asynchronous layers of text, or windows, on a bit-mapped display.
                     29: It also serves a variety of files for communicating with
                     30: and controlling windows; these are discussed in section
                     31: .IR 8½ (4).
                     32: .SS Commands
                     33: The
                     34: .I 8½
                     35: command starts a new instance of the window system.
                     36: Its
                     37: .B -i
                     38: option names a startup script, which typically contains several
                     39: .I window
                     40: commands generated by
                     41: .IR wloc .
                     42: .PP
                     43: The
                     44: .B -s
                     45: option initializes windows so that text scrolls;
                     46: the default is not to scroll.
                     47: The
                     48: .I font
                     49: argument names a font used to display text, both in
                     50: .IR 8½ 's
                     51: menus
                     52: and as a default for any programs running in its windows; it also
                     53: establishes the
                     54: environment variable
                     55: .BR $font .
                     56: If
                     57: .B -f
                     58: is not given,
                     59: .I 8½
                     60: uses the imported value of
                     61: .BR $font
                     62: if set; otherwise it imports the default font from the underlying graphics
                     63: server, usually the terminal's operating system.
                     64: .PP
                     65: The
                     66: .I label
                     67: command changes a window's identifying name.
                     68: .PP
                     69: The
                     70: .I window
                     71: command creates a window.
                     72: The first argument gives the minimum and maximum screen
                     73: coordinates of the window to be created (the units are pixels with the
                     74: upper left corner of the screen at (0, 0)); the rest of the arguments
                     75: are the command to be run in the window
                     76: and its arguments.
                     77: .PP
                     78: The
                     79: .I wloc
                     80: command prints the coordinates and label of each window in its instance of
                     81: .I 8½
                     82: and is used to construct arguments for
                     83: .IR window .
                     84: .SS Window control
                     85: Each window behaves as a separate terminal with at least one process
                     86: associated with it.
                     87: When a window is created, a new process (usually a shell; see
                     88: .IR rc (1))
                     89: is established and bound to the window as a new process group.
                     90: Initially, each window acts as a simple terminal that displays character text;
                     91: the standard input and output of its processes
                     92: are attached to
                     93: .BR /dev/cons .
                     94: Other special files, accessible to the processes running in a window,
                     95: may be used to make the window a more general display.
                     96: Some of these are mentioned here; the complete set is
                     97: discussed in
                     98: .IR 8½ (4).
                     99: .PP
                    100: One window is
                    101: .IR current ,
                    102: and is highlighted with a heavy border;
                    103: characters typed on the keyboard are available in the
                    104: .B /dev/cons
                    105: file of the process in the current window.
                    106: Characters written on
                    107: .B /dev/cons
                    108: appear asynchronously in the associated window whether or not the window
                    109: is current.
                    110: .PP
                    111: Windows are created, deleted and rearranged using the mouse.
                    112: Clicking (depressing and releasing) mouse button 1 in a non-current
                    113: window makes that window current and brings it in front of
                    114: any windows that happen to be overlapping it.
                    115: When the mouse cursor points to the background area or is in
                    116: a window that has not claimed the mouse for its own use,
                    117: depressing mouse button 3 activates a
                    118: menu of window operations provided by
                    119: .IR 8½ .
                    120: Releasing button 3 then selects an operation.
                    121: At this point, a gunsight or cross cursor indicates that
                    122: an operation is pending.
                    123: The button 3 menu operations are:
                    124: .TF Reshape
                    125: .TP
                    126: .B New
                    127: Create a window.
                    128: Depress button 3 where one corner of the new rectangle should
                    129: appear (cross cursor), and move the mouse, while holding down button 3, to the
                    130: diagonally opposite corner.
                    131: Releasing button 3 creates the window, and makes it current.
                    132: Very small windows may not be created.
                    133: .TP
                    134: .B Reshape
                    135: Change the size and location of a window.
                    136: First click button 3 in the window to be changed
                    137: (gunsight cursor).
                    138: Then sweep out a window as for the
                    139: .B New
                    140: operation.
                    141: The window is made current.
                    142: .TP
                    143: .B Move
                    144: Move a window to another location.
                    145: After pressing and holding button 3 over the window to be moved (gunsight cursor),
                    146: indicate the new position by dragging the rectangle to the new location.
                    147: The window is made current.
                    148: .TP
                    149: .B Delete
                    150: Delete a window.  Click in the window to be deleted (gunsight cursor).
                    151: Deleting a window causes a
                    152: .L hangup
                    153: note to be sent to all processes in the window's process group
                    154: (see
                    155: .IR notify (2)).
                    156: .TP
                    157: .B Hide
                    158: Hide a window.  Click in the window to be hidden (gunsight cursor);
                    159: it will be moved off-screen.
                    160: Each hidden window is given a menu entry in the button 3 menu according to the
                    161: value of the file
                    162: .BR /dev/label ,
                    163: which
                    164: .I 8½
                    165: maintains
                    166: (see
                    167: .IR 8½ (4)).
                    168: .TP
                    169: .I label
                    170: Restore a hidden window.
                    171: .PD
                    172: .SS Text windows
                    173: Characters typed on the keyboard or written to
                    174: .B /dev/cons
                    175: collect in the window to form
                    176: a long, continuous document.
                    177: .PP
                    178: There is always some
                    179: .I selected text\f1,
                    180: a contiguous string marked on the screen by reversing its color.
                    181: If the selected text is a null string, it is indicated by a hairline cursor
                    182: between two characters.
                    183: The selected text
                    184: may be edited by mousing and typing.
                    185: Text is selected by pointing and clicking button 1
                    186: to make a null-string selection, or by pointing,
                    187: then sweeping with button 1 depressed.
                    188: Text may also be selected by double-clicking:
                    189: just inside a matched delimiter-pair
                    190: with one of
                    191: .B {[(<«`'"
                    192: on the left and
                    193: .B }])>»`'"
                    194: on the right, it selects all text within
                    195: the pair; at the beginning
                    196: or end of a line, it selects the line; within or at the edge of an alphanumeric word,
                    197: it selects the word.
                    198: .PP
                    199: Characters typed on the keyboard replace the selected text;
                    200: if this text is not empty, it is placed in a
                    201: .I snarf buffer
                    202: common to all windows but distinct from that of
                    203: .IR sam (1).
                    204: .PP
                    205: Programs access the text in the window at a single point
                    206: maintained automatically by
                    207: .IR 8½ .
                    208: The
                    209: .I output point
                    210: is the location in the text where the next character written by
                    211: a program to
                    212: .B /dev/cons
                    213: will appear; afterwards, the output point is the null string
                    214: beyond the new character.
                    215: The output point is also the location in the text of the next character
                    216: that will be read (directly from the text in the window,
                    217: not from an intervening buffer)
                    218: by a program from
                    219: .BR /dev/cons .
                    220: When such a read will occur is, however, under control of
                    221: .I 8½
                    222: and the user.
                    223: .PP
                    224: In general there is text in the window after the output point,
                    225: usually placed there by typing but occasionally by the editing
                    226: operations described below.
                    227: A pending read of
                    228: .B /dev/cons
                    229: will block until the text after the output point contains
                    230: a newline, whereupon the read may
                    231: acquire the text, up to and including the newline.
                    232: After the read, as described above, the output point will be at
                    233: the beginning of the next line of text.
                    234: In normal circumstances, therefore, typed text is delivered
                    235: to programs a line at a time.
                    236: Changes made by typing or editing before the text is read will not
                    237: be seen by the program reading it.
                    238: If the program in the window does not read the terminal,
                    239: for example if it is a long-running computation, there may
                    240: accumulate multiple lines of text after the output point;
                    241: changes made to all this text will be seen when the text
                    242: is eventually read.
                    243: This means, for example, that one may edit out newlines in
                    244: unread text to forestall the associated text being read when
                    245: the program finishes computing.
                    246: This behavior is very different from most systems.
                    247: .PP
                    248: Even when there are newlines in the output text,
                    249: .I 8½
                    250: will not honor reads if the window is in
                    251: .I hold mode\f1,
                    252: which is indicated by a white cursor and border.
                    253: The ESC character toggles hold mode.
                    254: Some programs, such as
                    255: .IR mail (1),
                    256: automatically turn on hold mode to simplify the editing of multi-line text;
                    257: type ESC when done to allow
                    258: .I mail
                    259: to read the text.
                    260: .PP
                    261: An EOT character (control-D) behaves exactly like newline except
                    262: that it is not delivered to a program when read.
                    263: Thus on an empty line an EOT serves to deliver an end-of-file indication:
                    264: the read will return zero characters.
                    265: Like newlines, unread EOTs may be successfully edited out of the text.
                    266: The BS character (control-H) erases the character before the selected text.
                    267: The ETB character (control-W) erases any nonalphanumeric characters, then
                    268: the alphanumeric word just before the selected text.
                    269: `Alphanumeric' here means non-blanks and non-punctuation.
                    270: The NAK character (control-U) erases the text after the output point,
                    271: and not yet read by a program, but not more than one line.
                    272: All these characters are typed on the keyboard and hence replace
                    273: the selected text; for example, typing a BS with a word selected
                    274: places the word in the snarf buffer, removes it from the screen,
                    275: and erases the character before the word.
                    276: .PP
                    277: Text may be moved vertically within the window.
                    278: A scroll bar on the left of the window shows in its clear portion what fragment of the
                    279: total output text is visible on the screen, and in its gray part what
                    280: is above or below view;
                    281: it measures characters, not lines.
                    282: Mousing inside the scroll bar moves text:
                    283: clicking button 1 with the mouse pointing inside the scroll bar
                    284: brings the line at the top of the
                    285: window to the cursor's vertical location;
                    286: button 3 takes the line at the cursor to the top of the window;
                    287: button 2, treating the scroll bar as a ruler, jumps to the indicated portion
                    288: of the stored text.
                    289: Also, a VIEW key (possibly with a different label; see
                    290: .IR keyboard (6))
                    291: scrolls forward
                    292: half a window.
                    293: .PP
                    294: The DEL character sends an
                    295: .L interrupt
                    296: note to all processes in the window's process group.
                    297: Alone among characters, the DEL and VIEW
                    298: keys do not affect the selected text.
                    299: .PP
                    300: Normally, written output to a window blocks when
                    301: the text reaches the end of the screen;
                    302: a button 2 menu item toggles scrolling.
                    303: .PP
                    304: Other editing operations are selected from a menu on button 2.
                    305: The
                    306: .B cut
                    307: operation deletes the selected text
                    308: from the screen and puts it in the snarf buffer;
                    309: .B snarf
                    310: copies the selected text to the buffer without deleting it;
                    311: .B paste
                    312: replaces the selected text with the contents of the buffer;
                    313: and
                    314: .B send
                    315: copies the snarf buffer to just after the output point, adding a final newline
                    316: if missing.
                    317: .B Paste
                    318: will sometimes and
                    319: .B send
                    320: will always place text after the output point; the text so placed
                    321: will behave exactly as described above.  Therefore when pasting
                    322: text containing newlines after the output point, it may be prudent
                    323: to turn on hold mode first.
                    324: .SS Raw text windows
                    325: Opening or manipulating certain files served by
                    326: .IR 8½
                    327: suppresses some of the services supplied to ordinary text windows.
                    328: While the file
                    329: .B /dev/mouse
                    330: is open, any mouse operations are the responsibility of another program
                    331: running in the window.  Thus,
                    332: .I 8½
                    333: refrains from maintaining
                    334: the scroll bar,
                    335: supplying text editing or menus, interpreting the
                    336: VIEW key as a request to scroll, and also turns scrolling on.
                    337: .PP
                    338: The file
                    339: .B /dev/consctl
                    340: controls interpretation of keyboard input.
                    341: In particular, a raw mode may be set:
                    342: in a raw-input window, no typed keyboard characters are special,
                    343: they are not echoed to the screen, and all are passed
                    344: to a program immediately upon reading, instead of being gathered into
                    345: lines.
                    346: .SS Graphics windows
                    347: A program that holds
                    348: .B /dev/mouse
                    349: and
                    350: .B /dev/consctl
                    351: open after putting the console in raw mode
                    352: has complete control of the window:
                    353: it interprets all mouse events, gets all keyboard characters,
                    354: and determines what appears on the screen.
                    355: .SH FILES
                    356: .TF /srv/8½.\fIuser\fP.\fIpid\fP
                    357: .TP
                    358: .B /lib/font/bit/*
                    359: font directories
                    360: .TP
                    361: .B /mnt/8½
                    362: Files served by
                    363: .I 8½
                    364: (also unioned in
                    365: .B /dev
                    366: in a window's name space, before the terminal's real
                    367: .B /dev
                    368: files)
                    369: .TP
                    370: .B /srv/8½.\fIuser\fP.\fIpid\fP
                    371: Server end of
                    372: .IR 8½ .
                    373: .SH SOURCE
                    374: .TF /sys/src/cmd/8½
                    375: .TP
                    376: .B /sys/src/cmd/8½
                    377: .TP
                    378: .B /rc/bin/label
                    379: .TP
                    380: .B /rc/bin/window
                    381: .TP
                    382: .B /rc/bin/wloc
                    383: .SH "SEE ALSO"
                    384: .IR 8½ (4),
                    385: .IR rc (1),
                    386: .IR cpu (1),
                    387: .IR sam (1),
                    388: .IR mail (1),
                    389: .IR proof (1),
                    390: .IR graphics (2),
                    391: .IR frame (2),
                    392: .IR layer (2),
                    393: .IR notify (2),
                    394: .IR cons (3),
                    395: .IR bit (3),
                    396: .IR keyboard (6)
                    397: .SH BUGS
                    398: .I Window
                    399: works only on the machine running
                    400: .IR 8½ .

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.