The PowerPlant Book
Foreword
Foreword to the First Edition

Acknowledgments

Acknowledgments for the First Edition

1 Introduction

What's New in This Release
What You Should Know
The Master Plan
Background
Basic Building Blocks
Writing PowerPlant Code
Starting Points
Strategies For Learning
Other Resources
PowerPlant Information
Object-Oriented Programming Information
Third Party Books on PowerPlant
Online Resources
Conventions Used in This Book
Your First PowerPlant Application
Building the Interface
Writing PPEdit
What Next?
Starting Your Own PowerPlant Projects

2 Installing PowerPlant

PowerPlant Requirements
Development Requirements
Runtime Requirements
Installing PowerPlant
PowerPlant Source Code
PowerPlant Documentation
PowerPlant Example Code
Installing Resource Templates
Resorcerer
ResEdit
Rez
Summary

3 PowerPlant Conventions

Class and File Names
Variable and Parameter Names
Data Types
Other Names
Calling Macintosh Toolbox Routines
Summary

4 Application Frameworks

Reusable Code
Procedural Code Libraries
Class Libraries
Frameworks
Application Frameworks
Framework Design Patterns
Applications
Event Handling
Command Hierarchy
Visual Hierarchy
Messaging Systems
Persistence
Utilities
Summary

5 PowerPlant Architecture

Design Principles
Multiple Inheritance
Factored Design
Factored Classes
Factored Behavior
Framework Implementation
Application Classes
Event Classes
Commander Classes
Visual Classes
Messaging Classes
Persistence Classes
Utility Classes
Basic PowerPlant Resources
PPob Resource
Mcmd Resource
RidL Resource
Txtr Resource
PowerPlant Development
Layout
Coding
Testing
Summary

6 Panes

What Is a Pane
Pane Characteristics
Characteristics of Simple Panes
Characteristics of All Panes
Working With Panes
Creating a Pane
Drawing a Pane
Managing Pane Characteristics
Some Specific Panes
Summary
Code Exercise
Learning Paths
Basic Assumptions
The Interface
Implementing a Custom Pane

7 Views

What Is a View
View Characteristics
Subpanes
Image
Scrolling
Coordinate Systems
Working With Views
Creating a View
Drawing a View
Managing Subpanes and the Visual Hierarchy
Managing the View Image
Managing Scrolling
Managing Coordinate Transformations
Some Specific Views
Summary
Code Exercise
The Interface
Implementing a Custom View

8 Controls and Messaging

What Is a Control
Control Characteristics
Control Values
Control Descriptor
The Hot Spot
Broadcasting and Listening
Working With Controls
Creating a Control
Drawing a Control
Managing Control Characteristics
Broadcasting
Being a Good Listener
Specific Control Classes
Summary
Code Exercise
The Interface
CColorControl
The Controls Application
Intermission

9 Applications and Events

The Application Object
Application Class Hierarchy
Application State
Deriving an Application
Initializing an Application
Set Debugging Options
Initialize the Heap
Initialize the Toolbox
Setup Memory Management
Check the Environment
Register PowerPlant Classes
Run the Application
Event Handling and Dispatch
PowerPlant and Apple Events
Summary
Code Exercise
The Interface
Setting Up an Application

10 Commanders and Menus

Introduction to Commands
Command Chain
Target Handling
Duty Handling
Command and Keystroke Handling
Making and Managing Menus
Menu Strategy
Menu-Related Resources
Command Numbers
Adding Menus
Responding to Menu Commands
When To Update Menus
Updating Menu Items
Working With LMenuBar and LMenu
Summary
Code Exercise
The Menu Resources
Implementing Menus

11 Windows

What is a Window
Window Characteristics
Window Attributes
Window Size and Zooming
Window Descriptor
Window Kind
Working With Windows
Creating a Window
Drawing a Window and Its Contents
Managing Window Behavior
Window Utilities in PowerPlant
Dealing with the Window Manager
Summary
Code Exercise
The Interface
The Windows Application

12 Dialogs

What Is a Dialog
Traditional Dialogs
PowerPlant Dialogs
LDialogBox Hierarchy
Dialog Characteristics
Working With Dialogs
Creating a Dialog
Messages in Dialogs
StDialogHandler
Simple Movable Modal Dialogs
Traditional Dialogs
Summary
Code Exercise
The Simple Dialog Interfaces
Implementing Simple Dialogs
The Complex Dialog Interface
Implementing a Complex Dialog

13 File I/O

The Document Strategy
LDocApplication
What Is a Document
LDocument
LSingleDoc
What Is a File
What Is a Stream
LStream
LFileStream
Saving and Opening Files
Implement an Application
Implement a Document
Implement a Preferences File
Summary
Code Exercise
The Interface
Implementing Documents

14 Printing

Printing Strategy
LPrintout
LPrintout Characteristics
LPrintout Behaviors
LPlaceHolder
LPlaceHolder Features
LPlaceHolder Behaviors
UPrinting
Printing in Views and Panes
The Mac OS, LPrintout, and LPlaceHolder
Printing in PowerPlant
Building a Printing Hierarchy
Printing a Document
The Print Record
Printing Utilities
Summary
Code Exercise
The Interface
Implementing Printing

15 Periodicals and Attachments

Periodicals
What Is a Periodical
Periodical Characteristics
Working With Periodicals
Attachments
What Is an Attachment
Attachment Strategy
Attachment Characteristics
Working With Attachments
Specific PowerPlant Attachments
Summary
Code Exercise
The Interface
Implementing Goodies
Looking Backward, Looking Forward

A PowerPlant Utilities

PowerPlant Utilities Overview
Classes Discussed Elsewhere
More Utility Classes
LClipboard
Arrays
LString
LSharable
UScreenPort
UDrawingState
UDrawingUtils
UKeyFilters
UProfiler
UReanimator
UResourceManager
UTextTraits

B Resource Notes

PowerPlant-Specific Resources
Standard Resources
PP Copy & Customize.ppob
PP Copy & Customize.rsrc
PP Action Strings.rsrc
PP DebugAlerts.rsrc
PP Document Alerts.rsrc
PP AppleEvents.rsrc
ColorAlertIcons.rsrc
ToolServer and Rez
Using ToolServer
Rez
DeRez

Index



Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: July 21, 2000