home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12osp1.exe / src / basecntr / iodbcobj.idl < prev    next >
Text File  |  1997-04-02  |  7KB  |  250 lines

  1. /* @(#) 1.14 com/src/samples/basecntr/iodbcobj.idl, odbasepart, od96os2, odos29712d 2/20/97 18:26:01 [3/21/97 17:45:28] */
  2.  
  3. //#====START_GENERATED_PROLOG======================================
  4. //#
  5. //#
  6. //#   COMPONENT_NAME: odcore
  7. //#
  8. //#   CLASSES: none
  9. //#
  10. //#   ORIGINS: 82,27
  11. //#
  12. //#
  13. //#   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  14. //#   All Rights Reserved
  15. //#   Licensed Materials - Property of IBM
  16. //#   US Government Users Restricted Rights - Use, duplication or
  17. //#   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  18. //#
  19. //#   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  20. //#   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  21. //#   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  22. //#   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  23. //#   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  24. //#   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  25. //#   OR PERFORMANCE OF THIS SOFTWARE.
  26. //#
  27. //#====END_GENERATED_PROLOG========================================
  28. //#
  29.  
  30. #ifndef BC_ContentObject
  31. #define BC_ContentObject
  32.  
  33. #ifndef _ODOBJECT_
  34. #include "ODObject.idl"
  35. #endif
  36.  
  37.  
  38. //==============================================================================
  39. // Classes defined in this interface
  40. //==============================================================================
  41.  
  42. interface  ContentObject;
  43. interface  ContentFrame;
  44.  
  45. //==============================================================================
  46. // Classes used by this interface
  47. //==============================================================================
  48.  
  49. interface  ODRect;
  50. interface  ODPoint;
  51. interface  ODStorageUnit;
  52. interface  ODStorageUnitCursor;
  53. interface  ODFrame;
  54. interface  ODTransform;
  55.  
  56. //==============================================================================
  57. // Constants and type definitions to be emitted
  58. //==============================================================================
  59.  
  60. #if defined(__SOMIDL__) && defined(EMIT_CONTOBJ)
  61. #pragma somemittypes on
  62. #else
  63. #pragma somemittypes off
  64. #endif
  65.  
  66. const ODULong COBJ_BASECLASS = 0;
  67. const ODULong COBJ_FRAMECLASS = 1;
  68.  
  69. const ODULong FRAME_CLOSED = 1;
  70. const ODULong FRAME_REMOVED = 2;
  71. const ODULong OBJECT_DELETED = 3;
  72. const ODULong OBJECT_DRAGGED = 4;
  73.  
  74. enum BCTransferKind {EXTERNALIZE, INTERNALIZE, CLONE_ALL, CLONE_SELECTED};
  75.  
  76. enum CObjXformFlags {EXTXFORM_REPLACE, EXTXFORM_PRECOMPOSE, EXTXFORM_POSTCOMPOSE};
  77.  
  78. // Data structure used in WriteContents for storing kODFrameList kind.
  79. typedef struct tagFrameListInfo{
  80.     ODPoint offset;                 // Top-left corner of aggregate bounding box
  81.     ODStorageUnitCursor cursor;     // kODFrameList value in content property
  82. } BCFrameListInfo;
  83.  
  84. // Data structure passed in the WriteContents method used in cloning
  85. typedef struct tagCloneInfo
  86. {
  87.     unsigned long  key;
  88.     ODPoint  *refPoint;
  89.     ODFrame  myFrame;
  90.     BCFrameListInfo *frameListInfo;
  91. } BCCloneInfo;
  92.  
  93.  
  94. const ODULong COBJ_RESIZE_TOP    = 0x1000;
  95. const ODULong COBJ_RESIZE_BOTTOM = 0x0100;
  96. const ODULong COBJ_RESIZE_LEFT   = 0x0010;
  97. const ODULong COBJ_RESIZE_RIGHT  = 0x0001;
  98.  
  99. #pragma somemittypes off
  100.  
  101.  
  102. //==============================================================================
  103. // ContentObject
  104. //==============================================================================
  105.  
  106.  
  107. interface ContentObject :  ODObject
  108. {
  109.  
  110.   attribute ODULong objType;
  111.  
  112.   attribute ODULong selectionState;
  113.  
  114.   attribute ODRect boundingRect;
  115.  
  116.   attribute ODFrame containingFrame;
  117.  
  118.   readonly attribute ODTransform extTransform;
  119.  
  120.   attribute ODULong linkStatus;
  121.  
  122.   void WriteContents(in ODStorageUnit  toSU,
  123.                      in BCTransferKind writeKind,
  124.                      in BCCloneInfo   *cloneInfo);
  125.  
  126.   void ReadContents(in ODStorageUnit  fromSU,
  127.                     in BCTransferKind  readKind,
  128.                     in BCCloneInfo    *cloneInfo);
  129.  
  130.   void DeleteContents(in ODULong type);
  131.  
  132.   void MoveBy (in ODPoint offset);
  133.  
  134.   void Resize (in ODPoint endPt,
  135.                in ODULong resizeFlags);
  136.  
  137.   void MoveToFront ();
  138.  
  139.   void MoveToBack ();
  140.  
  141.   void SetExtTransform (in ODTransform extTransform);
  142.  
  143.   ContentObject CreateNewView (in ODFrame viewFrame);
  144.  
  145.   void ChangeExtTransform (in ODTransform xform,
  146.                                  in ODULong xformFlags);
  147.  
  148.   void ChangePointBias(in ODPoint point);
  149.  
  150.   void ChangeRectBias(in ODRect rect);
  151.  
  152.   void ChangeTransformBias(in ODTransform xform);
  153.  
  154.   ODULong GetHeight();
  155.  
  156. #ifdef __SOMIDL__
  157.   implementation
  158.   {
  159.      majorversion = 1; minorversion = 0;
  160.      functionprefix = ContentObject;
  161.  
  162.      override:
  163.         somInit,
  164.         somUninit;
  165.  
  166.      releaseorder:
  167.         _get_objType,
  168.         _set_objType,
  169.         _get_selectionState,
  170.         _set_selectionState,
  171.         _get_boundingRect,
  172.         _set_boundingRect,
  173.         _get_containingFrame,
  174.         _set_containingFrame,
  175.         _get_extTransform,
  176.         _get_linkStatus,
  177.         _set_linkStatus,
  178.         WriteContents,
  179.         ReadContents,
  180.         DeleteContents,
  181.         MoveBy,
  182.         Resize,
  183.         MoveToFront,
  184.         MoveToBack,
  185.         CreateNewView,
  186.         SetExtTransform,
  187.         ChangeExtTransform,
  188.         ChangePointBias,
  189.         ChangeRectBias,
  190.         ChangeTransformBias,
  191.         GetHeight;
  192.  
  193.  
  194.   };
  195. #endif //# __SOMIDL__
  196. };
  197.  
  198.  
  199. interface ContentFrame :  ContentObject
  200. {
  201.  
  202.   attribute ODFrame myFrame;
  203.  
  204.   void WriteContentsToFrameList(in ODStorageUnit  toSU,
  205.                      in BCTransferKind writeKind,
  206.                      in BCCloneInfo   *cloneInfo,
  207.                      in ODID          frameID);
  208.  
  209. #ifdef __SOMIDL__
  210.   implementation
  211.   {
  212.      majorversion = 1; minorversion = 0;
  213.      functionprefix = ContentFrame;
  214.  
  215.      override:
  216.         somInit,
  217.         somUninit,
  218.         _set_selectionState,
  219.         _get_boundingRect,
  220.         _get_containingFrame,
  221.         _set_containingFrame,
  222.         _get_linkStatus,
  223.         _set_linkStatus,
  224.         WriteContents,
  225.         ReadContents,
  226.         DeleteContents,
  227.         MoveBy,
  228.         Resize,
  229.         MoveToFront,
  230.         MoveToBack,
  231.         _get_extTransform,
  232.         SetExtTransform,
  233.         ChangeExtTransform,
  234.         CreateNewView,
  235.         GetHeight;
  236.  
  237.      releaseorder:
  238.         _get_myFrame,
  239.         _set_myFrame,
  240.         WriteContentsToFrameList;
  241.  
  242.   };
  243. #endif //# __SOMIDL__
  244. };
  245.  
  246.  
  247.  
  248. #endif // BC_ContentObject (end of file)
  249.  
  250.