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 / Part 2 - Working With MacApp


Chapter 15 -
Working With the Mouse

This chapter includes recipes and sample code that demonstrate how to

MacApp's handling of mouse operations is described in detail in "Mouse Handling," beginning on page 224.

Mouse event dispatching is described in Chapter 5, "Events and Commands."

Managing the cursor image as the user moves the mouse over a view is described in Chapter 8, "Displaying, Manipulating, and Printing Data." Managing the cursor for drag-and-drop operations is described in Chapter 9, "Drag and Drop."


Chapter Contents
Overview
Recipes--The Mouse
Recipe--Implementing a Recordable Drawing Command
Define a Command Constant for a Drawing Command
Add a Buzzwords Menu Entry
Define a Subclass of TTracker to Track the Mouse and Perform Drawing
Constructor
Destructor
Initialization Method
TrackConstrain
TrackFeedback
TrackMouse
Define a Class to Send an Apple Event Describing the Drawing Operation
Override DoMouseCommand to Create and Post a Drawing Command
Recipe--Supporting Drawing Specified by an Apple Event
Define a Command Constant for a Draw Points Command
Add a Buzzwords Menu Entry
Describe the Draw Points Event in the 'aete' Resource
Map the Draw Points Event to a Command Number
Define a Command Class to Work With the Draw Points Event
Constructor and Destructor
Initialization Method
DoIt Method
UndoIt and RedoIt Methods
Override DoScriptCommand to Create a Draw Points Command
Dragging With the Mouse--A General Outline
Recipe--Implementing Autoscrolling

Previous Book Contents Book Index Next

© Apple Computer, Inc.
25 JUL 1996