User Interface
Total Page:16
File Type:pdf, Size:1020Kb
.,A Programming the I " User Interface symbolics'" Cambridge, Massachusetts Programming the User Interface, Volume A # 999025 September 1986 This document corresponds to Genera 7.0 and later releases. The software, data, and information contained herein are proprietary to, and comprise valuable trade secrets of, Symbolics, Inc. They are given in confidence by Symbolics pursuant to a written license agreement, and may be used, copied, transmitted, and stored only in accordance with the terms of such license. This document may not be reproduced in whole or in part without the prior written consent of Symbolics, Inc. Copyright © 1986 Symbolics, Inc. All Rights Reserved. Portions of font library Copyright © 1984 Bitstream Inc. All Rights Reserved. Portions Copyright © 1980 Massachusetts Institute of Technology. All Rights Reserved. Symbolics, Symbolics 3600, Symbolics 3670, Symbolics 3675, Symbolics 3640, Symbolics 3645, Symbolics 3610, Symbolics 3620, Symbolics 3650, Genera, Symbolics-L1sp®, Wheels, Symbolics Common Lisp, Zetalisp®, Dynamic Windows, Document Examiner, Showcase, SmartStore, SemantiCue, Frame-Up, Firewall, S-DYNAMICS®, S-GEOMETRY, S-PAINT, S-RENDER®, MACSYMA, COMMON LISP MACSYMA, CL-MACSYMA, LISP MACHINE MACSYMA, MACSYMA Newsletter and Your Next Step in Computing are trademarks of Symbolics, Inc. Restricted Rights Legend Use, duplication, and disclosure by the Government are subject to restrictions as set forth in subdivision (b)(3)(ii) of the Rights in Technical Data and Computer Software Clause at FAR 52.227-7013. Symbolics, Inc. 4 New England Tech Center 555 Virginia Road Concord, MA 01742 Text written and produced on Symbolics 3600-family computers by the Documentation Group of Symbolics, Inc. Text masters produced on Symbolics 3600-family computers and printed on Symbolics LGP2 Laser Graphics Printers. Cover design: SchaferlLaCasse Printer: CSA Press Printed in the United States of America. Printing year and number: 88 8786987654321 iii August 1986 Programming the User Interface, Volume A Table of Contents Page I. User Interface Management System: an Overview 1 1. Guide to User Interface Documentation 3 1.1 New and Old Facilities 3 1.2 Levels of Detail 4 2. Introduction to the User Interface Management System 7 3. Overview of Top-Level Facilities for User Interface Programming 21 3.1 User Interaction Paradigm 21 3.2 Frame-Up Layout Designer 23 3.3 Program Framework Definition Facilities 25 3.4 Program Command Facilities 28 4. Overview of Command Processor Facilities 31 4.1 Basic Command Facilities 31 4.2 Advanced Command Facilities 32 4.2.1 Command Loop Management Facilities 33 4.2.2 Command Table Management Facilities 33 4.2.3 Command Accelerator Facilities 34 5. Overview of User Input Facilities 35 5.1 Basic User Input Facilities 35 5.1.1 Facilities for Accepting Single Objects 35 5.1.2 Facilities for Accepting Multiple Objects 38 5.2 Advanced User Input Facilities 39 5.2.1 Mouse Handler Facilities 39 5.2.2 Mouse Gesture Interface Facilities 41 5.2.3 Advanced Mouse Handler Concepts 42 6. Overview of Program Output Facilities 47 6.1 Basic Program Output Facilities 47 6.1.1 Basic Presentation Output Facilities 47 6.1.2 Character Environment Facilities 49 6.1.3 Textual List Formatting Facilities 51 iv Programming the User Interface, Volume A August 1986 6.1.4 Table Formatting Facilities 52 6.1.5 Graph Formatting Facilities 56 6.1.6 Graphic Output Facilities 57 6.1.7 Progress Indicator Facilities 59 6.1.8 Other Facilities for Program Output 60 6.2 Advanced Program Output Facilities 63 6.2.1 Advanced Presentation Output Facilities 63 6.2.2 Redisplay Facilities 65 6.2.3 Facilities for Writing Formatted Output Macros 66 6.3 Output Streams for Program Output Facilities 66 6.4 Naming Conventions for Program Output Macros 66 7. Presentation Substrate Facilities 69 7.1 Basic Presentation System Concepts 70 7.2 Predefined Presentation Types 71 7.3 Presentation-Type Definition Facilities 76 7.4 Presentation Input Context Facilities 78 7.5 Presentation Input Blip Facilities 78 7.6 Other Presentation Facilities 79 7.7 Writing a Presentation Type Parser 80 7.8 User-Defined Data Types as Presentation Types 82 8. Window Substrate Facilities 87 8.1 Mouse-Blinker Characters 89 9. User Interface Application Example 91 II. Dictionary of Top-level Facilities for User Interface Programming 99 10. Dictionary Notes 101 11. The Facilities 103 III. Dictionary of Command Processor Facilities 135 12. Dictionary Notes 137 13. The Facilities 139 v August 1986 Programming the User Interface, Volume A IV. Dictionary of User Input Facilities 163 14. Dictionary Notes 165 15. The Facilities 167 V. Dictionary of Program Output Facilities 201 16. Dictionary Notes 203 17. The Facilities 207 VI. Dictionary of Predefined Presentation Types 281 18. Dictionary Notes 283 19. The Facilities 285 VII. Dictionary of Presentation Substrate Facilities 347 20. Dictionary Notes 349 21. The Facilities 351 VIII. Dictionary of Window Substrate Facilities 395 22. Dictionary Notes 397 23. The Facilities 399 Index 413 August 1986 User Interface Management System: an Overview PART I. User Interface Management System: an Overview 2 Programming the User Interface, Volume A August 1986 3 August 1986 User Interface Management System: an Overview 1. Guide to User Interface Documentation 1.1 New and Old Facilities Genera 7.0 user interface facilities represent a major departure from tools offered for user interface programming in previous releases. Although the new facilities render many of the old ones obsolete, Genera still supports most of the old tools for the sake of compatibility with earlier releases. (For information on unsupported tools and incompatible changes: See the document Converting to Genera 7.0.) Consequently, the user interface documentation (Book 7) is divided into two major areas. The first area, Programming the User Interface, Volume A, focuses on the new facilities for user interface programming. Thus, Part I of this book, the Overview, is an overview of the new facilities and does not generally refer to the old tools; Parts II through VIII, the Dictionaries, include, with one or two exceptions, only the new definitions. The second area, Programming the User Interface, Volume B, corresponds to the pre-Genera 7.0 Book 7. This material is similar to the earlier book. The only changes are a series of minor corrections and improvements. Exceptions to this are changes to reflect the use of character styles instead of fonts, the implementation of mouse characters as structures, and a considerably expanded section on text scroll windows. (For more details: See the section "Changes to User Interface Programming Facilities in Genera 7.0" in Genera 7.0 Release Notes. Much of the basic conceptual documentation on the window system in the old Book 7 (Programming the User Interface, Volume B) remains relevant, as does the reference documentation for most window init options and methods. We wish to emphasize, however, that many of the higher-level facilities in the old user interface management system - various menu facilities, the mouse-sensitive items facility, scroll windows, and text scroll windows - are maintained primarily for compatibility with pre-Genera 7.0 user programs. The new system includes tools that are generally more powerful and easier to use than their old counterparts; in many cases, there are no counterparts in the old system. We encourage you, therefore, to concentrate your user interface programming efforts on facilities available in the new system. This will improve your productivity and better ensure the compatibility of your programs with future releases. 4 Programming the User Interface, Volume A August 1986 1.2 Levels of Detail Just as the user interface facilities themselves are arranged in a functional hierarchy - from the high-level and general-purpose to the low-level and special purpose - so too is the documentation hierarchical, from the general to the detailed. At the highest level of abstraction is the introductory chapter to the overview, which outlines the major categories of user interface programming tools and describes the organizational hierarchy. See the section "Introduction to the User Interface Management System", page 7. The subsequent chapters in the overview provide the next level of documentation detail. They discuss the major and minor groups of facilities, present tables listing the facilities included in each group, and include a variety of examples: • See the section "Overview of Top-Level Facilities for User Interface Programming", page 21. • See the section "Overview of Command Processor Facilities", page 31. • See the section "Overview of User Input Facilities", page 35. • See the section "Overview of Program Output Facilities", page 47. • See the section "Overview of Presentation Substrate Facilities", page 69. • See the section "Overview of Window Substrate Facilities", page 87. The overview concludes with a chapter outlining a sample application that illustrates the use of some of the key user interface programming facilities discussed in the preceding chapters: See the section "User Interface Application Example", page 91. Parts II through VIII provide the greatest amount of detail. These are the dictionaries, containing reference documentation for each of the many Lisp objects discussed in the conceptual chapters. Each object is an entry in a dictionary of related objects. There are eight dictionaries, corresponding to the major functional categories among which the objects (facilities) are divided: • See the section "Dictionary of Top-level Facilities for User Interface Programming", page 99. • See the section "Dictionary of Command Processor Facilities", page 135. • See the section "Dictionary User Input Facilities". 5 August 1986 User Interface Management System: an Overview • See the section "Dictionary Program Output Facilities". • See the section "Dictionary of Predefined Presentation Types", page 281. • See the section "Dictionary of Presentation Substrate Facilities", page 347. • See the section "Dictionary of Window Substrate Facilities", page 395. Within each dictionary, the arrangement of facilities is alphabetical (package prefixes are ignored).