Chapter 22 -
This chapter describes MacApp's default Clipboard support and explains how your application can build on that support to handle its own private data types. It also includes recipes and sample code that demonstrate how to
Working With the Clipboard
For an introduction to MacApp's Clipboard support, see "Dependencies," beginning on page 44.
- interact with the Macintosh Clipboard (a general outline)
- create a Clipboard view to display your private data types
- implement Cut, Copy, and Clear commands for your data types
- implement a Paste command for your data types
Chapter Contents
- Overview
- Basic Clipboard Operations
- Using the Desk Scrap
- Using the Toolbox GetScrap Routine
- Using a Private Scrap
- MacApp's Clipboard Support
- More Sophisticated Clipboard Support
- The Clipboard Manager
- Clipboard Support in TCommand
- Recipes--The Clipboard
- Interacting With the Macintosh Clipboard--A General Outline
- Recipe--Creating a Clipboard View for Your Private Data Type
- Define a Scrap Type for Your Clipboard Data
- Override the MakeViewForAlienClipboard Method
- Include the Show Clipboard Command in Your Resource File
- Override the WriteToDeskScrap Method of Your View Class
- Override the ContainsClipType Method of Your View Class
- Override the GivePasteData Method of Your View Class
- Recipe--Supporting the Cut, Copy, and Clear Commands
- Override DoSetupMenus in Your View Class
- Override DoMenuCommand in Your View Class
- Define a Command Class to Handle Cut, Copy, and Clear
- Implement Constructor and Destructor Methods
- Implement an Initialization Method
- Implement a DoIt Method
- Implement UndoIt and RedoIt Methods
- Recipe--Implementing a Paste Command
- Override the DoSetupMenus Method in Your View Class
- Override the DoMenuCommand Method in Your View Class
- Define a Command Class to Handle Paste
- Implement Constructor and Destructor Methods
- Implement an Initialization Method
- Implement a DoIt Method
- Implement UndoIt and RedoIt Methods