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

  1. // @(#) 1.33 com/src/samples/grafpart/iodgraph.idl, odgrafpart, od96os2, odos29712d 2/14/97 10:41:01 [3/21/97 17:45:26]
  2. //#====START_GENERATED_PROLOG======================================
  3. //#
  4. //#
  5. //#   COMPONENT_NAME: odgrafpart
  6. //#
  7. //#   CLASSES: none
  8. //#
  9. //#   ORIGINS: 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. // *********************************************************************
  30. //   Contains:  Class definition for a 2D-Drawing Container Part
  31. // *********************************************************************
  32.  
  33.  
  34. // This file contains the IDL to define either the class GrafPart
  35. // or the class ScriptableGraphPart (based on the defined symbol
  36. // _Scriptable_GP_).  Because of the way the SOM compiler names
  37. // its output files (.xh and .xih) the source file name must reflect the
  38. // distinct classes.  Thus this file resides in two places in the source:
  39. // as grafpart/iodgraph.idl and as scrgraph/iodscrgp.idl  The primary
  40. // difference in the two classes is the base class.  grafpart inherits
  41. // from BaseContainer, ScriptableGraphPart inherits from ScriptableBaseContainer
  42.  
  43. // the following define is modified by the make process when this
  44. // file is copied into scrgraph/iodscrgp.idl
  45. #undef _Scriptable_GP_
  46.  
  47.  
  48. #ifndef _GRAFPART_
  49. #define _GRAFPART_
  50.  
  51. // include definition for base class
  52. #ifndef _Scriptable_GP_
  53. #include <iodbasec.idl>
  54. #else
  55. #include <iodscrbc.idl>
  56. #endif
  57.  
  58. // support enum ODActionType
  59. #ifndef _ODTYPESB_
  60. #include <ODTypesB.idl>
  61. #endif
  62.  
  63.  
  64. //======================================================================
  65. // Classes defined in this interface
  66. //======================================================================
  67.  
  68. #ifndef _Scriptable_GP_
  69. interface   GrafPart;
  70. interface   M_GrafPart;
  71. #else
  72. interface   ScriptableGraphPart ;
  73. interface   M_ScriptableGraphPart ;
  74. #endif
  75.  
  76.  
  77. //======================================================================
  78. // Classes used by this interface
  79. //======================================================================
  80.  
  81. interface   BaseContainer;
  82. interface   M_BaseContainer;
  83. interface   ODFacet;
  84. interface   ODMenuBar;
  85. interface   ODSession;
  86. interface   ODStorageUnit;
  87. interface   ContentGrafPartFigr;
  88. interface   ContentGrafPartPoin;
  89. interface   ContentGrafPartLine;
  90. interface   ContentGrafPartRect;
  91. interface   ContentGrafPartText;
  92. //interface   ContentGrafPartElli;
  93. //interface   ContentGrafPartCirc;
  94. //interface   ContentGrafPartPlin;
  95. //interface   ContentGrafPartPgon;
  96. //interface   ContentGrafPartFree;
  97. //interface   ContentGrafPartImag;
  98.  
  99.  
  100. //==============================================================================
  101. // Constants and type definitions to be emitted (maybe)
  102. //==============================================================================
  103.  
  104. #if defined(__SOMIDL__) && defined(EMIT_GRAFPART)
  105. #pragma somemittypes on
  106. #else
  107. #pragma somemittypes off
  108. #endif
  109.  
  110. #if   defined(_PLATFORM_WIN32_)
  111.     typedef HDC     HDraw;
  112. #elif defined(_PLATFORM_OS2_)
  113.     typedef HPS     HDraw;
  114. #endif // _PLATFORM_???_
  115.  
  116.     typedef ODULong COType;     //  define a name for the specific type of Content Object type
  117.  
  118. #pragma somemittypes off
  119.  
  120.  
  121. //======================================================================
  122. // GrafPart Implementation
  123. //======================================================================
  124.  
  125. #ifndef _Scriptable_GP_
  126. interface GrafPart : BaseContainer
  127. #else
  128. interface ScriptableGraphPart : ScriptableBaseContainer
  129. #endif
  130. {
  131.     ODBoolean   HandleRefresh( );
  132.  
  133. #ifdef __PRIVATE__
  134.     ODBoolean   Reset( );
  135.  
  136.     ODBoolean   AddIntrinsic(       in  ODFrame         frame,
  137.                                     in  COType          cotype);
  138.  
  139.     ODBoolean   UpdateIntrinsic(    in  ODFrame         frame,
  140.                                     in  ODPoint         point);
  141. #endif  // __PRIVATE__
  142.  
  143.  
  144. #ifdef __SOMIDL__
  145.     implementation
  146.     {
  147.  
  148. #ifndef _Scriptable_GP_
  149.         dllname        = "iodgraph.dll";
  150.         functionprefix = GrafPart;
  151.         metaclass      = M_GrafPart;
  152. #else
  153.         dllname        = "iodscrgp.dll" ;
  154.         functionprefix = ScriptableGraphPart ;
  155.         metaclass      = M_ScriptableGraphPart ;
  156. #endif
  157.  
  158.         override:
  159.             somInit,
  160.             somUninit,
  161.             Initialize,
  162.             InstallMenuItems,
  163.             HandleMenuEvent,
  164.             HandleMouseMotionStart,
  165.             HandleMouseMotionEnd,
  166.             HandleMouseMotionLBDown,
  167.             HandleMouseClick,
  168.             MoveSelectionToFront,
  169.             MoveSelectionToBack,
  170.             PasteSelection,
  171.             ReadKindInfo,
  172.             WriteKindInfo,
  173.             GetContentObjectFromObjType,
  174.             DrawContents,
  175. #ifdef _Scriptable_GP_
  176.             AcquireExtension,
  177.             HandleEvent,
  178. #endif
  179.             WriteIconToSU;
  180.  
  181.         releaseorder:
  182.             HandleRefresh,
  183. #ifdef __PRIVATE__
  184.             Reset,
  185.             AddIntrinsic,
  186.             UpdateIntrinsic;
  187. #else
  188.             dummy1,
  189.             dummy2,
  190.             dummy3;
  191. #endif  // __PRIVATE__
  192.  
  193.         majorversion = 1;
  194.         minorversion = 2;
  195.  
  196.         passthru C_xih =
  197.             "#define VARIABLE_MACROS"
  198.             "#define METHOD_MACROS" ;
  199.  
  200.         // Display related variables
  201.         ODCanvas        fCanvas;
  202.         ODFacet         fFacet;
  203.  
  204.         // General public variables
  205.         ODMenuBar       fMenuBar;               // Cache Base Menubar
  206.         ODSession       fSession;               // Cache Session pointer
  207.         ODPart          fPartWrapper;
  208.  
  209.         // Private variables
  210. #ifdef __PRIVATE__
  211.         ODULong         fAction;                // local var to track current action
  212.         ODActionType    fActionType;            // local var to track current action type
  213.         ODPoint         fPt;                    // local var to keep a point buffer
  214.         ContentObject   fCurrObj;               // local var to track current object in progress
  215.         COType          fCurrObjType;           // local var to track type of current object in progress
  216.         ODShape         fCurrShape,fTempShape;  // local vars to keep shape buffers
  217.         ODRect          fBBox;                  // local var to track a figure's bounding box
  218. #endif  // __PRIVATE__
  219.  
  220.     };  // end implementation section
  221.  
  222. #endif  // __SOMIDL__
  223.  
  224. };      // end interface definition
  225.  
  226.  
  227. // ******************************************************************
  228.  
  229. #ifndef _Scriptable_GP_
  230. interface M_GrafPart : M_BaseContainer
  231. #else
  232. interface M_ScriptableGraphPart : M_ScriptableBaseContainer
  233. #endif
  234.  
  235. {
  236.  
  237. #ifdef __SOMIDL__
  238.    implementation
  239.    {
  240.  
  241. #ifndef _Scriptable_GP_
  242.        functionprefix = M_GrafPart;
  243. #else
  244.        functionprefix = M_ScriptableGraphPart ;
  245. #endif
  246.  
  247.        override:
  248.            clsGetODPartHandlerName,
  249.            clsGetODPartHandlerDisplayName,
  250.            clsGetODPartKinds,
  251.            clsGetOLE2ClassId,
  252.            clsGetWindowsIconFileName;
  253.    };
  254.  
  255. #endif  // _SOMIDL__
  256. };
  257.  
  258.  
  259.  
  260.  
  261. #endif  // _GRAFPART_
  262.  
  263. // end of file  *****************************************************
  264.