| |
| |
Preface | |
| |
| |
| |
Cocoa Overview | |
| |
| |
| |
Understanding the Aqua Interface | |
| |
| |
What Makes Mac OS X So Special? | |
| |
| |
A Quick Look at the Mac OS X User Interface | |
| |
| |
Basic Principles of the Aqua Interface | |
| |
| |
The Mouse and Cursor | |
| |
| |
Window Types and Behavior | |
| |
| |
Menus and the Menu Bar | |
| |
| |
The Dock | |
| |
| |
Controls | |
| |
| |
The Finder | |
| |
| |
Configuring Your Desktop, Step by Step | |
| |
| |
Menu Guidelines and Keyboard Equivalents | |
| |
| |
Working with the Filesystem, Step by Step | |
| |
| |
Summary | |
| |
| |
Exercises | |
| |
| |
References | |
| |
| |
| |
Tools for Developing Cocoa Applications | |
| |
| |
Developer Tools | |
| |
| |
Utilities | |
| |
| |
Working with the Terminal | |
| |
| |
Debugging Programs with gdb | |
| |
| |
User Interface Design | |
| |
| |
Summary | |
| |
| |
Exercises | |
| |
| |
| |
Creating a Simple Application with Interface Builder | |
| |
| |
Getting Started with Interface Builder | |
| |
| |
Adding Objects to Your Application | |
| |
| |
Objects, Messages, and Targets | |
| |
| |
Summary | |
| |
| |
Exercise | |
| |
| |
| |
An Objective-C Application Without Interface Builder | |
| |
| |
The Tiny.m Program | |
| |
| |
An Introduction to Objective-C | |
| |
| |
Tiny.m Revisited | |
| |
| |
Summary | |
| |
| |
Exercises | |
| |
| |
References | |
| |
| |
| |
Calculator: Building a Simple Application | |
| |
| |
| |
Building a Project: A Four-Function Calculator | |
| |
| |
Getting Started: Building the Calculator Project | |
| |
| |
Building the Calculator's User Interface | |
| |
| |
Building the Calculator's Controller Class | |
| |
| |
Customizing Buttons and Making Connections | |
| |
| |
Compiling and Running a Program | |
| |
| |
Compiler Error Messages | |
| |
| |
The enterDigit: Action Method | |
| |
| |
Adding the Four Calculator Functions | |
| |
| |
Adding the Unary Minus Function to the Controller Class | |
| |
| |
The Files in a Project | |
| |
| |
Summary | |
| |
| |
Exercises | |
| |
| |
| |
Nibs and Icons | |
| |
| |
Customizing MainMenu.nib | |
| |
| |
Managing Multiple Nibs | |
| |
| |
Adding Icons to Applications | |
| |
| |
Changing Calculator's Application Icon | |
| |
| |
Cocoa's NSImage Class | |
| |
| |
Summary | |
| |
| |
Exercises | |
| |
| |
References | |
| |
| |
| |
Delegation and Resizing | |
| |
| |
Handling Different Bases | |
| |
| |
Delegation | |
| |
| |
Disabling Buttons for BetterMultiradix Input | |
| |
| |
Resizing Windows Programmatically | |
| |
| |
Two Very Imporant Classes: NSWindow and NSView | |
| |
| |
Summary | |
| |
| |
Exercises | |
| |
| |
| |
Events and Responders | |
| |
| |
Events and the NSResponder Chain | |
| |
| |
Events and the NSApplication Object | |
| |
| |
The Event Loop | |
| |
| |
Catching Keyboard Events for Our Calculator | |
| |
| |
Summary | |
| |
| |
Exercises | |
| |
| |
References | |
| |
| |
| |
Darwin and the Window Server | |
| |
| |
Unix, Mach, and the Mac OS X Environment | |
| |
| |
The Window Server and Quartz | |
| |
| |
Seeing All the Processes | |
| |
| |
Summary | |
| |
| |
Exercises | |
| |
| |
References | |
| |
| |
| |
MathPaper: A Multiple-Document, Multiprocess Application | |
| |
| |
| |
MathPaper and Cocoa's Document-Based Architecture | |
| |
| |
The MathPaper Application | |
| |
| |
The Evaluator Back End | |
| |
| |
Cocoa's Document-Based Architecture | |
| |
| |
Building MathPaper's Front End | |
| |
| |
Summary | |
| |
| |
Exercises | |
| |
| |
References | |
| |
| |
| |
Tasks, Pipes, and NSTextView | |
| |
| |
Processes, Pipes, and Resources | |
| |
| |
Making Evaluator a MathPaper Auxiliary Executable | |
| |
| |
MathDocument Class Modifications | |
| |
| |
Creating PaperController, a Subclass of NSWindowController | |
| |
| |
The NSScrollView and NSTextView Classes | |
| |
| |
PaperController Class Modifications | |
| |
| |
Summary | |
| |
| |
Exercises | |
| |
| |
| |
Rich Text Format and NSText | |
| |
| |
Rich Text Format | |
| |
| |
Creating an RTF Class | |
| |
| |
Integrating Our RTF Class into MathPaper | |
| |
| |
Summary | |
| |
| |
Exercises | |
| |
| |
| |
Saving, Loading, and Printing | |
| |
| |
Data Management with NSDocument | |
| |
| |
Saving to a File | |
| |
| |
Loading from a File | |
| |
| |
Marking a Document Window as Edited | |
| |
| |
Adding Printing Capability | |
| |
| |
Summary | |
| |
| |
Exercises | |
| |
| |
| |
Drawing with Quartz | |
| |
| |
Animation in an About Panel | |
| |
| |
The Quartz Window Server | |
| |
| |
Implementing the About Panel in MathPaper | |
| |
| |
Quartz Graphics Data Types | |
| |
| |
Timers | |
| |
| |
Putting It All Together | |
| |
| |
Summary | |
| |
| |
Exercises | |
| |
| |
References | |
| |
| |
| |
Drawing in a Rectangle: More Fun with Cocoa Views | |
| |
| |
The Advantages of NSView's drawRect: Method | |
| |
| |
BlackView: An NSView That Paints Itself Black | |
| |
| |
A Closer Look at the NSView Class | |
| |
| |
BarView: An NSView with a Scaled Coordinate System | |
| |
| |
PolygonView: A Non-Opaque NSView | |
| |
| |
Responding to Events in an NSView | |
| |
| |
Autosizing Multiple Views in a Window | |
| |
| |
Summary | |
| |
| |
Exercises | |
| |
| |
| |
GraphPaper: A Multithreaded, Mouse-Tracking Application | |
| |
| |
| |
GraphPaper: A Multithreaded Application with a Display List | |
| |
| |
GraphPaper's Design | |
| |
| |
Working with Multiple Threads | |
| |
| |
Building the GraphPaper Application | |
| |
| |
Extending the Display List | |
| |
| |
Summary | |
| |
| |
Exercises | |
| |
| |
References | |
| |
| |
| |
Color | |
| |
| |
Colors and Color Objects | |
| |
| |
Adding Color to GraphPaper | |
| |
| |
Summary | |
| |
| |
Exercises | |
| |
| |
| |
Tracking the Mouse | |
| |
| |
Tracking the Mouse | |
| |
| |
Adding Mouse Tracking to GraphPaper | |
| |
| |
Summary | |
| |
| |
Exercises | |
| |
| |
References | |
| |
| |
| |
Zooming and Saving Graphics Files | |
| |
| |
Adding a Zoom Button to GraphPaper | |
| |
| |
Saving to PDF | |
| |
| |
Saving to TIFF | |
| |
| |
Creating an Accessory NSView | |
| |
| |
Summary | |
| |
| |
Exercises | |
| |
| |
| |
Pasteboards, Services, Modal Sessions, and Drag-and-Drop | |
| |
| |
Cut, Copy, and Paste with the Pasteboard | |
| |
| |
Using the Pasteboard in GraphPaper | |
| |
| |
Services | |
| |
| |
Creating Your Own Service | |
| |
| |
Drag-and-Drop | |
| |
| |
Summary | |
| |
| |
Exercises | |
| |
| |
| |
Preferences and Defaults | |
| |
| |
Preferences and the Defaults Database System | |
| |
| |
Adding Defaults to GraphPaper | |
| |
| |
Making the Preferences Panel Work with Defaults | |
| |
| |
Setting Up a Multi-View Panel | |
| |
| |
Summary | |
| |
| |
Exercises | |
| |
| |
| |
Cocoa Resources | |
| |
| |
Index | |