home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / Developer University / DUProjects / Sample1 / Sources / Part.cpp < prev    next >
Encoding:
Text File  |  1996-08-16  |  1.7 KB  |  69 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 Sample1
  29. #endif
  30.  
  31. FW_DEFINE_AUTO(CSample1Part)
  32. //==============================================================================
  33. CSample1Part::CSample1Part(ODPart* odPart)
  34.   :    FW_CPart(odPart, FW_gInstance, kPartInfoID)
  35. {
  36. }
  37.  
  38. //--------------------------------------------------------------------------------
  39. CSample1Part::~CSample1Part()
  40. {
  41. }
  42.  
  43. //--------------------------------------------------------------------------------
  44. void 
  45. CSample1Part::Initialize(Environment* ev)    // Override
  46. {
  47.     FW_CPart::Initialize(ev);
  48.     FW_CSelection* selection = NULL;
  49.     const ODType kMainPresentation = "Apple:Presentation:Sample1";
  50.     this->RegisterPresentation(ev, kMainPresentation, true, selection);
  51. }
  52.  
  53. //--------------------------------------------------------------------------------
  54. FW_CFrame* 
  55. CSample1Part::NewFrame(Environment* ev, ODFrame* odFrame,
  56.                         FW_CPresentation* presentation, FW_Boolean fromStorage)    // Override
  57. {
  58.     FW_UNUSED(presentation);
  59.     FW_UNUSED(fromStorage);
  60.     return FW_NEW(CSample1Frame, (ev, odFrame, presentation, this));
  61. }
  62.  
  63. //--------------------------------------------------------------------------------
  64. FW_CContent* 
  65. CSample1Part::NewPartContent(Environment* ev)
  66. {
  67.     return NULL;
  68. }
  69.