Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Cookbook /


Chapter 2 - SamplePart Tutorial

This chapter presents a tutorial that shows how to implement SamplePart, a part editor with the basic feature set common to all OpenDoc part editors.


Chapter Contents
Features of SamplePart
SamplePart Structure
SamplePart System Object Model Interface
Calling Inherited Methods
SOM Wrapper Class and Part Wrapper Object
SamplePart File Structure
SamplePart Class Definition
Shared Global Variables
Initialization
The Constructor
The InitPart Method
The InitPartFromStorage Method
The Initialize Method
Opening the Part Into a Window
The Open Method
The CreateWindow Method
Handling Frame Layout
The DisplayFrameAdded Method
The DisplayFrameConnected Method
The DisplayFrameRemoved Method
The DisplayFrameClosed Method
The AttachSourceFrame Method
The FrameShapeChanged Method
Drawing the Part
The Draw Method
The DrawIconView Method
The DrawThumbnailView Method
The DrawFrameView Method
The ViewTypeChanged Method
The GeometryChanged Method
The HighlightChanged Method
The FacetAdded Method
The FacetRemoved Method
Handling Events
Event Constants
The HandleEvent Method
The HandleMouseEvent Method
The HandleMenuEvent Method
The AdjustMenus Method
The DoDialogBox Method
The View As Window Command
Activation
The BeginRelinquishFocus Method
The CommitRelinquishFocus Method
The FocusLost Method
The AbortRelinquishFocus Method
The FocusAcquired Method
The PartActivated Method
The ActivateFrame Method
The WindowActivating Method
Persistent Storage
The Externalize Method
The CheckAndAddProperties Method
The CleanseContentProperty Method
The ExternalizeStateInfo Method
The ExternalizeContent Method
The CloneInto Method
The InternalizeContent Method
The InternalizeStateInfo Method
The ReadPartInfo Method
The WritePartInfo Method
The ClonePartInfo Method
The Release Method
The ReleaseAll Method
The Purge Method
The SetDirty Method
Defining Types and Constants
Defining Resources
OpenDoc-OLE Interoperability
Menu IDs
Bundle Resources
Version Numbers
Code Fragment Resources
Name-Mapping Resources
Mapping Kind to Category
Mapping Editor to Kind
Mapping ISO Strings to User-Readable Names
Mapping Kind to Mac OS Type

Previous Book Contents Book Index Next

© Apple Computer, Inc.
16 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help