vscreen.t 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. SPECIFICATION OF THE VIRTUAL-SCREEN DATATYPE
  2. Cris Perdue
  3. 10/1/82
  4. File: pw:vscreen.t
  5. VIRTUAL-SCREEN Flavor
  6. A virtual screen is an object that can be used as independent
  7. rectangular character display, but in fact shares a physical
  8. screen with other objects. The coordinate system is based at
  9. (0,0) with the origin at the upper left-hand corner of the
  10. screen. A virtual-screen has an associated virtual cursor
  11. position. Each character on a virtual screen has a specific
  12. associated display enhancement, such as inverse video or
  13. underlining.
  14. A virtual screen object maintains a stored representation of the
  15. image on the virtual screen, which is used to update the physical
  16. screen when new areas of the virtual screen become "exposed". A
  17. virtual screen does not itself maintain any information about
  18. changes to its contents. It informs the physical screen of all
  19. changes as they are made, and sends the entire screen contents to
  20. the physical screen upon its request.
  21. In contrast with LISP Machine "windows" (the equivalent of these
  22. virtual-screens), a program may write onto a virtual screen at
  23. any time. Whether the virtual screen is exposed, covered, or
  24. partially covered by virtual screens makes no difference. In all
  25. cases any change to a virtual screen that shows is permitted and
  26. sent to the shared-physical-screen as soon as it is made. The
  27. change is visible to the user as soon as a refresh operation is
  28. done.
  29. The following initialization options exist:
  30. screen (required)
  31. The shared-physical-screen on which this screen may become
  32. exposed.
  33. height, width (optional)
  34. The height and width of this screen, in characters. These
  35. default to the height and width of the shared-physical-screen of
  36. this screen.
  37. row-origin, column-origin (optional)
  38. Offset of the upper left-hand corner (origin) of this screen from
  39. the upper left-hand corner of the associated
  40. shared-physical-screen. These may be negative. (?)
  41. default-enhancement (optional)
  42. Display enhancement(s) to be applied to characters written into
  43. this screen by the "write" method. Display enhancements include
  44. inverse video and underlining. Defaults to the value of the
  45. normal-enhancement of the associated shared-physical-screen.
  46. Enhancement values may be legally generated by the function
  47. dc-make-enhancement, not documented here. (Defined in the file
  48. pw:display-char.sl.) Note: Characters written to this screen by
  49. write-display-character do not have the default enhancement
  50. applied.
  51. Note on clipping:
  52. All operations that modify the contents of the virtual screen
  53. effectively clip. If any or all of the coordinates to be
  54. modified lie outside the screen, any part of the operation
  55. applying to those coordinates is ignored and no warning is given.
  56. Attempts to move the cursor off the virtual screen just move it
  57. to the nearest border point.
  58. (CREATE-VIRTUAL-SCREEN SHARED-PHYSICAL-SCREEN)
  59. Creates a virtual-screen associated with the specified
  60. shared-physical-screen. All the rest of the virtual-screen's
  61. attributes are defaulted.
  62. (=> VIRTUAL-SCREEN SET-CURSOR-POSITION ROW COLUMN)
  63. Sets the virtual-screen's (virtual) cursor position. It is
  64. intended that virtual screens will be shown on actual screens
  65. that have at least one actual cursor. At certain times there
  66. will be an actual cursor displayed at the position of the
  67. virtual-screen's cursor.
  68. If the position is out of range, the nearest in-range values will
  69. be used instead without complaint.
  70. (=> VIRTUAL-SCREEN WRITE CH ROW COLUMN)
  71. Write a single character, represented as an integer, at the given
  72. coordinates. The character is written with the virtual-screen's
  73. default enhancements.
  74. (=> VIRTUAL-SCREEN WRITE-RANGE CH ROW LEFT-COLUMN RIGHT-COLUMN)
  75. Writes the same character to a range of positions within a line
  76. of the virtual-screen. The left-column and right-column
  77. coordinates are inclusive. The default-enhancements are used.
  78. (=> VIRTUAL-SCREEN WRITE-DISPLAY-CHARACTER DC ROW COLUMN)
  79. A single character is written to the virtual-screen with explicit
  80. enhancements. The DC argument is a character-with-enhancements
  81. object, not documented here.
  82. (=> VIRTUAL-SCREEN CLEAR)
  83. The entire contents of the virtual-screen is set to blanks with
  84. the default enhancement. All clearing operations set the cleared
  85. portion of the screen to blanks with the default enhancement.
  86. (=> VIRTUAL-SCREEN CLEAR-TO-END FIRST-ROW)
  87. Clears the entire contents of the rows from first-row to the end
  88. of the screen.
  89. (=> VIRTUAL-SCREEN CLEAR-TO-EOL ROW FIRST-COLUMN)
  90. Clears the given row from first-column to the end.
  91. (=> VIRTUAL-SCREEN EXPOSE)
  92. Causes the select-primary-owner method to be invoked on the
  93. shared-physical-screen of the virtual screen. The effect of this
  94. should be to guarantee that the virtual screen is exposed in
  95. front of all other virtual screens associated with the same
  96. shared-physical-screen (until this operation is invoked on some
  97. other virtual-screen). Also guarantees that the actual screen's
  98. cursor is displayed at the position of this virtual-screen's
  99. cursor.
  100. (=> VIRTUAL-SCREEN DEEXPOSE)
  101. Causes the remove-owner method to be invoked on the
  102. shared-physical-screen of this virtual screen. The effect should
  103. be to entirely remove this virtual screen from display on the
  104. shared-physical-screen.
  105. SEMI-PRIVATE METHODS
  106. These methods are invoked by the shared-physical-screen. They
  107. are not intended for public use. Shared-physical-screens require
  108. their "owner" objects to supply these methods.
  109. (=> VIRTUAL-SCREEN SEND-CHANGES BREAKOUT-ALLOWED)
  110. An "owner" object is permitted to delay sending changes to the
  111. shared-physical-screen. When the shared-physical-screen is to be
  112. brought up to date, it invokes this operation on its owners,
  113. which must write onto the shared-physical-screen to bring it up
  114. to date. Virtual-screens do not buffer or delay any updating, so
  115. this operation is a no-op.
  116. (=> VIRTUAL-SCREEN SEND-CONTENTS BREAKOUT-ALLOWED)
  117. This method is invoked by the shared-physical-screen to force an
  118. owner to write its entire contents out to the
  119. shared-physical-screen.
  120. (=> VIRTUAL-SCREEN ASSERT-OWNERSHIP)
  121. This method is invoked by the shared-physical-screen with the
  122. expectation that it in turn will invoke the
  123. shared-physical-screen's set-owner-region operation with
  124. parameters specifying what area is to be occupied by the owner.
  125. (=> VIRTUAL-SCREEN SCREEN-CURSOR-POSITION)
  126. This method is expected to return the coordinates of the
  127. virtual-screen's cursor, in the coordinate system of the
  128. shared-physical-screen.