Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Cookbook /


Listings

Chapter 2 SamplePart Tutorial 27

Listing 2-1 SamplePart class definition 34

Listing 2-2 SamplePart global variables 38

Listing 2-3 SamplePart constructor 40

Listing 2-4 InitPart method 42

Listing 2-5 InitPartFromStorage method 43

Listing 2-6 Initialize method 45

Listing 2-7 Open method 49

Listing 2-8 CreateWindow method 51

Listing 2-9 DisplayFrameAdded method 54

Listing 2-10 DisplayFrameConnected method 56

Listing 2-11 DisplayFrameRemoved method 58

Listing 2-12 DisplayFrameClosed method 59

Listing 2-13 AttachSourceFrame method 60

Listing 2-14 FrameShapeChanged method 61

Listing 2-15 Draw method 64

Listing 2-16 DrawIconView method 65

Listing 2-17 DrawThumbnailView method 66

Listing 2-18 DrawFrameView method 68

Listing 2-19 ViewTypeChanged method 71

Listing 2-20 GenerateThumbnail method 72

Listing 2-21 LoadThumbnail method 72

Listing 2-22 CalcNewUsedShape method 72

Listing 2-23 GeometryChanged method 74

Listing 2-24 HighlightChanged method 75

Listing 2-25 FacetAdded method 75

Listing 2-26 FacetRemoved method 76

Listing 2-27 HandleEvent method 79

Listing 2-28 HandleMouseEvent method 82

Listing 2-29 HandleMenuEvent method 84

Listing 2-30 AdjustMenus method 86

Listing 2-31 DoDialogBox method 88

Listing 2-32 BeginRelinquishFocus method 91

Listing 2-33 CommitRelinquishFocus method 92

Listing 2-34 FocusLost method 92

Listing 2-35 AbortRelinquishFocus method 93

Listing 2-36 FocusAcquired method 94

Listing 2-37 PartActivated method 94

Listing 2-38 ActivateFrame method 95

Listing 2-39 WindowActivating method 96

Listing 2-40 Externalize method 99

Listing 2-41 CheckAndAddProperties method 100

Listing 2-42 CleanseContentProperty method 101

Listing 2-43 ExternalizeStateInfo method 103

Listing 2-44 CloneInto method 105

Listing 2-45 InternalizeStateInfo method 106

Listing 2-46 ReadPartInfo, CFrameInfo constructor, and CFrameInfo::InitFromStorage methods 108

Listing 2-47 WritePartInfo, CFrameInfo::Externalize, and CFrameInfo::ExternalizeFrameInfo methods 110

Listing 2-48 ClonePartInfo and CFrameInfo::CloneInto methods 112

Listing 2-49 Release method 113

Listing 2-50 ReleaseAll method 115

Listing 2-51 Purge method 116

Listing 2-52 SetDirty method 117

Listing 2-53 SamplePart types and constant definitions includes 118

Listing 2-54 SamplePart constant definitions 119

Listing 2-55 SamplePart OLE interoperability resource 122

Listing 2-56 SamplePart version number definitions 125

Listing 2-57 SamplePart Finder version resources 127

Listing 2-58 SamplePart code fragment resource 128

Listing 2-59 Kind-to-category mapping 130

Listing 2-60 Editor-to-kind mapping 131

Listing 2-61 Editor-to-string mapping 131

Listing 2-62 Kind-to-string mapping 132

Listing 2-63 Category-to-string mapping 133

Listing 2-64 Kind-to-Mac-OS-type mapping 134

Appendix B System Object Model 193

Listing B-1 Interface statement 196

Listing B-2 Implementation section 196

Listing B-3 Last section of the som_SamplePart class definition 197

Listing B-4 releaseorder statement 198

Listing B-5 Class source define directive 198

Listing B-6 Typical SOM function prototype 199

Listing B-7 Stub method default statements 200


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