c o N T E N T s

Introduction 1 Chapter 2 Writing Why Turbo Vision? ...... 1 applications 23 What is Turbo Vision? ...... 1 Your first Turbo Vision application .. . .. 2S What you need to know ...... 2 The desktop, bar, and status line . . 25 What's in this book? ...... 2 The desktop ...... " 26 ll1e status line ...... , 26 Part 1 Learning Turbo Vision Creating new commands ...... 27 Chapter 1 Inheriting the wheel 7 ll1e ...... 28 The framework of a windowing A note on structure ...... 30 application...... 7 Opening a ...... 31 A new Vision of application development. 8 Standard window equipment...... 31 The elements of a Turbo Vision Window initialization ...... 33 application ...... 9 The Insert method ...... 33 Naming of parts ...... : ...... 9 Closing a window ...... 34 Views ...... 9 Window behavior ...... 34 Events ...... 9 Look through any window ...... 35 Mute objects ...... 10 What do you see? ...... 37 A common "" ...... 10 A better way to Write ...... 38 "Hello, World!" Turbo Vision style ... . . 12 A simple ...... 38 Running HELLO.PAS ...... 13 Reading a text file ...... 39 Pulling down a menu ...... 14 Buffered drawing ...... 40 A box ...... 15 The draw buffer ...... 40 Buttons ...... 15 Moving text into a buffer ...... 41 Getting out ...... 16 Writing buffer contents ...... 41 Inside HELLO.PAS ...... 16 Knowing how much to write ...... 42 ll1e application object ...... 17 Scrolling up and down ...... 42 ll1e object ...... 18 Multiple views in a window ...... 45 Flow of execution and debugging .... 19 Where to put the functionality ' " . . . . 46 HELLO's main program...... 19 Making a dialog box ...... , . . .. 47 ll1e lnit method ...... 20 Executing a modal dialog box ...... 49 TI1e Run method ...... 20 Taking control ...... 50 ll1e Done method ...... 21 , button...... 50 Summary ...... 21 Nonnal and default buttons " .. . .. 52 Focused controls ...... ' . 52 Take your pick ...... 53 Creating a duster 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 53 Frames. 0 0 0 • •• 0 0 0 0.' 0 . 0 •• 0 0 0 o. 0 0 75

Check box values 00 0 000 0 000000000 53 Buttons 0 •• • 0 0 • • 0 0 • o • • 0 • 0 • 0 00 •• 0 0 75

One more cluster 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 54 Clusters o. 0 • • 0 0 0 0 • • 0 0 0 0 0 • o. 0 • • 0 0 75

Labeling the controls 0 0 0 0 0 0 0 0 0 0 0 00 0 0 55 Menus 0 ••• 00 • • 0. 0. o. 0 " 0 0 •• • 0. 0 0 75

TI1e input line object 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 55 Histories 0 0 • 0 •• 0 • • • • 0 • 0 • • 0 • 0 0 • 0 0 0 76

Setting and getting data 0 0 0 0 0 0 0 0 0 •• 00 56 Input lines o. 0 •• 0 •• • 0 •• 0 • •• 0 0 0 0 0 0 76

Shortcut keys and conflicts o. 0 0 • • 0 0 0 0 59 List viewers 0 0 • • • 0 • 0 • 0 • • • 0 0 0 • 0 • 0 0 76

Ending the dialog box 0 0 0 0 0 0 0 •• 0 • 0 0 0 61 Scrolling objects 0 0 • 0 0 0 0 • 0 0 0 0 0 • 0 0 0 76

Other dialog box controls o. 0 • 0 0 0 • • 0 0 • • 61 Text devices 0 • • • 0 • 0 ••• • • • 0 0 • • • • •• 77

Static text .. 0 0 0 • ••••• o. 0 • • 0 •• 0 • • • • • 61 Static text ... . . 0 •• 0 •••••• 0 0 •• • • o. 77

List viewer 0 0 • • • 0 • 0 •• 0 0 0 • • • 0 0 • • 0 •• 0 61 Status lines 0 • 0 0 • •• •• • 0 0 • • 0 0 • 0 • • • 0 78

List box .. . 0 • 000 0 00 .0 00 • • • • ••• 0 o •• 0 62 Non-visible elements 0 0 •• • 0 •• 0 • •• 0 0 • o. 78

fiistory . 0 0 0 0 0 • 0 0 0 0 0 0 0 0 0 0 0 0 • • 0 0 • 0 0 0 62 Streams 0 0 0 0 •• • 00 ••• 0.00 0. o. o. 0 • ••• 78

Standard dialog boxes 0 0 0 0 0 0 0 • 0 • • 0 0 • •• 62 DOS streams . 0 0 0 0 0 • • • 0 0 0 0 0 • 0 0 • 0 0 79

Buffered streams 0 0 • 0 0 • • • • • 0 0 •• 0 0 0 79 Part 2 Programming Turbo Vision EMS streams 0 0 0 0 0 0 0 • 0 0 0 0 0 0 0 0 • 0 0 0 79

Chapter 3 The object hierarchy 65 Resources .. 0 • 0 0 0 0 0 0 0 • • •• 0 • 0 • 0 0 • 0 •• 79

Collections 0 0 0 • 0 0 0 0 0 0 0 0 0 • 0 • 0 •• 0 • • o. 79 Object typology 0 • 0 0 0 0 0 0 0 • 0 0 0 0 0 0 0 0 0 0 0 0 67

Sorted collections ...... 0 •• • • 0 80 Abstract objects 0 0 • 0 0 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 67

String collections 0 0 0 0 • ••• 0 0 • • • • 0 0 0 80 Abstractmetl10ds 0 • • • • o. 0 0 0 0 o. 0 0. 00 68

Resource collections 0 • 0 ••• 0 0 •• 0 •• 0 80 Object instantiations and derivations 0 0 0 68

String lists 0 0 0 0 0 • 0 0 •• 0 0 • 0 0 • 0 0 0 0 • • o. 80 Instantiation 0 0 0 0 0 0 0 0 0 0 0 • 0 • • 0 0 0 0 0 • • 68

Derivation 0 0 0 0 0 0 0 0 0 0 •• 0 0 0 0 0 0 •• 0 0 0 0 69 Chapter 4 Views 81 Turbo Vision methods 0 0 0 0 0 •• • 0 0 0 0 ••• 0 69 "We have taken cantrol of your TV .. 0" 81 Abstract methods . . 0 0 0 0 0 0 •• •• 0 0 0 • •• 69 Simple view objects ... 0 0 • 0 •• 0 0 0 0 • 0 0 0 0 82 Pseudo-abstract methods 0 0 0 • 0 • 0 0 0 • 0 70 Setting your sigh ts . .. 0 0 0 •••• 0 0 0 0 • 0 0 82

Virtual methods . 0 0 • 0 0 ••• • 0 • • • • • • •• 70 Getting the TPoint 000 • • • • 00 • • 000 • • 83 Static methods 0 • • 0 • 0 • 0 0 •••• 0 • 0 • • ••• 70 Getting into a TRect 0 • 0 • • o. 0 • •• 0 o. 83

Turbo Vision fields 0 0 • 0 0 0 •• 0 •• 0 • 0 • • 0 •• 70 Turbo Vision coordinates . o ••• 000 0 84 Primitive object types. 0 •• ••• 0 0 • • • 0 • • • • 71 Making an appearance .. 0 0 0 0 0 • 0 0 0 0 0 0 84 TPoint 00 •• 0 0 0 . 000 .0 00 .0 0 .0 . 0 •• 0 . 00 72 Territoriality .. 0 0 0 0 • 0 0 0 •• 0 • •• • 0 0 0 85

TRect. 0 0.00 ••• : •• • 00 •• 0 o. o. o. 0 •• • •• 72 Drawing on demand 0 0 0 0 0 0 • 0 0 • •• 0 85 TObject .. 0 • 0 • • , 0 •• •• 0 0 ••• 0 0 0 • 0 0 • 0 0 72 Putting on your best behavior . 0 • 0 • • • 85 Views .. 0 0 o. 0.0 ••• 000 • • 0 ••• • 0 •• 0 ••• 0 72 Complex views 0 0 0 •• 0 0 0 0 0 •• 0 0 0 0 0 0 0 0 0 0 86

Views overview .. . 0 • 0 0 0 • •••••••• " 73 Groups and subviews 0000000 . 0 • 0 00 0 86 Groups. 0 •• 0 . 0. 00 •• • 0000 •••• • 000 . 0 73 Getting into a group . 0 0 0 0 • 0 • 0 • 0 •• 0 • • 87 The abstract group . 0 0 0 • • 0 • 0 : 0 0 , 0 0 73 Another angle on Z-order 0 0 • •• • 0 0 0 88 Desktops .0 . 0 •• 0 00 0 000 0 .0 0 ' : • 0 • 0 74 Group portraits 0 • 0 0 • 0 0 0 0 • 0 0 0 0 • • 0 • • 0 89 Programs ...... 0 • ••••• 0 •• • • • 0 74 Relationships between views . 0 0 0 • • ,0 90 Applications . . .. 0 0 0 0 •• •• • 0 0 • 0 •• • 74 The object hierarchy . 0 • •• 0 0 0 0 •• 0 • 0 91 Windows .. 0 0 0 • • • 0 0 • • 00 0 •• • o. 0 0 , 74 Ownership 0 • 0 0 0 • 0 • 0 0 • 0 • 0 • 0 • 0 0 0 0 0 91 Dialog boxes . . 0 0 0 0 0 0 •• • 0 • 0 0 • 0 • o. 74 Subviews and view trees 0 0 • 0 • • 0 0 0 0 0 0 92 Terminal views 0 ••• • 0 0 0 0 0 •• 0 • 0 0 • 0 o. 75 75 SeJected and focused views ...... 95 Chapter 5 Event-driven 75 Finding the focused view ...... 96 programming 109 75 How does a view get the focus? ...... 96 Bringing Turbo Vision to life ...... 109 75 The focus chain ...... 97 Reading the user's input ...... 109 76 Modal views ...... 97 The nature of events ...... 1111 76 Modifying default behavior ...... 98 Kinds of events ...... 111 76 TIle Options flag word ...... 98 Mouse events ...... 112 7 ofSelectabJe ...... 99 Keyboard events ...... 112 n ofTopSelect ...... 99 Message events ...... 112 77 ofFirstGick ...... 99 "Nothing" events ...... 112/ 78 ofFramed ...... 99 Events and commands...... 113 78 ofPreProcess ...... 99 Rou ting of events ...... 113 7 ofPostProcess ...... 99 Where do events come from? ...... 113 79 ofBuffered ...... 100 Where o events go? ...... 114 79 ofTileable ...... 100 Positional events...... 114 79 ofCenterX ...... , 100 Focused events ...... 115 79 ofCenterY ...... 100 Broadcast events ...... 115 79 ofCentered ...... 101 User-defined events ...... 116 TIle GrowMode flag byte ...... 101 Masking events ...... 116 o gfGrow LoX ...... 101 Phase ...... 116 o gfG rowLoY ...... 101 The Phase field ...... 118 o gfGrow HiX ...... 101 Commands ...... 119 gfGrowHiY ...... 101 Defining commands ...... 119 gfGrow All ...... 101 Binding commands ...... 120 gfGrowRel ...... 101 Enabling and disabling commands .. 120 TIle DragMode flag byte ...... 102 Handling events ...... 121 dmDragMove ...... :...... 102 The event record...... 122 dmDragGrow ...... 102 G eari.ng events ...... 123 d mLirnitLoX ...... 102 Abandoned events ...... 123 dmLimitLoY ...... 102 Modifying the event mechanism ...... 124 dmLimitHiX ...... 102 Centralized event gathering ...... 124 :> d mLimitHiY ...... 102 Overriding GetEvent ...... 125 u5 dmLimitAll ...... 102 Using idle time ...... 125 State flag and SetState ...... 102 Inter-view communication ...... 126 Acting on a state change ...... 103 Intermediaries...... 126 Wha t color is your view? ...... 104 Messages among views ...... 127 Color palettes ...... 105 Who handled the broadcast? ...... 128 Inside color palettes ...... 105 Is anyone out there? ...... 128 TIle GetColor method ...... 106 Who's on top? ...... , ...... 129 Overriding the default colors ...... 107 Calling HandleEvent ...... 129 Adding n ew colors ...... 108 O} Help context ...... 130

III Chapter 6 Writing safe programs 131 TIle Put process...... 159 Ailor nothing programming ...... 131 TIle Get process ...... 160 The safety pool ...... 132 Handling nil object pointers ...... 160 The ValidView method . .... " ... 133 Collections on streams: a complete Non-memory errors ...... 134 example ...... 160 Reporting errors ...... 135 Adding Store methods ...... 161 Major consumers ...... 135 Registration records...... 162 Registering ...... " ...... " 163 Chapter 7 Collections 137 Writing to the stream...... 163 Collection objects ...... 138 Who gets to store thUlgS? ...... 164 Collections are dynamically sized . . . 138 Subview instances ...... 1(,4 Collections are polymorphic ...... " 138 Peer view instances ...... 165 Type checking and collections ...... 138 Storing alld loading the desktop ...... 166 Collecting non-objects ...... 139 Copying a stream ...... 167 Creating a collection ...... " 139 Random-access streams ...... 167 Hera tor methods ...... 141 Non-objects on streams ...... 168 The ForEach iterator ...... 141 Designing your own streams ...... 168 The FirstThat and LastThat iterators . 142 Stream error handling ...... 168 Sorted collections ...... 143 String Collections ...... 144 Chapter 9 Resources 169 Iterators revisited ...... 145 Why use resources? ...... 169 Finding an item ...... 146 What's in a resource? ...... 170 Polymorphic Collections ...... " 146 Creamlg a resource ...... 171 Collections and memory management 149 Reading a resource ...... 172 String lists ...... , ...... 173 Chapter 8 Streams 151 Making string lists ...... 173 The question: object I/O ...... 152 The answer: streams ...... " 152 Chapter 10 Hints and tips 175 Streams are polymorphic...... 152 Debugging Turbo Vision applications . 175 Streams handle objects ...... 153 It doesn't get there ...... 176 Essential stream usage...... 153 Hiding behind a mask ...... 176 Setting up a stream ...... 154 Stolen events ...... 176 Reading and writing a stream ...... 154 Blame your parents ...... 177 Putting it on ...... 155 It doesn' t do what I expect ...... 177 Getting it back ...... ; '...... 155 It hangs ...... 177 In case of error ...... 156 Porrulg applications to Turbo Vision . .. 178 Shutting down the stream ...... 156 Scavenge your old code ...... 178 Making objects streamable ...... 156 Rethink your organization ...... 179 Load alld Store methods ...... 156 Using bitrnapped fields ...... 180 Stream registration ...... 157 Flag values ...... 180 Object 1D munbers ...... 158 Bit masks ...... 180 The automatic fields...... 158 Bitwise operations ...... 181 Register here ...... 159 Setting a bit ...... 181 The stream mechanism ...... 159 Clearing a bi t ...... 181

Iv 159 Checking bits ...... 182 Types ...... : ...... 196 160 Using masks ...... 182 Variabies ...... 196 160 Surnnnary ...... 182 The Menus unit ...... 197 Types ...... 197 Part 3 Turbo Vision Reference r 160 Procedures and functions ...... ~ . . , 197 161 Chapter 11 How to use the TMenuItem functions ...... 197 162 reference 185 TMenu routines ...... ,...... 197 163 How to find what you want ...... 185 TStatusLine functions ...... 197 163 Objects in general ...... 186 The Drivers wut ...... 198 164 Naming conventions ...... 186 Types ...... ( 198 164 Constants ...... 198 165 Chapter 12 UnIt cross reference 189 Mouse button state masks ...... 198 166 The Objects unit ...... 189 Event codes ...... 198 .. 167 Types ...... 190 Event masks ...... 198 167 Type conversion records ...... 190 Keyboard state and shift masks . . . 199 168 Objects unit types ...... 190 Standard command codes ...... 199 168 Constants . .. . '" ...... 190 TDialog standard commands .. .. . 199 168 Stream access modes ...... 190 Screen modes ...... 199 Stream error codes ...... 190 Variables ...... 200 169 Maximwn collection size ...... 191 Initialized variables ...... 200 169 Collection error codes ...... 191 Uninitialized variables ...... 200 170 Variables ...... 191 System error handler variables . . .. 200 171 Procedures and functions ...... 191 Procedures and functions ...... 201 172 The Views unit ...... 192 Event manager procedures ...... , 201 173 Types ...... 192 Screen manager procedures ...... 201 173 Constants ...... 192 Default system error handler 175 TView State masks ...... 192 fWKtion ...... 201 175 Views W1it constants ...... 193 System error handler procedures.. 201 176 TView Option masks ...... 193 Keyboard support functions ...... 201 176 TView GrowMode m asks ...... 193 String formatting procedure ...... 201 TView DragMode masks ...... 193 176 Buffer move procedures ...... 202 Scroll bar part codes ...... 194 177 String length function ...... 202 Window flag masks ...... 194 177 Driver initialization ...... 202 177 TWindow palette entries ...... " 194 The TextView unit ...... 202 178 Standard view comm ands ...... 194 Types ...... 202 178 Variables ...... 194 Procedure ...... 202 179 Function ...... 195 The Memory unit ...... 202 180 The Dialogs unit ...... 195 Variable ...... ; . .. . 203 Types ...... 195 180 Procedures and functions ...... 203 Constants ...... 195 180 The HistList unit ...... 203 Button flags ...... 195 181 Variables ...... 203 181 Procedures and functions ...... 196 Procedures and functions ...... 204 181 The App unit ...... 196

v apter 13 Object reference 205 Fields ...... 236 Fields Ie object ...... 206 Methods ...... _ ...... 237 Meth =-ield!" ...... 206 THis tory ...... " 244 Palette e~nods ...... 206 Fields ...... 244 TPoint - - Fplication ...... 207 Methods ...... 245 Fields lethods ...... 207 Palette...... 245 t Prograr­ - Background ...... 208 THistoryViewer ...... 246 Met! Field ...... 208 Field ...... 246 Methods ...... 208 Methods ...... 246 Palette ...... 209 Palette ...... 247 TBufStrean1 ...... • . . 209 THis tory Window ...... 247 Pale" Fields ...... 210 Field ...... 247 Methods ...... " 210 Methods ...... : ; ...... 247 TBlltton ...... 212 Palette...... 248 Fields ...... 212 TinputLine ...... " 248 Methods ...... 213 Fields ...... 249 Palette...... 215 Methods ...... 250 Field5 T01eckBoxes ...... 215 Palette ...... " 252 Meth Fields ...... 215 TLabel ...... ; ...... 253 TScrollB Methods ...... 216 Fields ...... _..... ; ...... 253 Fiel Palette...... 216 Methods ...... 253 Melli TOuster ...... 217 Palette ...... 254 Pale Fields ...... 217 TListBox ...... , 255 TScro Methods ...... 218 Field ...... 255 Fiel Palette ...... 220 Methods ...... 256 Meth TCollection ...... 221 Palette...... 257 Fields ...... 221 TListViewer ...... ; ...... " 258 Methods ...... 222 Fields ...... 258 TDeskTop ...... 227 Methods ...... 259 Methods ...... 227 Palette ...... 261 TDialog ...... , 228 TMenuBar ...... 262 Methods ...... 229 Methods ...... 262 Palette ...... ~ ...... 229 Palette ...... 263 TDosStream ...... " ...... 230 TMenuBox ...... 263 Fields ...... 231 Methods ...... 263 Methods ...... 231 Palette...... 264 TEmsStream ...... 232 TMenllView ...... _.. . , ...... 264 Fields ...... ;... 232 Fields ...... 265 Methods ...... 233 Methods ...... 265 TFrame ...... 234 Palette ...... 267 Methods ...... 234 TObject ...... 267 Palette ...... 235 Methods ...... 267 TGroup ...... 235 TParamText ...... ; . . . 268

vi

--... -- --- ...... 236 Fields ...... 268 TStrListMaker ...... 300 ...... 237 Methods ...... 268 Methods ...... 301 ...... 244 Palette ...... 269 TTenrrrinal ...... 302 ...... 244 TPoint ...... 269 Fields ...... 1.. 302 ...... 245 Fields ...... 269 Methods ...... r. . 303 245 TProgram ...... 270 Palette...... 304 ...... 246 Methods ...... 270 TTextDevice ...... 305 246 Palettes ...... 274 Methods ...... 305 246 TRadioButtons .. ; ...... 276 Palette ...... ; .. 305 247 Methods ...... 277 TView ...... /. 306 247 Palette ...... ; ...... 277 Fields ...... 306 247 TRect ...... 278 Methods ...... 309 247 Fields ...... 278 TWindow ...... 321 248 Methods ...... 278 Fields ...... 322 248 TResourceCollection ...... 279 Methods ...... 322 249 TResourceFile ...... 279 Palette...... 325 250 Fields ...... 280 Chapter 14 Global reference 327 252 Methods ...... 280 Sample procedure...... 327 253 TScroUBar ...... 282 Abstract procedure...... 328 253 Fields ...... 282 Application variable ...... 328 253 Methods ...... 283 AppPalette variable ...... 328 254 Palette ...... 286 apXXXX constants ...... 329 255 TScroller ...... 286 AssignDevice procedure ...... 329 255 Fields ...... 286 bfXXXX constants ...... 329 256 Methods ...... 287 ButtonCount variable...... 330 257 Palette ...... 288 CheckSnow variable...... 330 258 TSortedCollection ...... 289 ClearHistory procedure ...... 331 258 Methods ...... 289 ClearScreen procedure ...... 331 TStaticText ...... 290 259 CllliXXXX constants ...... 331 Field ...... 291 261 coXXXX constants ...... 334 Methods ...... 291 262 CStrLen function...... 334 Palette...... 292 262 CtrIBreakHit variable ...... 335 TStatusLine ...... 292 263 CtrlToArrow function ...... 335 Fields ...... 293 263 CursorLines variable ...... 336 Methods ...... 293 263 DeskTop variable ...... 336 264 Palette ...... '...... 294 TStream ...... 295 DisposeMenu procedure ...... 336 264 DisposeStr procedure ...... , 336 Fields ...... 295 265 drnXXXX constants ...... 337 Methods ...... 296 265 DoneEvents procedure ...... •. . 337 267 TStringCollection ...... 298 DoneHistory procedure ...... 338 267 Methods ...... 299 DoneMemory procedure ...... 338 . . 267 TStringList ...... 299 DoneSysError procedure. . . . . • ...... 338 268 Methods ...... , 300

vII 338 MinWinSize variable ...... 356 339 MouseButtons variable ...... 356 e\'anable . .. ,...... 339 MouseEvents variable ...... 357 ariable ...... , ...... 339 MouseIntFlag variable ...... 357 340 MouseWh ere variable ...... 357 ameSt;: ::....pe .. . . , ...... 341 MoveBuf procedure ...... 357 · ~flf..,.<;edE\'ents variable ...... " 341 MoveOlar procedure ...... 358 tStr procedure ...... ,.... 341 MoveCSrrprocedtcre ...... 358 -.ei'Bu.I.\iem procedure ...... 343 MoveStr procedure...... 358 GetAltChar function...... 343 NewItem function ...... 359 GeL.-\ltCode function ...... 344 NewLine function ...... 359 GetBufMem procedure ...... 344 NewMenu function ...... 359 GetKeyEvent procedure . , ...... ,. 344 NewSItem function ...... 360 GetMouseEvent procedure ...... 345 NewStatusDef function ... , ...... 360 gfX.:'{XX constants ...... 345 NewStatusKey hmction ...... 360 hcXXXX constants ...... 346 NewStr function ...... , .. , 361 HideMouse procedure ...... 347 NewSubMenu function ...... 361 HiResScreen variable ...... 347 o£XXXX constants ...... 361 HistoryAdd procedure . . , ...... 347 PChar type ...... 363 HistoryBlock variable ...... 347 PositionalEvents variable . . ,...... 363 HistoryCount function ...... 348 PrintStr procedure ...... 363 HistorySize variable ...... 348 PString type ...... 364 HistoryStr function ...... 348 PtrRec type ...... 364 HistoryUsed variable ...... 348 RegisterDiaJogs procedure ...... 364 lnitEvents procedure ...... 349 Registertype procedure ...... 364 Initli'lStOry procedure ...... 349 RepeatDelay variable ...... , 365 InitMemory procedure ...... 349 SaveCtrlBreak variable ...... 365 ltutSysError p rocedure ...... 349 sbXXXX constants ...... 365 blitVideo procedure ...... , 350 ScreenBuffer variable ...... 366 kbXXXX constants ...... 350 ScreenHeight variable ...... 366 LongDiv function ...... 352 ScreenMode variable ...... " ... 367 LongMul funCtiOll ...... 353 ScreenWidth variable ...... 367 LongRec type ...... 353 SelectMode type ...... 367 LowMemory function ...... 353 SetVideoMode procedure ., ...... 367 LowMemSize variable ...... 353 sfXXXX constants ...... 368 MaxBufMem variable ...... 354 ShadowAttr variable ...... ,...... 369 MaxColiectionSize variable ...... 354 ShadowSize variable ...... 369 MaxViewWidth constant ...... 354 Show Markers variable...... 370 mbXXXX constants ...... 354 ShowMouse procedure ...... 370 MemAlioc function...... 355 smXxxx constants ...... 370 MemAllocSeg function ...... 355 SpecialChars variable ...... 371 MenuBar variable ...... 355 stXXXX constants ...... " 371 Message function ...... 356 StartupMode variable ...... 372

vIII 356 StatusLine variable ...... 372 TSItem type ...... 379 356 StreamError variable ...... 372 TStatusDef type ...... 379 357 SysColorAttr variable ...... 373 TStatusItem type ...... , 380 357 SysErrActive variable...... 373 TStreamRec type ...... 380 357 SysErrorFunc variable ...... 373 TStrIndex type ...... ~ . 382 357 SysMonoAttr variable ...... 374 TStrIndexRec type ...... 382 358 SystemError function ...... 374 TSysErrorFunc type ...... 382 358 TByteArray type ...... 375 ITerrninalBuffer type ...... 382 358 TConunandSet type ...... 375 TTitleStr type...... 382 35 TDrawBuffer type ...... 375 TVideoBuf type ...... ( 383 359 TEvent type ...... 376 TWordArra y type ...... 383 359 TItemList type ...... , .. .. : ...... 377 wfXXXX constants ...... 383 360 T~enutype ...... 377 wnNoNumber constant...... 384 360 T~enuItem type ...... 377 WordRec type ...... 384 . . 360 T~enuStr type ...... 378 wpXXXX constants ...... 384 361 TPalette type ...... 378 Index 385 361 TScrollChars type ...... 379 361 363 363 363 364 364 364 64 365 365 365 366 366 367 367 367 367 368 369 369 370 70 370 371 1 372

Ix