BORLAND Turbo Pascafbj Version 6.0

Total Page:16

File Type:pdf, Size:1020Kb

BORLAND Turbo Pascafbj Version 6.0 BORLAND Turbo PascafBJ Version 6.0 Turbo Vision Guide BORLAND INTERNATIONAL INC. 1800 GREEN HILLS ROAD P.O. BOX 660001, scons VALLEY, CA 95067-0001 Copyright © 1990 by Borland International. All rights reserved. All Borland products are trademarks or registered trademarks of Borland International, Inc. Other brand and product names are trademarks or registered trademarks of their respective holders. PRINTED IN THE USA. R2 10 9 8 7 6 5 4 3 2 1 c o N T E N T s Introduction 1 Chapter 2 Writing Turbo Vision Why Turbo Vision? ................... 1 applications 23 What is Turbo Vision? ................. 1 Your first Turbo Vision application . .. 23 What you need to know ............... 2 The desktop, menu bar, and status line .. 25 What's in this book? ................... 2 The desktop . .. 26 The status line . .. 26 Part 1 Learning Turbo Vision Creating new commands. .. 27 Chapter 1 Inheriting the wheel 7 The menu bar ..................... 28 The framework of a windowing A note on structure . .. 30 application . .. 7 Opening a window. .. 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 "look and feel" .......... 10 A better way to Write. .. 38 "Hello, World!" Turbo Vision style ..... 12 A simple file viewer .. .. 38 Running HELLO.PAS .............. 13 Reading a text file .. .. 39 Pulling down a menu. .. 14 Buffered drawing .................. 40 A dialog 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 The application object .............. 17 Scrolling up and down ............. 42 The dialog box 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 The Init method ................... 20 Executing a modal dialog box ....... 49 The Run method . .. 20 Taking control ..................... 50 The Done method . .. 21 Button, button... ................. 50 Summary ........................... 21 Normal and default buttons ....... 52 Focused controls . .. 52 Take your pick .................... 53 Creating a cluster ................ 53 Frames ......................... 75 Check box values ................ 53 Buttons ......................... 75 One more cluster. .. 54 Clusters ........................ 75 Labeling the controls ............... 55 Menus .......................... 75 The input line object. .. 55 Histories . .. 76 Setting and getting data ............. 56 Input lines ...................... 76 Shortcut keys and conflicts .......... 59 List viewers ..................... 76 Ending the dialog box .............. 61 Scrolling objects ................. 76 Other dialog box controls ............. 61 Text devices ..................... 77 Static text ......................... 61 Static text ........................ 77 List viewer ........................ 61 Status lines . .. 78 List box ........................... 61 Non-visible elements .............' .... 78 History ........................... 62 Streams ........................... 78 Standard dialog boxes ................ 62 DOS streams .................... 79 Buffered streams . .. 79 Part 2 Programming Turbo Vision EMS streams .................... 79 Chapter 3 The object hierarchy 65 Resources . .. 79 Object typology . .. .. .. .. .. .. .. ... 67 Collections . .. 79 Abstract objects . .. 67 Sorted collections ................ 80 Abstract methods .................. 68 String collections ................. 80 Object instantiations and derivations ... 68 Resource collections . .. 80 Instantiation ...................... 68 String lists ........................ 80 Derivation ........................ 69 Chapter 4 Views 81 Turbo Vision methods ................ 69 "We have taken control of your TV ... " .. 81 Abstract methods .................. 69 Simple view objects .................. 82 Pseudo-abstract methods ........... 70 Setting your sights ................. 82 Virtual methods ................... 70 Getting the TPoint ............... 83 Static methods . .. 70 Getting into a TRect .............. 83 Turbo Vision fields . .. 70 Turbo Vision coordinates ......... 84 Primitive object types . .. 71 Making an appearance. .. 84 TPoint ............................ 72 Territoriality .................... 85 TRect ............................. 72 Drawing on demand ............. 85 TObject ........................... 72 Putting on your best behavior ....... 85 Views .............................. 72 Complex views ..... .. 86 Views overview ................... 73 Groups and subviews .............. 86 Groups ........................... 73 Getting into a group . .. 87 The abstract group ............... 73 Another angle on Z-order ......... 88 Desktops ....................... 74 Group portraits . .. 89 Programs ....................... 74 Relationships between views ........ 90 Applications .................... 74 The object hierarchy . .. 91 Windows ....................... 74 Ownership . .. 91 Dialog boxes .................... 74 Sub views and view trees . .. 92 Terminal views .................... 75 ii Selected and focused views . .. 95 Chapter 5 Event-driven Finding the focused view ........... 96 programming 109 How does a view get the focus? ... .. 96 Bringing Turbo Vision to life ......... 109 The focus chain ... .. 97 Reading the user's input ........... 109 Modal views ........................ 97 The nature of events . .. 111 Modifying default behavior ........... 98 Kinds of events ................... 111 The Options flag word . .. 98 Mouse events .................. 112 ofSelectable ..................... 99 Keyboard events . .. 112 ofTopSelect ..................... 99 Message events ..... .. 112 ofFirstClick ..................... 99 "Nothing" events ............... 112 ofFramed ....................... 99 Events and commands ............. 113 ofpreProcess .................... 99 Routing of events ................... 113 ofpostProcess . .. 99 Where do events come from? ....... 113 ofBuffered ..................... 100 Where do events go? .............. 114 ofTileable ...................... 100 Positional events ................ 114 ofCenter X . .. 100 Focused events ................. 115 ofCenterY . .. 100 Broadcast events . .. 115 ofCentered . .. 101 User-defined events . .. 116 The GrowMode flag byte ........... 101 Masking events ................... 116 gfGrowLoX .................... 101 Phase ........................... 116 gfGrowLoY .................... 101 The Phase field ................. 118 gfGrowHiX .................... 101 Commands ........................ 119 gfGrowHiY .................... 101 Defining commands .. .. 119 gfGrowAll ..................... 101 Binding commands ............... 120 gfGrowRel ..................... 101 Enabling and disabling commands .. 120 The DragMode flag byte ........... 102 Handling events .................... 121 dmDragMove .................. 102 The event record .................... 122 dmDragGrow .................. 102 Clearing events . .. 123 dmLimitLoX ................... 102 Abandoned events ................ 123 dmLimitLoY ................... 102 Modifying the event mechanism ...... 124 dmLimitHiX ................... 102 Centralized event gathering ........ 124 dmLimitHiY ................... 102 Overriding GetEvent. .. 125 dmLimitAll .................... 102 Using idle time ................... 125 State flag and SetState ............. 102 Inter-view communication ........... 126 Acting on a state change ......... 103 Intermediaries .................... 126 What 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 The GetColor method ............. 106 Who's on top? .................. 129 Overriding the default colors ....... 107 Calling HandleEvent .............. 129 Adding new colors . .. 108 Help context ..................... 130 iii Chapter 6 Writing safe programs 131 The stream mechanism .............. 159 All or nothing programming ......... 131 The Put process . .. 159 . The safety pool ................... 132 The Get process . .. 160 The ValidView method .......... 133 Handling nil object pointers ........ 160 Non-memory errors ............... 134 Collections on streams: A complete Reporting errors ................ 135 example ........................... 160 Major consumers ................. 135 Adding Store methods. ,.......... 161 Registration records ............. 162 Chapter 7 Collections 137 Registering . .. 163 Collection objects ................... 138 Writing to the stream . .. 163 Collections are dynamically sized ... 138 Who gets to store things? ............ 164 Collections are polymorphic . .. 138 Subview instances ................ 164 Type checking and collections ...... 138 Peer view instances ............... 165 Collecting non-objects ........... 139 Storing and
Recommended publications
  • A Java Implementation of a Portable Desktop Manager Scott .J Griswold University of North Florida
    UNF Digital Commons UNF Graduate Theses and Dissertations Student Scholarship 1998 A Java Implementation of a Portable Desktop Manager Scott .J Griswold University of North Florida Suggested Citation Griswold, Scott .,J "A Java Implementation of a Portable Desktop Manager" (1998). UNF Graduate Theses and Dissertations. 95. https://digitalcommons.unf.edu/etd/95 This Master's Thesis is brought to you for free and open access by the Student Scholarship at UNF Digital Commons. It has been accepted for inclusion in UNF Graduate Theses and Dissertations by an authorized administrator of UNF Digital Commons. For more information, please contact Digital Projects. © 1998 All Rights Reserved A JAVA IMPLEMENTATION OF A PORTABLE DESKTOP MANAGER by Scott J. Griswold A thesis submitted to the Department of Computer and Information Sciences in partial fulfillment of the requirements for the degree of Master of Science in Computer and Information Sciences UNIVERSITY OF NORTH FLORIDA DEPARTMENT OF COMPUTER AND INFORMATION SCIENCES April, 1998 The thesis "A Java Implementation of a Portable Desktop Manager" submitted by Scott J. Griswold in partial fulfillment of the requirements for the degree of Master of Science in Computer and Information Sciences has been ee Date APpr Signature Deleted Dr. Ralph Butler Thesis Advisor and Committee Chairperson Signature Deleted Dr. Yap S. Chua Signature Deleted Accepted for the Department of Computer and Information Sciences Signature Deleted i/2-{/1~ Dr. Charles N. Winton Chairperson of the Department Accepted for the College of Computing Sciences and E Signature Deleted Dr. Charles N. Winton Acting Dean of the College Accepted for the University: Signature Deleted Dr.
    [Show full text]
  • LWUIT Developer's Guide
    Lightweight UI Toolkit Developer’s Guide Part No. 07-08-10 July 2010 Copyright © 2008, 2010 Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related software documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065.
    [Show full text]
  • The Desktop (Overview)
    The desktop (overview) The desktop is the main screen area that you see after you turn on your computer and log on to Windows. Like the top of an actual desk, it serves as a surface for your work. When you open programs or folders, they appear on the desktop. You can also put things on the desktop, such as files and folders, and arrange them however you want. The desktop is sometimes defined more broadly to include the taskbar and Windows Sidebar. The taskbar sits at the bottom of your screen. It shows you which programs are running and allows you to switch between them. It also contains the Start button , which you can use to access programs, folders, and computer settings. On the side of the screen, Sidebar contains small programs called gadgets. The desktop, taskbar, and Sidebar Where did my desktop go? Because programs run on top of the desktop, the desktop itself is often partially or completely hidden. But it's still there, underneath everything. To see the whole desktop without closing any of your open programs or windows, click the Show Desktop button on the taskbar. The desktop is revealed. Click the icon again to restore all of your windows to the way they were. Desktop Training Session Handout Page 1 http://ict.maxwell.syr.edu/vista/ Working with desktop icons Icons are small pictures that represent files, folders, programs, and other items. When you first start Windows, you'll see at least one icon on your desktop: the Recycle Bin (more on that later).
    [Show full text]
  • Creating Document Hyperlinks Via Rich-Text Dialogs
    __________________________________________________________________________________________________ Creating Document Hyperlinks via Rich-Text Dialogs EXAMPLE: CREATING A HYPERLINK IN EXCEPTIONS/REQUIREMENTS: Enter the appropriate paragraph either by selecting from the Lookup Table or manually typing in the field, completing any prompts as necessary. Locate and access the item to be hyperlinked on the external website (ie through the County Recorder Office): Copy the address (typically clicking at the end of the address will highlight the entire address) by right click/copy or Control C: __________________________________________________________________________________________________ Page 1 of 8 Creating Hyperlinks (Requirements/Exceptions and SoftPro Live) __________________________________________________________________________________________________ In Select, open the Requirement or Exception, highlight the text to hyperlink. Click the Add a Hyperlink icon: __________________________________________________________________________________________________ Page 2 of 8 Creating Hyperlinks (Requirements/Exceptions and SoftPro Live) __________________________________________________________________________________________________ The Add Hyperlink dialog box will open. Paste the link into the Address field (right click/paste or Control V) NOTE: The Text to display (name) field will autopopulate with the text that was highlighted. Click OK. The text will now be underlined indicating a hyperlink. __________________________________________________________________________________________________
    [Show full text]
  • Chapter 2 3D User Interfaces: History and Roadmap
    30706 02 pp011-026 r1jm.ps 5/6/04 3:49 PM Page 11 CHAPTER 2 3D3D UserUser Interfaces:Interfaces: HistoryHistory andand RoadmapRoadmap Three-dimensional UI design is not a traditional field of research with well-defined boundaries. Like human–computer interaction (HCI), it draws from many disciplines and has links to a wide variety of topics. In this chapter, we briefly describe the history of 3D UIs to set the stage for the rest of the book. We also present a 3D UI “roadmap” that posi- tions the topics covered in this book relative to associated areas. After reading this chapter, you should have an understanding of the origins of 3D UIs and its relation to other fields, and you should know what types of information to expect from the remainder of this book. 2.1. History of 3D UIs The graphical user interfaces (GUIs) used in today’s personal computers have an interesting history. Prior to 1980, almost all interaction with com- puters was based on typing complicated commands using a keyboard. The display was used almost exclusively for text, and when graphics were used, they were typically noninteractive. But around 1980, several technologies, such as the mouse, inexpensive raster graphics displays, and reasonably priced personal computer parts, were all mature enough to enable the first GUIs (such as the Xerox Star). With the advent of GUIs, UI design and HCI in general became a much more important research area, since the research affected everyone using computers. HCI is an 11 30706 02 pp011-026 r1jm.ps 5/6/04 3:49 PM Page 12 12 Chapter 2 3D User Interfaces: History and Roadmap 1 interdisciplinary field that draws from existing knowledge in perception, 2 cognition, linguistics, human factors, ethnography, graphic design, and 3 other areas.
    [Show full text]
  • VERSION 2.0 Referene MANUAL
    VERSION 2.0 REFERENe MANUAL BORlAnD INTERNATIONAL Borland International 4113 Scotts Valley Drive Scotts Valley, California 95066 Copyright Notice© This software package and manual are copyrighted 1983, 1984 by BORLAND INTERNATIONAL Inc. All rights reserved worldwide. No part of this publication may be reproduced, transmitted, transcribed, stored in any retrieval system, or translated into any language by any means without the express written per­ mission of BORLAND INTERNATIONAL Inc., 4113 Scotts Valley Drive, Scotts Valley, CA 95066, USA. Single CPU License The price paid for one copy of TURBO Pascal licenses you to use the product on one CPU when and only when you have signed and returned the License Agreement printed in this book. Disclaimer Borland International makes no warranties as to the contents of this manual and specifically disclaims any implied warranties of merchantability or fitness for any particular purpose. Borland International further reserves the right to make changes to the specifications of the program and contents of the manual without obligation to notify any person or organization of such changes. Fifth edition, October 1984 Printed in the United States of America 98765 TABLE OF CONTENTS INTRODUCTION ............................................. 1 The Pascal Language .........................................1 TURBO Pascal ..............................................1 Structure of This Manual ..................................... 2 Typography ............................................... 3 Syntax Descriptions
    [Show full text]
  • TURBO Pascal Tutor·
    The TURBO Pascal Tutor· A Self-Study Guide to TURBO Pascal Copyright @1984 Copyright @1985 BORLAND INTERNATIONAL, INC. 4585 Scotts Valley Drive Scotts Valley, CA 95066 U.S.A. Borland's No-Nonsense License Statement! This software is protected by both United States Copyright Law and International Treaty provisions. Therefore you must treat this software just like a book with the following single exception. Borland International authorizes you to make archival copies of the software for the sole purpose of backing-up your software and protecting your investment from loss. By saying, "just like a book", Borland means for example that this software may be used by any number of people and may be freely moved from one computer location to another so long as there is No Possibility of it being used at one location while it's being used at another. Just like a book that can't be read by two different people in two different places at the same time, neither can the software be used by two different people in two different places at the same time. (Unless, of course, Borland's Copyright has been violated.) WARRANTY With respect to the physical diskette and physical documentation enclosed herein, BORLAND INTERNATIONAL, INC., ("BORLAND") warrants the same to be free of defects in materials and workmanship for a period of 30 days from the date of purchase. In the event of notification within the warranty period of defects in material or workmanship, BORLAND will replace the defective diskette or documentation. The remedy for breach of this warranty shall be limited to replacement and· shall not encompass any other damages, including but not limited to loss of profit, special, incidental, consequential, or other similar claims.
    [Show full text]
  • Welcome to Computer Basics
    Computer Basics Instructor's Guide 1 COMPUTER BASICS To the Instructor Because of time constraints and an understanding that the trainees will probably come to the course with widely varying skills levels, the focus of this component is only on the basics. Hence, the course begins with instruction on computer components and peripheral devices, and restricts further instruction to the three most widely used software areas: the windows operating system, word processing and using the Internet. The course uses lectures, interactive activities, and exercises at the computer to assure accomplishment of stated goals and objectives. Because of the complexity of the computer and the initial fear experienced by so many, instructor dedication and patience are vital to the success of the trainee in this course. It is expected that many of the trainees will begin at “ground zero,” but all should have developed a certain level of proficiency in using the computer, by the end of the course. 2 COMPUTER BASICS Overview Computers have become an essential part of today's workplace. Employees must know computer basics to accomplish their daily tasks. This mini course was developed with the beginner in mind and is designed to provide WTP trainees with basic knowledge of computer hardware, some software applications, basic knowledge of how a computer works, and to give them hands-on experience in its use. The course is designed to “answer such basic questions as what personal computers are and what they can do,” and to assist WTP trainees in mastering the basics. The PC Novice dictionary defines a computer as a machine that accepts input, processes it according to specified rules, and produces output.
    [Show full text]
  • How to Use the Graphical User Interface TCS Technical Bulletin
    How to Use the Graphical User Interface TCS Technical Bulletin A. Create/Edit the Graphical Interface (Build Mode) Accessing the site using the Graphical Interface requires that you first build a layout (one or more layers/tabs depending on your site). This is done using the setup wizard to upload images/backgrounds and place controllers in appropriate locations on those images/backgrounds. When finished and saved, the User accesses the site using the Graphical Interface. 1. Click the “+” button to add a layer/tab for the site. (Skip to step 7 to edit an existing layer.) 2. Name the layer/tab by clicking in the field and entering the desired name. 3. Click the Choose File button to select the desired background image from your computer’s drive and click the Save button. 4. The Place View will open showing you the layer/tab title, a Save Positions button, the background image, and a bin of available controllers along the right-hand edge of the Graphical Interface which can be placed onto the layer/ tab. 5. Drag/drop controller icons from the icon bin to the desired location on the background image. Moving your mouse over each icon will show that controller’s name. The arrows at the top and bottom of scroll bar or the scroll bar itself allow you to scroll through the available controllers. NOTE: If you have placed controller icons too close to the icon bin and you would like to move them, you may need to scroll the available controllers up or down to clear the area around an icon to allow it to be dragged/dropped again.
    [Show full text]
  • Features of Nctracks Portal Help System (PDF, 146
    Features of NCTracks Portal Help System The major forms of help on the NCTracks web portal are as follows: Navigational breadcrumbs System-Level Help: Indicated by the "NCTracks Help" link on each page Page-Level Help: Indicated by the " Help" link above the Legend Legend Data/Section Group Help: Indicated by a question mark (?) Hover over or Tooltip Help on form elements Navigational Breadcrumb A breadcrumb trail is a navigational tool that shows the user the path of screens they have visited from the homepage. This breadcrumb consists of links so the user can return to specific screens on this path. System Level Help The System Help link opens a new window with the complete table of contents for a given user's account privileges. The System Level Help link, "NCTracks Help," will show up at the top right of any secure portal page or web application form page that contains Page Level and/or Data/Form Group Help. Page Level Help Page Level Help opens a modal window with all of the Data/Form Group help topics for the current page. The Page Level Help link shows across from the page title of any web application form page. Features of NCTracks Portal Help System Page 1 of 2 Features of NCTracks Portal Help System Form Legend A legend of all helpful icons is presented on pages as needed to explain the relevant meanings. This helps the user become familiar with any new icon representations in context with the form or page as it is used. Move your mouse over the Legend icon to open list.
    [Show full text]
  • UI Manager Properties
    APPENDIX A UI Manager Properties THROUGHOUT THIS BOOK YOU'LL FIND TABLES that list the property names and data types for all the UIResource elements of specific Swing components. Although these tables serve to list all the information about a specific component, I fig­ ured it would be handy to also group all the information about property names in one place. With that in mind, Table A-1 provides a complete list of properties used by the predefined look and feel classes-Motif, Macintosh, Metal, and Windows­ provided with the Swing 1.1.1 release. The table indicates with an "X" which of the four look and feel classes uses a particular property. To change the default setting for any one of these properties, you need to notify the UIManager by storing a new setting in the lookup table of the UIManager. For instance, to change the default text for the "Yes" button on a JOptionPane, 11 you'd replace the 0ptionPane. yesButtonText II property with the new setting 11 11 UIManager. put ( 0ptionPane. yesButtonTextll, Si II);. Then, any component cre­ ated after the setting change will get the new value: 11 5i 11 .1fyou want a displayed component to get the new setting, you must call its updateUI () method. When you change the current look and feel, any custom settings you install may be lost. If the class of the property value setting implements the UIResource interface (an empty marker interface such as Serializable), then the setting will be replaced by the default setting of the look and feel.
    [Show full text]
  • Translate's Localization Guide
    Translate’s Localization Guide Release 0.9.0 Translate Jun 26, 2020 Contents 1 Localisation Guide 1 2 Glossary 191 3 Language Information 195 i ii CHAPTER 1 Localisation Guide The general aim of this document is not to replace other well written works but to draw them together. So for instance the section on projects contains information that should help you get started and point you to the documents that are often hard to find. The section of translation should provide a general enough overview of common mistakes and pitfalls. We have found the localisation community very fragmented and hope that through this document we can bring people together and unify information that is out there but in many many different places. The one section that we feel is unique is the guide to developers – they make assumptions about localisation without fully understanding the implications, we complain but honestly there is not one place that can help give a developer and overview of what is needed from them, we hope that the developer section goes a long way to solving that issue. 1.1 Purpose The purpose of this document is to provide one reference for localisers. You will find lots of information on localising and packaging on the web but not a single resource that can guide you. Most of the information is also domain specific ie it addresses KDE, Mozilla, etc. We hope that this is more general. This document also goes beyond the technical aspects of localisation which seems to be the domain of other lo- calisation documents.
    [Show full text]