Extending the Macintosh Toolbox 1991
From the originals
13 scansMachine-transcribed text and image descriptions. Check the linked original for uncertain words or fine print.
These are transcribed pages from the documents, not the full publications. Open the original for the remaining pages.
Image 1
Extending the Macintosh Toolbox
SERIES EDITOR SCOTT KNASTER Macintosh Inside Out Extending the Macintosh® Toolbox Programming Menus, Windows, Dialogs, and More JOHN C. MAY JUDY B. WHITTLE
Book cover with a yellow background, a red and blue top band, an orange downward-pointing triangle labeled Macintosh Inside Out, a large teal and black title over a tan panel with a yellow circle behind it, and author names in serif capitals at the bottom.
Reading notes: Series editor line and top band text are small and placed along the red band; reading order follows visual layout. Author names are set in widely spaced capitals; a small smudge overlaps the bottom of the cover near the second author's name but the text is legible.
- Languages
- English
PDF page 1
S G 0 TT KNA S T ER Extending~~_____, he Programming Menus, VVlndows, Dialogs, and More JOHN _C.MAY .•· J U DY / B . W H I T T L E
Reading notes: No image was provided; the copy comes only from the supplied extracted text, so layout and reading order are inferred. The top line 'S G 0 TT KNA S T ER' is fragmented and may be a title or series name, so it was not treated as a headline. 'Extending~~_____,' is partly obscured and its wording is uncertain. The line 'he' is an isolated fragment of unclear origin. 'VVlndows' appears to be an OCR rendering of 'Windows'. 'J U DY / B . W H I T T L E' is letter-spaced; the name is read as 'JUDY B. WHITTLE'. Transcript was intentionally left empty per the instruction that exact extracted text is preserved separately.
- Languages
- English
PDF page 2
A plain, entirely blank white page with no artwork, layout elements, or visible marks.
Reading notes: The image appears to be entirely blank with no visible text, so all printed fields are empty.
PDF page 3
Extending the Macintosh® Toolbox
Extending the Macintosh® Toolbox Programming Menus, Windows, Dialogs, and More John C. May Judy B. Whittle Addison-Wesley Publishing Company, Inc. Reading, Massachusetts • Menlo Park, California • New York Don Mills, Ontario• Wokingha~, England• Amsterdam Bonn • Sydney • Singapore • Tokyo • Madrid • San Juan Paris• Seoul• Milan• Mexico City• Taipei
Reading notes: Source line 'Wokingha~' appears to be a damaged or OCR-garbled character sequence, likely 'Wokingham'
- Printed product names
- Macintosh® Toolbox
- Languages
- English
PDF page 4
Many of the designations used by manufacturers and sellers to distin- guish their products are claimed as trademarks. Where those designa- tions appear in this book and Addison-Wesley was aware of a trademark claim, the designations have been printed in initial capital letters. Library of Congress Cataloging-in-Publication Data May, John c. Extending the Macintosh toolbox : programming menus, windows, dialogs and more I John C. May, Judy B. Whittle. p. cm. -- (Macintosh inside out) Includes bibliographical references and index. ISBN 0-201-57722-4 1. Macintosh (Computer)--Programming. 2. Macintosh Toolbox (Computer programs) I. Whittle, Judy B. II. Title. III. Series. QA76.8.M3M3765 1991 91-14461 005.265--dc20 CIP Copyright© 1991 by John C. May and Judy B. Whittle All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America. Published simultaneously in Canada. The authors and publishers have taken care in preparation of this book, but make no express or implied warranty of any kind and assume no responsibility for errors or omissions.No liability is assumed for inciden- tal or consequential damages in connection with or arising out of the use of the information or programs contained herein. Sponsoring Editor: Carole McClendon Project Editor: Elizabeth Rogalin Cover design: Ronn Campisi Set in 10.5-point Palatino by Don Huntington 12 3 4 5 6 7 8 9 -MW- 9594939291 First printing, August 1991
Reading notes: Headline not clearly identifiable as a primary printed heading in the supplied text Spacing irregularities in the cataloging data may reflect OCR artifacts
- Printed product names
- Macintosh
- Printed dates
- 1991 · August 1991
- Languages
- English
PDF page 5
A plain, entirely blank white page with no artwork, layout elements, or printed content visible.
Reading notes: The image appears to be fully blank with no visible text, so the transcript and all printed fields are empty.
PDF page 6
1. Contents Foreword by Scott Knaster Preface xix Acknowledgments xxi Introduction 1 Is This Book for You? 1 How the Book Is Organized 1 Conventions Used 2 xvii Data Are or Data Is? 2 Punctuation with Code 2 Capital Letters in Source Code 2 Monospace Font for Code 3 Using the Routines in This Book 3 2. Programming Language 5 Programming Language Used in This Book 5 C Program.ming Standards 5 Case (Switch) Statements 5 Brace Rule 1 (separate lines) 6 Brace Rule 2 (if and else) 7 Parentheses Rule 1 (statements) 8 Parentheses Rule 2 <Junctions) 8 vii
Reading notes: Source is a table of contents with OCR-like spacing artifacts, e.g. 'C Program.ming' and 'Parentheses Rule 2 <Junctions)'. Uncertain reading of 'Program.ming' and '<Junctions)' in the supplied text.
- Languages
- English
PDF page 7
viii ..,.. Contents Arithmetic Operators Rule 9 Commas Rule 9 Semicolon Rule 10 Capitalization Rule 1 (junctions) 10 Capitalization Rule 2 (variables) 10 Useful Macros 11 Handling Errors 12 The Way Apple Prefers You to Program 12 3. Initializing the Toolbox 15 Setting Up Your Program with lnit ToolBox.c 15 Summary 19 4. Menus 21 Overview of Menus 21 Building Menus 21 InitMenu.c 22 The Apple Menu 23 DoAppleMenu.c 23 Routines Involving Menu Items 24 DablMenultem.c 24 EablMenultem.c 25 DAllMenultems.c 25 EAllMenultems.c 26 MarkMenultem.c 27 Testing the Keyboard 28 CommandlsDown.c 29 CapsLocklsDown.c 30 ControllsDown.c 31 OptionlsDown.c 31 ShiftlsDown.c 32 Using an 'MBAR' Resource 32 DrawMBar.c 33 A Simple Menu Example 34 MenuExample.c 34 MenuExample.R 35 Summary 36 Recommended Reading 36
- Languages
- English
PDF page 8
5. Cursors 37 Overview of Cursors 37 Using Black-and-White and Color Cursors 37 FetchCursor.c 38 A Simple Cursor Example 41 CursorExample.c 41 CursorExample.R 43 Summary 48 Recommended Reading 48 6. Windows and Dialogs 49 Overview of Windows and Dialogs 49 Dialog Records 50 Creating Dialogs 51 OpenDialog.c 51 Dialog Positioning 52 CenterDialog.c 52 Window Positioning 54 CenterWindow.c 54 Window Stacking 56 StackWindow.c 56 Writing Your Own Modal Dialog Routine 58 MyModalDialog.c 59 Changing the Default Dialog Font 66 SetDFont.c 66 ..,.. Contents ix Creating a General-Purpose About Dialog Routine 67 AboutDialog.c 68 The About Example 70 AboutExample.c 70 AboutExample.R 72 Creating a General-Purpose Copyright Routine 73 CopyrightDialog.c 73 Summary 76 Recommended Reading 76
- Languages
- English
PDF page 9
x ~ Contents 7. Alerts 77 Overview of Alerts 77 A General-Purpose Alert Routine 78 NoteAlert.c 78 CautionAlert.c 79 StopAlert.c 80 A Standard Confirmation Alert Routine 81 Confirmation.c 81 The Alert Example 83 AlertExample.c 83 AlertExample.R 85 Summary 86 Recommended Reading 86 8. Resources 87 Overview of Resources 87 Resource Compilers 92 Resource Editors 92 Special-Purpose Editors and Builders 93 Resource Decompiler 93 RMaker Program Syntax 93 RadioButton.R 95 Resource File Merging and Overwriting 98 Summary 99 Recommended Reading 99 9. Buttons 101 Overview of Buttons 101 Routine to Draw the Outline of a Default Button 101 FrmDefltem.c 102 A Simple Button Example 105 ButtonExample.c 106 ButtonExample.R 107 Summary 108 Recommended Reading 108
Reading notes: Source text is a table of contents for a programming book, with page numbers and chapter titles; no advertised products or prices are present. Hyphenation or line-break spacing in some entries (e.g., 'Recommended Reading') may not reflect exact printed layout.
- Languages
- English
PDF page 10
10. Check Boxes 109 Overview of Check Boxes 109 Getting and Setting the Check Box State 109 PutCheckBox.c 110 GetCheckBox.c 111 Toggling the Check Box State 112 ToggleCheckBox.c 112 A Simple Check Box Example 113 CheckBoxExample.c 113 CheckBoxExample.R 115 Summary 117 11. Radio Buttons 119 Overview of Radio Buttons 119 Setting the Radio Button State 119 GetRadioButton.c 120 PutRadioButton.c 121 Grouping Radio Buttons 123 PushRadioButton.c 123 A Simple Radio Button Example 125 RadioButtonExample.c 125 RadioButtonExample.R 126 Summary 128 12. Icons 129 Overview of Icons 129 Using Icons as Control Buttons 130 GetButton!con.c 130 DoButton!con.c 133 DispButton!con.c 136 Using Icons as Toggle Switches 136 GetTogglelcon.c 137 DoTogglelcon.c 138 DispTogglelcon.c 140 IconO.ff.c 141 IconOn.c 142 A Simple Icon Example 143 IconExample.c 143 IconExample.R 145 Summary 147 ...,. Contents xi
Reading notes: Source is a table of contents with page numbers; no advertised products, prices, or dates present. Some entries contain possible OCR spacing artifacts such as 'Overview of Icons' and 'DoButton!con.c'.
- Languages
- English
PDF page 11
xii ~ Contents 13. Pictures 149 Overview of Pictures 149 Drawing a Picture 149 DrawPict.c 150 A Simple Picture Example 151 PictExample.c 151 PictExample.R 154 Summary 161 Recommended Reading 161 14. Static Text 163 Overview of Static Text 163 Active and Inactive Static Text 163 ActiveStatic.c 163 InactiveStatic.c 164 A Simple Static Text Example 165 StaticTextExample.c 166 StaticTextExample.R 167 Summary 168 Recommended Reading 168 15. Edit Text 169 Overview of Edit Text 169 Active Edit Text Fields 170 GetActiveEditText.c 170 SetActiveEditText.c 171 Input and Output Routines for Integers 173 InputShort.c 174 InputLong.c 178 InputHexShort.c 179 InputHexLong.c 181 OutputShort.c 183 OutputLong.c 186 OutputHexShort.c 187 OutputHexLong.c 188 Input and Output Routines for Floating-Point Numbers 190
Reading notes: Source text is a table of contents fragment with page numbers rather than advertising copy; no headline or advertised products identified. Heading line 'Overview of Pictures' and similar entries contain no explicit product names or prices.
- Languages
- English