The outline of a talk about building user interfaces in NeWS. ~The NeWS Interactive Programming Environment~ ~The HyperTIES hypermedia browser~ ~The UniPress Emacs Text Editor~ ~Pie Menu Demonstration~ ~NeWS Hacks~ The NeWS window system is a multitasking, interactive PostScript programming environment. It's a network based, extensible window server. It's also a whole lot of fun! ~The PostScript Programming Language~ ~NeWS Extensions to PostScript~ ~The interactive multiprocess PostScript debugger~ ~The Object Oriented Programming Package~ ~The X11/NeWS Merge~ PostScript, the extension language in NeWS, is a high level device independant page description language. => PostScript is a page description language. => A "de facto" industry standard. (For what that's worth.) => A flexable, high level programming language. => An interactive, interpretive environment. => A high level, device independent imaging model. => It feels like a cross between Lisp and Forth. => It's weird, but it's fun and powerful. => PostScript is a trademark of Adobe Systems Incorporated. NeWS window system extensions to the PostScript language. => Objects look like dictionaries. => Lightweight Processes ==> NeWS schedules many lightweight PostScript processes. ==> They all live together in the NeWS server's address space. ==> They're cheap! ==> Scheduling is non-preemptive. ==> Process groups. ==> A lightweight process consists of: ===> Graphics context ===> Execution stack ===> Dictionary stack ===> Operand stack ==> Lightweight processes are good for: ===> Servicing events. ===> Managing interactive objects. ===> Pre-processing local input on behalf of the client. ===> Performing background processing. ===> Building interactive graphical user interface toolkits. ===> Interactive animation. ===> And many other thinks too kinky to go into here. => Monitors ==> Synchronization. ==> Protect shared data structures. => Events ==> NeWS has an event queue, and a clean virtual event mechanism. ==> Input from hardware devices generates events. ==> NeWS processes can generate events. ==> NeWS processes can communicate with each other by sending events back and forth. ==> It's easy to simulated input from virtual devices. ==> Coordinates of events reported in the current coordinate system. ==> NeWS processes express interest in events they want to get. ===> Event matching rules. ==> Events are used as interest templates. ==> Then they loop waiting for and processing such events. => Canvases ==> Drawing surface. ==> Arranged in a hierarchy. ==> Each has its own coordinate system. ==> Arbitrarily shaped!!! ==> Shape defined by a PostScript path. ==> Lines, arcs, bezier curves, and conic splines as edges. ==> Holes, and disconnected regions! ==> Shape influences the clipping of graphical output, and the distribution of input events. ==> Useful as arbitrarily shaped targets. ==> NeWS processes can receive input events whenever the mouse enters, leaves, clicks, or moves around in a canvas. ==> When a canvas is damaged, an event is generated which should cause a process to repaint it. ==> Natural to use as animated "sprites", using NeWS processes to periodically blink, move, or paint them. => Color ==> RGB ==> HSB => Garbage collection ==> Reference counts Debugger capabilities: => Examine the state of stopped processes => Add breakpoints => Add debugging printout comments => Execute PostScript procedures in the context of the stopped process => Restart stopped processes Object Oriented Programming in NeWS => NeWS uses an object oriented programming package. => Provides a Smalltalk-like class mechanism. => Works in a PostScript laser printer, too! => Uses the PostScript dictionary stack to implement inheritence. => Each object is an instance of a class defining its behavior. => Customize the UI toolkit, by subclassing predefined classes. => Save time and reuse code, by building on top of previous work. => The NeWS object oriented toolkit implements menus, windows, buttons, cycles, message fields, editable text fields, sliders, scroll bars, scrolling text canvases, terminal emulators, and other objects, entirely in object oriented PostScript. => The toolkit resides inside the NeWS server, not in its clients. => Clients can share code and data structures in the server. => The toolkit does not have to be linked into each client. => More responsive interaction, and less network traffic. => Modular look and feel. => Modify and customize parts of the toolkit, independant of clients that use them. => Change the UI without altering, recompiling, or relinking clients. You can examine the classes defined in the NeWS server, using Bruce Schwartz's Class Browser. Date: Sat 12 Dec 1987 17:01:36 EST From: David Rosenthal Subject: Extensions for "documetnation graphics" To: xtensions@athena.mit.edu, xpert@athena.mit.edu There has been some discussion recently of the need to extend X11 to support ``documentation graphics''. I believe that what people need is, in effect, access to both the X11 and the PostScript (TM Adobe Systems) language imaging models. The implications of the recent deal between Sun and AT&T are relevant to this debate. As part of the deal, Sun will be supplying to AT&T, and AT&T including in their Unix source licensing program, a merged server supporting both X11 and NeWS protocols. If you are a Unix licensee, you will be getting this code as part of the normal AT&T source distributions, and it will, therefore, be a part of "standard Unix". No license with Sun will be required. Robin Schaufler will discuss the details of the implementation of the merged server at the X conference at MIT in January. Briefly, it will support: - Vanilla X11 clients - Vanilla NeWS clients - A single window tree accessible to both - A single event distribution mechanism accessible to both - The use of PostScript programs and operators to image onto X11 windows. The C source code will include: - X11 protocol interpreter - PostScript language interpreter, with NeWS extensions - Window tree and event management core shared by both - A complete implementation of the high-performance imaging library that supports them both, for memory framebuffers. (This is an improved version of the imaging library that currently supports the NeWS product) The intention behind this arrangement is to ensure that those who need the PostScript language imaging model will have it available. There will be no reason not to support this capability for those who are Unix licensees, since they will be getting it, already integrated with X11, as part of their Unix source distribution. Almost all significant companies in the computer industry are Unix licensees. I hope that this will reassure those who need ``documentation graphics'' that the X11 servers they talk to are likely to support the capabilities they need, and that there is no need to design new extensions to address this area. David. NeWS HyperTIES is a hypermedia browser for the NeWS window system, under development at the Human Computer Interaction Lab, at the University of Maryland. You're looking at it! Here are some links to interesting parts of the database to browse. ~The Space Telescope in Orbit~ ~Miscellaneous~ ~PopupTarget~ ~Scroll~ ~Founders~ ~AnimatedTarget~ The UniPress Emacs Text Editor If you edit, please try NeMACS. => Multiple frames => Tab windows => Shell window => PostScript shell debugger window => Directory editor => Text selection ==> Local rubber banding ==> Selected newlines appear rounded => Edit/Execute PS code => Menus ==> Font menu ==> Color menu ==> Describe key, bind-to-key ==> Menu compiler => Control panels ==> Buttons ==> Scroll bar ==> Control panel compiler => User Interface styles ==> Window classes ==> Menu classes