PowerPlant Advanced Topics

1 Introduction

What's in PowerPlant Advanced Topics
What's New in PowerPlant Advanced Topics
What You Should Know
Chapter Organization
Starting Points

2 Debugging in PowerPlant

Introduction to Debugging in PowerPlant
Debugging Strategy
Debugging Classes
LDebugMenuAttachment
LDebugStream
LCommanderTree
LPaneTree
LHeapAction
UHeapUtils
UMemoryEater
UDebugUtils
UDebugNew
UProcess
UVolume
UValidPPob
Debugging Macros
Debugging PowerPlant Projects
Configuring Your Project
Adding the Classes
Installing the Menu
Customizing the Debugging Classes
Summary of Debugging in PowerPlant
Debugging Code Exercise
Where To Go From Here

3 Threads in PowerPlant

Introduction to Threads in PowerPlant
The Thread Strategy
Thread States
Semaphores
Inter-Thread Communication
Thread Classes
LThread
LSimpleThread
UMainThread
LYieldAttachment
LSemaphore
LEventSemaphore
LMutexSemaphore
StMutex
StCritical
LLink
LQueue
LSharedQueue
Implementing Threads in PowerPlant
Initializing Threads
Creating Threads
Running a Thread
Modifying Thread State
Deleting Threads
Data Coherency
Criticality
Context Switching
Using Semaphores
Inter-Thread Communication
Asynchronous Operations
Summary of Threads in PowerPlant
Code Exercise for Threads

4 Networking in PowerPlant

Introduction to Networking in PowerPlant
Where to Learn More About Networking
Software Requirements
Networking Strategy
Generic Network Interface
Other Classes
Strategic Summary
Networking Classes
UNetworkFactory
LInternetAddress
LTCPEndpoint
LUDPEndpoint
Implementing a Network-Savvy Application
Creating a Client
Obtaining an Address
Creating a Client Endpoint
Binding to a Local Port
Connecting to a Server
Sending Data
Receiving Data
Disconnecting from a Server
Handling a Disconnect Request
Creating a Server
Listening for Incoming Connections
Responding to Incoming Connections
Implementing Threads
Connectionless Datagram Communications
Summary of Networking in PowerPlant
Code Exercise for Networking
SimpleClient
SimpleServer

5 Internet Programming in PowerPlant

Introduction to Internet Programming in PowerPlant
Where to Learn More About Internet Protocols
Software Requirements
Internet Programming Strategy
Generic Internet Protocol Interface
Specific Internet Protocol Interfaces
Internet Messages
General Utilities
Strategic Summary
Internet Classes
LInternetProtocol
LInternetResponse
LInternetMessage
Internet Class Utilities
Implementing an Internet Enabled Application
Choosing a Protocol
Creating a Protocol Client
Preparing Content
Addressing the Remote Computer
Creating the Protocol Thread
Creating a Connection
Sending Content to a Server
Receiving Responses From a Server
Listening For Progress Messages
Closing Down a Connection
Handling Abnormal Conditions
Summary of Internet Protocol Usage in PowerPlant
Code Exercise

6 Tables in PowerPlant

Introduction to Tables in PowerPlant
Table Strategy
Table Architecture
General Table Implementation
Table Classes
STableCell
LTableView
LColumnView
LTextColumn
LSmallIconTable
LHierarchyTable
LTextHierTable
LTableGeometry
LTableMonoGeometry
LTableMultiGeometry
LTableSelector
LTableSingleSelector
LTableMultiSelector
LTableStorage
LTableArrayStorage
LCollapsableTree
LNodeArrayTree
LDropFlag
Implementing Tables in PowerPlant
Creating a Table
Managing Rows and Columns
Setting Cell Data
Getting Cell Data
Handling Clicks in a Cell
Responding to Selections
Drawing a Cell
Finding Cells
Finding Data in a Table
Scrolling a Table
Summary of Tables in PowerPlant
Code Exercise for Tables

7 Apple Events in PowerPlant

Introduction to Apple Events in PowerPlant
Where to Learn More About Apple Events
Apple Event Strategy
Apple Event Classes
LModelObject
LModelDirector
LModelProperty
UExtractFromAEDesc
StAEDescriptor
UAEDesc
UAppleEventsMgr
Apple Event Resources
The `aete' Resource
The `aedt' Resource
Editing Apple Event Resources
Implementing Apple Events in PowerPlant
Adding Classes
Adding Properties
Adding Custom Apple Events
Beyond the Basics
Code Exercise for Apple Events
Edit Apple Event Resources
Create a Model Object in the Application
Add Model Properties to the Class
Add a Custom Event to the Application
Improve HandleCreateElementEvent()

8 Actions in PowerPlant

Introduction to Actions in PowerPlant
The Undo Strategy
Action Classes
LCommander
LAction
LUndoer
LTETextAction
Implementing Undo in PowerPlant
Create Action Classes
Attach an Undoer
Post an Action
Implement Multilevel Undo
Summary of Undo in PowerPlant
Code Exercise for Actions

9 Drag and Drop in PowerPlant

Introduction to Drag and Drop in PowerPlant
Drag and Drop Strategy
Drag and Drop Classes
LDragTask
LDropArea
LDragAndDrop
Implementing Drag and Drop in PowerPlant
Looking for the Drag Manager
Handling Clicks
Identifying a Drag
Creating a Drag Task
Tracking a Drag
Receiving a Drop
Providing Custom Drag Behavior
Summary of Drag and Drop in PowerPlant
Code Exercise for Drag and Drop

10 Offscreen Drawing in PowerPlant

Introduction to Offscreen Drawing in PowerPlant
Offscreen Drawing Strategy
Offscreen Drawing Classes
LGWorld
StOffscreenGWorld
LOffscreenView
Implementing Offscreen Drawing in PowerPlant
Using LOffscreenView
Using StOffscreenGWorld Directly
Using LGWorld
Code Exercise for Offscreen Drawing

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