home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / Developer University / DUProjects / Sample2 / Sources / Part.cpp < prev    next >
Encoding:
Text File  |  1996-03-29  |  1.7 KB  |  70 lines  |  [TEXT/CWIE]

  1. //    Release Version:    $ ODF 1 $
  2. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  3.  
  4. //================================================================================
  5. #ifndef PART_H
  6. #include "Part.h"
  7. #endif
  8.  
  9. #ifndef FRAME_H
  10. #include "Frame.h"
  11. #endif
  12.  
  13. #ifndef DEFINES_K
  14. #include "Defines.k"
  15. #endif
  16.  
  17. #ifndef BINDING_K
  18. #include "Binding.k"
  19. #endif
  20.  
  21. // ----- Framework Includes -----
  22. #ifndef FWUTIL_H
  23. #include "FWUtil.h"
  24. #endif
  25.  
  26. //==============================================================================
  27. #ifdef FW_BUILD_MAC
  28. #pragma segment Sample2
  29. #endif
  30.  
  31. FW_DEFINE_AUTO(CSample2Part)
  32.  
  33. //==============================================================================
  34. CSample2Part::CSample2Part(ODPart* odPart)
  35.   :    FW_CPart(odPart, FW_gInstance, kPartInfoID)
  36. {
  37. }
  38.  
  39. //--------------------------------------------------------------------------------
  40. CSample2Part::~CSample2Part()
  41. {
  42. }
  43.  
  44. //--------------------------------------------------------------------------------
  45. void 
  46. CSample2Part::Initialize(Environment* ev)    // Override
  47. {
  48.     FW_CPart::Initialize(ev);
  49.     FW_CSelection* selection = NULL;
  50.     const ODType kMainPresentation = "Apple:Presentation:Sample2";
  51.     this->RegisterPresentation(ev, kMainPresentation, true, selection);
  52. }
  53.  
  54. //--------------------------------------------------------------------------------
  55. FW_CFrame* 
  56. CSample2Part::NewFrame(Environment* ev, ODFrame* odFrame,
  57.                         FW_CPresentation* presentation, FW_Boolean fromStorage)    // Override
  58. {
  59.     FW_UNUSED(presentation);
  60.     FW_UNUSED(fromStorage);
  61.     return FW_NEW(CSample2Frame, (ev, odFrame, presentation, this));
  62. }
  63.  
  64. //--------------------------------------------------------------------------------
  65. FW_CContent* 
  66. CSample2Part::NewPartContent(Environment* ev)
  67. {
  68.     return NULL;
  69. }
  70.