Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Programmer's Guide to MacApp /


Chapter 1 MacApp Overview 1

Figure 1-1 A MacApp application's objects in memory 7

Figure 1-2 Specifying menus in MacApp 10

Figure 1-3 A view hierarchy in MacApp 11

Figure 1-4 An application receiving events and dispatching them to objects 13

Figure 1-5 The objects in a typical target chain 14

Figure 1-6 MacApp responds to a user menu choice 18

Chapter 3 Core Technologies 43

Figure 3-1 Dependency relationship 47

Figure 3-2 A linked list of failure handlers, stored on the stack 55

Figure 3-3 The application heap, after initialization 66

Table 3-1 Notifier/dependent array 49

Table 3-2 Dependent/notifier array 49

Table 3-3 MacApp segment names and descriptions 78

Chapter 4 Launching and Terminating an Application 85

Figure 4-1 Initializing and running a MacApp application from the main routine 87

Figure 4-2 Initialization performed by the InitUMacApp macro 89

Chapter 5 Events and Commands 97

Figure 5-1 Event, command, and command-handling classes in MacApp 99

Figure 5-2 How MacApp handles mouse-down and key-down events 104

Figure 5-3 Behaviors on the target chain 108

Figure 5-4 Objects in the target chain responding to a menu command 110

Figure 5-5 Calling the DoMenuCommand method of a document object 111

Figure 5-6 MacApp target chain as affected by window activation 115

Figure 5-7 Initiating an undo operation 126

Figure 5-8 Handling an Undo command or Undo Apple event 127

Chapter 6 Scripting 139

Figure 6-1 Resolving an object specified by an Apple event 146

Chapter 7 Document Handling 163

Figure 7-1 MacApp's document classes 164

Figure 7-2 Creating a new document, file, and file handler 171

Figure 7-3 Opening an existing document 175

Figure 7-4 Saving a document 179

Figure 7-5 Document with expanded mailer 193

Figure 7-6 Document with contracted mailer 193

Figure 7-7 The Send dialog box from the DemoText sample application 198

Table 7-1 Constants passed as parameters to NewFile 173

Table 7-2 MacApp section events 190

Chapter 8 Displaying, Manipulating, and Printing Data 203

Figure 8-1 Local coordinate systems 205

Figure 8-2 A view hierarchy in MacApp 208

Figure 8-3 How a view is clipped to a window 209

Figure 8-4 How MacApp updates the views in a window 211

Figure 8-5 Creating a window from a resource template 219

Figure 8-6 Creating a drawing command 227

Figure 8-7 Drawing with the mouse in the IconEdit sample application 228

Figure 8-8 Page dimensions 236

Chapter 9 Drag and Drop 251

Figure 9-1 Communication during a drag session 253

Figure 9-2 Dragging and dropping text in the DemoDialogs application (steps 1-3) 258

Figure 9-3 Dragging and dropping text in the DemoDialogs application (steps 4-6) 259

Table 9-1 Components of MacApp's drag-and-drop support 254

Chapter 10 Working With Objects 273

Figure 10-1 Classes defined by most MacApp applications 275

Chapter 11 Working With Applications 287

Figure 11-1 Application classes, methods, and initialization routines 289

Chapter 12 Working With Menus 299

Figure 12-1 Enabling menu items 307

Figure 12-2 Simple pop-up menu 310

Figure 12-3 A pop-up menu in its closed and open states 310

Figure 12-4 A pop-up menu view 311

Figure 12-5 Classes, methods, and global routines for working with menus 313

Table 12-1 Menu ID constants 301

Table 12-2 Menu item constants 303

Chapter 14 Working With Scripting 347

Figure 14-1 Mixin and C++ utility classes for scripting support 348

Figure 14-2 Classes, methods, and fields used to support scripting 349

Table 14-1 Common object properties 356

Chapter 15 Working With the Mouse 373

Figure 15-1 Classes and methods used to track the mouse 375

Chapter 16 Working With Documents 399

Figure 16-1 Classes and methods used to work with file-based documents 401

Chapter 17 Working With Views 419

Figure 17-1 View-handling classes and methods 422

Figure 17-2 Ad Lib's Object Palette window 426

Chapter 19 Working With Dialog Boxes and Controls 457

Figure 19-1 Dialog-box classes and methods 459

Table 19-1 MacApp event and change notification constants 462

Chapter 20 Working With the Keyboard 473

Figure 20-1 Keystroke-handling classes and methods 475

Chapter 21 Working With the Cursor 483

Figure 21-1 Commonly used cursor images 484

Figure 21-2 Classes, methods, and fields for working with the cursor 485

Chapter 22 Working With the Clipboard 499

Figure 22-1 An application copying its private scrap to the Clipboard 503

Figure 22-2 Classes and methods used to provide Clipboard support 505

Chapter 23 Working With Printing 527

Figure 23-1 Printing classes and methods 529

Chapter 24 Working With Memory and Failure Handling 543

Figure 24-1 MacApp's global memory allocation routines 545

Figure 24-2 Failure-handling and error-message classes, methods, and routines 561

Chapter 25 Working With Lists and Iteration 571

Figure 25-1 List classes and methods 572

Figure 25-2 Iteration classes and methods 573

Chapter 26 Working With Dependencies 585

Figure 26-1 Dependency classes and methods 587

Chapter 28 Working With Drag and Drop 605

Figure 28-1 Drag-and-drop classes and methods 608

Chapter 29 Working With PowerTalk Mailers 621

Figure 29-1 PowerTalk mailer mixin classes 622

Figure 29-2 PowerTalk mailer classes and methods 623

Chapter 30 Working With Balloon Help 637

Figure 30-1 Balloon Help classes and methods 639

Chapter 31 Working With the Edition Manager 647

Figure 31-1 Edition Manager classes and methods 649

Appendix A Working With the MacApp Build System 663

Figure A-1 The MacApp build process 671

Table A-1 The five default filenames MABuild looks for 676

Table A-2 MABuild command-line pass-through options 682

Table A-3 Compiler option mnemonics 689

Table A-4 MABuild remapped names 691

Appendix B Organization of the MacApp Class Library 693

Figure B-1 Top-level classes 694

Figure B-2 Command classes 695

Figure B-3 Document classes 696

Figure B-4 View classes 697

Figure B-5 Control view classes 698

Figure B-6 Application classes 699

Figure B-7 Other classes 700

Figure B-8 C++ utility classes 701


Previous Book Contents Book Index Next

© Apple Computer, Inc.
25 JUL 1996