home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12otk1.exe / include / Part.idl < prev    next >
Text File  |  1997-04-02  |  12KB  |  408 lines

  1. /* @(#)Z 1.7 com/src/core/idl/Part.idl, odcore, od96os2, odos29712d 97/03/21 17:18:14 (96/10/29 09:22:43) */
  2. //#====START_GENERATED_PROLOG======================================
  3. //#
  4. //#
  5. //#   COMPONENT_NAME: odcore
  6. //#
  7. //#   CLASSES: none
  8. //#
  9. //#   ORIGINS: 82,27
  10. //#
  11. //#
  12. //#   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  13. //#   All Rights Reserved
  14. //#   Licensed Materials - Property of IBM
  15. //#   US Government Users Restricted Rights - Use, duplication or
  16. //#   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  17. //#       
  18. //#   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  19. //#   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  20. //#   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  21. //#   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  22. //#   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  23. //#   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  24. //#   OR PERFORMANCE OF THIS SOFTWARE.
  25. //#
  26. //#====END_GENERATED_PROLOG========================================
  27. //#
  28.  
  29. //#    Copyright:    (r) 1993 - 1995 by Apple Computer, Inc., all rights reserved.
  30.  
  31. #ifndef _PART_
  32. #define _PART_
  33.  
  34. #ifndef _PSTOBJ_
  35. #include "PstObj.idl"
  36. #endif
  37.  
  38. //==============================================================================
  39. // Classes defined in this interface
  40. //==============================================================================
  41.  
  42. interface ODPart;
  43. interface M_ODPart;
  44.  
  45. //==============================================================================
  46. // Classes used by this interface
  47. //==============================================================================
  48.  
  49. interface ODCanvas;
  50. interface ODDragItemIterator;
  51. interface ODEmbeddedFramesIterator;
  52. interface ODFacet;
  53. interface ODFrame;
  54. interface ODLink;
  55. interface ODLinkSource;
  56. interface ODObjectSpec;
  57. interface ODShape;
  58. interface ODStorageUnit;
  59. interface ODStorageUnitView;
  60. interface ODTypeList;
  61.  
  62. //==============================================================================
  63. // ODPart
  64. //==============================================================================
  65.  
  66. interface ODPart : ODPersistentObject
  67. {
  68.  
  69.     //==========================================================================
  70.     // Required Protocols
  71.     //==========================================================================
  72.  
  73.     //--------------------------------------------------------------------------
  74.     // Initialization
  75.     //--------------------------------------------------------------------------
  76.  
  77.     void InitPart(in ODStorageUnit storageUnit,
  78.                   in ODPart partWrapper);
  79.  
  80.     void InitPartFromStorage(in ODStorageUnit storageUnit,
  81.                              in ODPart partWrapper);
  82.  
  83.     //--------------------------------------------------------------------------
  84.     // From Layout protocol
  85.     //--------------------------------------------------------------------------
  86.  
  87.     void DisplayFrameAdded(in ODFrame frame);
  88.  
  89.     void DisplayFrameRemoved(in ODFrame frame);
  90.  
  91.     void DisplayFrameConnected(in ODFrame frame);
  92.  
  93.     void DisplayFrameClosed(in ODFrame frame);
  94.  
  95.     void AttachSourceFrame(in ODFrame frame,
  96.                            in ODFrame sourceFrame);
  97.  
  98.     void FrameShapeChanged(in ODFrame frame);
  99.  
  100.     void ViewTypeChanged(in ODFrame frame);
  101.  
  102.     void PresentationChanged(in ODFrame frame);
  103.  
  104.     void SequenceChanged(in ODFrame frame);
  105.  
  106.     void LinkStatusChanged(in ODFrame frame);
  107.  
  108.     void ContainingPartPropertiesUpdated(in ODFrame frame,
  109.                                          in ODStorageUnit propertyUnit);
  110.  
  111.     ODInfoType ReadPartInfo(in ODFrame frame,
  112.                             in ODStorageUnitView storageUnitView);
  113.  
  114.     void WritePartInfo(in ODInfoType partInfo,
  115.                        in ODStorageUnitView storageUnitView);
  116.  
  117.     void ClonePartInfo(in ODDraftKey key,
  118.                        in ODInfoType partInfo,
  119.                        in ODStorageUnitView storageUnitView,
  120.                        in ODFrame scope);
  121.  
  122.     ODID Open(in ODFrame frame);
  123.  
  124.     //--------------------------------------------------------------------------
  125.     // From Imaging protocol
  126.     //--------------------------------------------------------------------------
  127.  
  128.     void Draw(in ODFacet facet,
  129.               in ODShape invalidShape);
  130.  
  131.     void FacetAdded(in ODFacet facet);
  132.  
  133.     void FacetRemoved(in ODFacet facet);
  134.  
  135.     void GeometryChanged(in ODFacet facet,
  136.                          in ODBoolean clipShapeChanged,
  137.                          in ODBoolean externalTransformChanged);
  138.  
  139.     void HighlightChanged(in ODFacet facet);
  140.  
  141.     void CanvasChanged(in ODFacet facet);
  142.  
  143.     void CanvasUpdated(in ODCanvas canvas);
  144.  
  145.     ODULong GetPrintResolution(in ODFrame frame);
  146.  
  147.     //--------------------------------------------------------------------------
  148.     // From Part Activation protocol
  149.     //--------------------------------------------------------------------------
  150.  
  151.     ODBoolean BeginRelinquishFocus(in ODTypeToken focus,
  152.                                    in ODFrame ownerFrame,
  153.                                    in ODFrame proposedFrame);
  154.  
  155.     void CommitRelinquishFocus(in ODTypeToken focus,
  156.                                in ODFrame ownerFrame,
  157.                                in ODFrame proposedFrame);
  158.               
  159.     void AbortRelinquishFocus(in ODTypeToken focus,
  160.                               in ODFrame ownerFrame,
  161.                               in ODFrame proposedFrame);
  162.                   
  163.     void FocusAcquired(in ODTypeToken focus,
  164.                        in ODFrame ownerFrame);
  165.   
  166.     void FocusLost(in ODTypeToken focus,
  167.                    in ODFrame ownerFrame);
  168.                   
  169.  
  170.     //--------------------------------------------------------------------------
  171.     // From Part Persistance protocol
  172.     //--------------------------------------------------------------------------
  173.  
  174.     void ExternalizeKinds(in ODTypeList kindset);
  175.  
  176.     void ChangeKind(in ODType kind);
  177.  
  178.     //--------------------------------------------------------------------------
  179.     // From UI Events protocol
  180.     //--------------------------------------------------------------------------
  181.  
  182.     ODBoolean HandleEvent(inout ODEventData event,
  183.                           in ODFrame frame,
  184.                           in ODFacet facet,
  185.                           inout ODEventInfo eventInfo);
  186.   
  187.     void AdjustMenus(in ODFrame frame);
  188.     
  189.     //==========================================================================
  190.     // Optional Protocols
  191.     //==========================================================================
  192.  
  193.     //--------------------------------------------------------------------------
  194.     // From Undo protocol
  195.     //--------------------------------------------------------------------------
  196.  
  197.     void UndoAction(in ODActionData actionState);
  198.  
  199.     void RedoAction(in ODActionData actionState);
  200.  
  201.     void DisposeActionState(in ODActionData actionState,
  202.                             in ODDoneState doneState);
  203.  
  204.     void WriteActionState(in ODActionData actionState,
  205.                           in ODStorageUnitView storageUnitView);
  206.  
  207.     ODActionData ReadActionState(in ODStorageUnitView storageUnitView);
  208.  
  209.     //--------------------------------------------------------------------------
  210.     // From DragAndDrop protocol
  211.     //--------------------------------------------------------------------------
  212.  
  213.     void FulfillPromise(in ODStorageUnitView promiseSUView);
  214.  
  215.     void DropCompleted(in ODPart destPart,
  216.                        in ODDropResult dropResult);
  217.  
  218.     ODDragResult DragEnter(in ODDragItemIterator dragInfo,
  219.                            in ODFacet facet,
  220.                            in ODPoint where);
  221.  
  222.     ODDragResult DragWithin(in ODDragItemIterator dragInfo,
  223.                             in ODFacet facet,
  224.                             in ODPoint where);
  225.  
  226.     void DragLeave(in ODFacet facet,
  227.                    in ODPoint where);
  228.  
  229.     ODDropResult Drop(in ODDragItemIterator dropInfo,
  230.                       in ODFacet facet,
  231.                       in ODPoint where);
  232.  
  233.     //--------------------------------------------------------------------------
  234.     // From Linking protocol
  235.     //--------------------------------------------------------------------------
  236.  
  237.     ODLinkSource CreateLink(in ODByteArray data);
  238.  
  239.     void RevealLink(in ODLinkSource linkSource);
  240.  
  241.     void LinkUpdated(in ODLink updatedLink,
  242.                      in ODUpdateID change);
  243.  
  244.     // --- for containing parts ---
  245.  
  246.     void EmbeddedFrameUpdated(in ODFrame frame,
  247.                               in ODUpdateID change);
  248.  
  249.     ODBoolean EditInLinkAttempted(in ODFrame frame);
  250.  
  251.     //--------------------------------------------------------------------------
  252.     // From Embedding protocol
  253.     //--------------------------------------------------------------------------
  254.  
  255.     ODFrame RequestEmbeddedFrame(in ODFrame containingFrame,
  256.                                  in ODFrame baseFrame,
  257.                                  in ODShape frameShape,
  258.                                  in ODPart embedPart,
  259.                                  in ODTypeToken viewType,
  260.                                  in ODTypeToken presentation,
  261.                                  in ODBoolean isOverlaid);
  262.  
  263.     void RemoveEmbeddedFrame(in ODFrame embeddedFrame);
  264.  
  265.     ODShape RequestFrameShape(in ODFrame embeddedFrame,
  266.                               in ODShape frameShape);
  267.  
  268.     void UsedShapeChanged(in ODFrame embeddedFrame);
  269.  
  270.     ODShape AdjustBorderShape(in ODFacet embeddedFacet,
  271.                               in ODShape shape);
  272.  
  273.     ODStorageUnit AcquireContainingPartProperties(in ODFrame frame);
  274.  
  275.     ODBoolean RevealFrame(in ODFrame embeddedFrame,
  276.                           in ODShape revealShape);
  277.     
  278.     void EmbeddedFrameSpec(in ODFrame embeddedFrame,
  279.                            in ODObjectSpec spec);
  280.     
  281.     ODEmbeddedFramesIterator CreateEmbeddedFramesIterator(in ODFrame frame);
  282.  
  283.     //==========================================================================
  284.     // DO NOT OVERRIDE
  285.     //==========================================================================
  286.  
  287.     //--------------------------------------------------------------------------
  288.     // From Part Wrapping protocol
  289.     //--------------------------------------------------------------------------
  290.  
  291.     ODBoolean IsRealPart();
  292.    
  293.     ODPart GetRealPart();
  294.    
  295.     void ReleaseRealPart();
  296.  
  297.     //==========================================================================
  298.  
  299.     #ifdef __SOMIDL__
  300.     implementation
  301.     {
  302.         majorversion = 1; minorversion = 0;
  303.         
  304.         functionprefix = ODPart;
  305.         
  306.         override:
  307.             somUninit,
  308.             CloneInto,
  309.             Externalize;
  310.  
  311.         releaseorder:
  312.             InitPart,
  313.             InitPartFromStorage,
  314.             DisplayFrameAdded,
  315.             DisplayFrameRemoved,
  316.             DisplayFrameConnected,
  317.             DisplayFrameClosed,
  318.             AttachSourceFrame,
  319.             FrameShapeChanged,
  320.             ViewTypeChanged,
  321.             PresentationChanged,
  322.             SequenceChanged,
  323.             LinkStatusChanged,
  324.             ContainingPartPropertiesUpdated,
  325.             ReadPartInfo,
  326.             WritePartInfo,
  327.             ClonePartInfo,
  328.             Open,
  329.             Draw,
  330.             FacetAdded,
  331.             FacetRemoved,
  332.             GeometryChanged,
  333.             HighlightChanged,
  334.             CanvasChanged,
  335.             CanvasUpdated,
  336.             GetPrintResolution,
  337.             BeginRelinquishFocus,
  338.             CommitRelinquishFocus,
  339.             AbortRelinquishFocus,
  340.             FocusAcquired,
  341.             FocusLost,
  342.             ExternalizeKinds,
  343.             ChangeKind,
  344.             HandleEvent,
  345.             AdjustMenus,
  346.  
  347.             UndoAction,
  348.             RedoAction,
  349.             DisposeActionState,
  350.             WriteActionState,
  351.             ReadActionState,
  352.             FulfillPromise,
  353.             DropCompleted,
  354.             DragEnter,
  355.             DragWithin,
  356.             DragLeave,
  357.             Drop,
  358.             CreateLink,
  359.             RevealLink,
  360.             LinkUpdated,
  361.             EmbeddedFrameUpdated,
  362.             EditInLinkAttempted,
  363.             RequestEmbeddedFrame,
  364.             RemoveEmbeddedFrame,
  365.             RequestFrameShape,
  366.             UsedShapeChanged,
  367.             AdjustBorderShape,
  368.             AcquireContainingPartProperties,
  369.             RevealFrame,
  370.             EmbeddedFrameSpec,
  371.             CreateEmbeddedFramesIterator,
  372.  
  373.             IsRealPart,
  374.             GetRealPart,
  375.             ReleaseRealPart;
  376.     };
  377.     #endif
  378. };
  379.  
  380. interface M_ODPart : SOMClass
  381. {
  382.         ISOString              clsGetODPartHandlerName();
  383.         string                 clsGetODPartHandlerDisplayName();
  384.         sequence<PartKindInfo> clsGetODPartKinds();
  385.         string                 clsGetOLE2ClassId();
  386.         string                 clsGetWindowsIconFileName();
  387.  
  388.  
  389.         #ifdef __SOMIDL__
  390.         implementation
  391.         {
  392.                 functionprefix = M_ODPart;
  393.  
  394.                 override:
  395.                   somNew;
  396.                 releaseorder:
  397.                   clsGetODPartHandlerName,
  398.                   clsGetODPartHandlerDisplayName,
  399.                   clsGetODPartKinds,
  400.                   clsGetOLE2ClassId,
  401.                   clsGetWindowsIconFileName;
  402.  
  403.         };
  404.      #endif   // SOMIDL
  405. };
  406.  
  407. #endif // _PART_
  408.