home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Framewrk / FWPart / Include / FWPartng.h < prev    next >
Encoding:
Text File  |  1995-11-08  |  3.9 KB  |  135 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWPartng.h
  4. //    Release Version:    $ 1.0d11 $
  5. //
  6. //    Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWPARTNG_H
  11. #define FWPARTNG_H
  12.  
  13. #ifndef FWPART_H
  14. #include "FWPart.h"
  15. #endif
  16.  
  17. #if FW_LIB_EXPORT_PRAGMAS
  18. #pragma lib_export on
  19. #endif
  20.  
  21. //========================================================================================
  22. //    Forward Declarations
  23. //========================================================================================
  24.  
  25. class FW_CLASS_ATTR FW_MProxy;
  26. class FW_CLASS_ATTR FW_CPrivOrderedCollection;
  27. class FW_CLASS_ATTR FW_CCloneInfo;
  28. class FW_CLASS_ATTR FW_CProxyFrame;
  29. class FW_CLASS_ATTR FW_CPartProxyFrameIterator;
  30.  
  31. //========================================================================================
  32. //    class FW_CEmbeddingPart
  33. //========================================================================================
  34.  
  35. class FW_CLASS_ATTR FW_CEmbeddingPart : public FW_CPart
  36. {
  37.     friend class FW_CLASS_ATTR FW_CPartProxyFrameIterator;
  38.  
  39. public:
  40.     FW_DECLARE_CLASS
  41.  
  42. //----------------------------------------------------------------------------------------
  43. //    Initialization/Destruction
  44. //
  45. public:
  46.     FW_CEmbeddingPart(ODPart* odPart, 
  47.              ODValueType partKind, 
  48.              ODValueType partUserName,
  49.              FW_Instance partInstance, 
  50.              FW_ResourceId iconID);
  51.     
  52.     virtual void                 Initialize(Environment *ev);
  53.     virtual                     ~FW_CEmbeddingPart();
  54.  
  55. //----------------------------------------------------------------------------------------
  56. //    Inherited API
  57. //
  58. public:                                            
  59.     virtual FW_CPresentation*    NewPresentation(Environment *ev, 
  60.                                             FW_CSelection* selection,
  61.                                             ODTypeToken presentationType);
  62.  
  63.     virtual void                ReleaseAll(Environment *ev);
  64.     virtual ODSize                Purge(Environment *ev, ODSize size);
  65.  
  66.     virtual void                LinkStatusChanged(Environment *ev, ODFrame* odFrame);
  67.  
  68. //----------------------------------------------------------------------------------------
  69. //    New API
  70. //
  71. public:                                            
  72.     FW_MProxy*                    GetProxy(Environment *ev, ODFrame* embeddedFrame) const;
  73.                 
  74. //----------------------------------------------------------------------------------------
  75. //    Internal API (you should never have to called it)
  76. //
  77. public:
  78.     // ----- Cloning -----
  79.     virtual void                PrivCloneInto(Environment *ev,
  80.                                     ODDraftKey key,
  81.                                     ODStorageUnit* toSU,
  82.                                     ODFrame* scope);
  83.  
  84.     // ----- ProxyFrame list management -----        
  85.     void                         PrivAddProxyFrame(Environment* ev, FW_CProxyFrame* proxyFrame);
  86.     long                         PrivRemoveProxyFrame(Environment* ev, FW_CProxyFrame* proxyFrame);
  87.     
  88.     FW_CProxyFrame*                PrivAcquireProxyFrame(Environment* ev, ODStorageUnitID frameID) const;
  89.     
  90.     virtual void                PrivInternalizeProxyFrames(Environment *ev, 
  91.                                     ODStorageUnit* storageUnit, 
  92.                                     FW_CCloneInfo* cloneInfo);
  93.     virtual void                PrivExternalizeProxyFrames(Environment *ev, 
  94.                                     ODStorageUnit* storageUnit, 
  95.                                     FW_CCloneInfo* cloneInfo);
  96.     
  97.     virtual void                Dragging(Environment *ev, 
  98.                                     FW_CFrame* frame, 
  99.                                     FW_Boolean dragging);
  100.  
  101. #ifdef FW_BUILD_WIN
  102.     void                        WinAddEmbedMenu(Environment *ev, 
  103.                                     FW_CMenuBar *menuBar);
  104.     ODPart*                        WinCreateEmbeddedPartFromCommand(Environment* ev, 
  105.                                     ODCommandID commandID);
  106.  
  107.     void                         WinEnableEmbedMenu(Environment* ev,
  108.                                     FW_CMenuBar* menuBar);
  109. #endif
  110.  
  111. //----------------------------------------------------------------------------------------
  112. //    Data members
  113. //
  114. private:    
  115.     FW_CPrivOrderedCollection*     fProxyFrames;    
  116.  
  117. #ifdef FW_BUILD_WIN
  118.     // This is used by the Windows version to create the embed menu
  119.     FW_CPullDownMenu*            fWinEmbedMenu;
  120.     ODCommandID                    fWinFirstPartID;
  121.     ODCommandID                    fWinLastPartID;
  122.     char                          fTypeString[1024];        // [HLX] need to be dynamic
  123.     char                         *fTypePtr [25];            // [HLX] need to be dynamic
  124. #endif
  125. };
  126.  
  127. #if FW_LIB_EXPORT_PRAGMAS
  128. #pragma lib_export off
  129. #endif
  130.  
  131. #endif
  132.  
  133.  
  134.  
  135.