home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-12-11 | 2.6 KB | 100 lines | [TEXT/CWIE] |
- // Release Version: $ ODF 3 $
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
-
- //================================================================================
- #ifndef FWEXTMGR_H
- #include "FWExtMgr.h" //•••
- #endif
-
- #include "MyExt.xh" // DevUniv_MyExtension
-
- #ifndef PART_H
- #include "Part.h"
- #endif
-
- #ifndef FRAME_H
- #include "Frame.h"
- #endif
-
- #ifndef DEFINES_K
- #include "Defines.k"
- #endif
-
- #ifndef BINDING_K
- #include "Binding.k"
- #endif
-
- // ----- Framework Includes -----
- #ifndef FWABOUT_H
- #include "FWAbout.h"
- #endif
-
- //==============================================================================
- #ifdef FW_BUILD_MAC
- #pragma segment ExtSample
- #endif
-
- FW_DEFINE_AUTO(CExtSamplePart)
-
- //==============================================================================
- CExtSamplePart::CExtSamplePart(ODPart* odPart)
- : FW_CPart(odPart, FW_gInstance, kPartInfoID)
- {
- }
-
- //--------------------------------------------------------------------------------
- CExtSamplePart::~CExtSamplePart()
- {
- }
-
- //--------------------------------------------------------------------------------
- void
- CExtSamplePart::Initialize(Environment* ev, ODStorageUnit* storageUnit,
- FW_Boolean fromStorage) // Override
- {
- FW_CPart::Initialize(ev, storageUnit, fromStorage);
- FW_CSelection* selection = NULL;
- const ODType kMainPresentation = "Apple:Presentation:ExtSample";
- this->RegisterPresentation(ev, kMainPresentation, true, selection);
-
- FW_CExtensionManager *mgr = GetExtensionManager (ev);
- mgr->RegisterExtension(ev, "DevUniv_MyExtension", CreateMyExtension, NULL,
- FW_kDontCacheWhenReleased);
- }
-
- //--------------------------------------------------------------------------------
- ODExtension*
- CExtSamplePart::CreateMyExtension(Environment *ev, FW_CPart *part,
- const char* name, void* refCon)
- {
- DevUniv_MyExtension *theExtension;
- theExtension = new DevUniv_MyExtension();
- theExtension ->InitMyExtension(ev, part->GetODPart(ev));
- return theExtension;
- }
- //--------------------------------------------------------------------------------
- FW_CFrame*
- CExtSamplePart::NewFrame(Environment* ev, ODFrame* odFrame,
- FW_CPresentation* presentation, FW_Boolean fromStorage) // Override
- {
- FW_UNUSED(fromStorage);
- return FW_NEW(CExtSampleFrame, (ev, odFrame, presentation, this));
- }
-
- //--------------------------------------------------------------------------------
- FW_CContent*
- CExtSamplePart::NewPartContent(Environment* ev)
- {
- FW_UNUSED(ev);
- return NULL;
- }
-
- //--------------------------------------------------------------------------------
- FW_Handled
- CExtSamplePart::DoAbout(Environment* ev)
- {
- ::FW_About(ev, this, kAbout);
-
- return FW_kHandled;
- }
-