home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-22 | 2.5 KB | 97 lines | [TEXT/CWIE] |
- //========================================================================================
- // Release Version: $ ODF 2 $
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
-
- //================================================================================
- #include "Talker.hpp"
-
- #ifndef PART_H
- #include "Part.h"
- #endif
-
- #ifndef CONTENT_H
- #include "Content.h"
- #endif
-
- #ifndef BINDING_K
- #include "Binding.k"
- #endif
-
- #ifndef FRAME_H
- #include "Frame.h"
- #endif
-
- #ifndef SELECTION_H
- #include "Selection.h"
- #endif
-
- // ----- Framework Layer -----
- #ifndef FWPRESEN_H
- #include "FWPresen.h" // FW_CPresentation
- #endif
-
- #ifndef FWABOUT_H
- #include "FWAbout.h" //::FW_About()
- #endif
-
- //==============================================================================
- #ifdef FW_BUILD_MAC
- #pragma segment Talker
- #endif
-
- FW_DEFINE_AUTO(CTalkerPart)
- //==============================================================================
- CTalkerPart::CTalkerPart(ODPart* odPart)
- : FW_CPart(odPart, FW_gInstance, kPartInfoID),
- fPresentation(NULL),
- fPartContent(NULL)
- {
- FW_END_CONSTRUCTOR
- }
-
- //--------------------------------------------------------------------------------
- CTalkerPart::~CTalkerPart()
- {
- FW_START_DESTRUCTOR
- }
-
- //--------------------------------------------------------------------------------
- void
- CTalkerPart::Initialize(Environment* ev, ODStorageUnit* storageUnit,
- FW_Boolean fromStorage) // Override
- {
- FW_CPart::Initialize(ev, storageUnit, fromStorage);
- CTalkerSelection* selection = FW_NEW(CTalkerSelection, (ev, fPartContent));
- const ODType kMainPresentation = "Apple:Presentation:Talker";
- const FW_Boolean kDefaultPresentation = true;
- fPresentation = RegisterPresentation(ev, kMainPresentation,
- kDefaultPresentation, selection);
- RegisterKind(ev, 'TEXT', kODPlatformDataType, FW_kAllStorage, FW_kImport);
- }
-
- //--------------------------------------------------------------------------------
- FW_CFrame*
- CTalkerPart::NewFrame(Environment* ev, ODFrame* odFrame,
- FW_CPresentation* presentation, FW_Boolean fromStorage) // Override
- {
- FW_UNUSED(fromStorage);
- return FW_NEW(CTalkerFrame, (ev, odFrame, presentation, fPartContent));
- }
-
- //------------------------------------------------------------------------------
- FW_CContent*
- CTalkerPart::NewPartContent(Environment* ev)
- {
- fPartContent = FW_NEW(CTalkerContent, (ev, this));
- return fPartContent;
- }
-
- //------------------------------------------------------------------------------
- FW_Handled CTalkerPart::DoAbout(Environment* ev)
- {
- ::FW_About(ev, this, kAbout);
-
- return FW_kHandled;
- }
-
-