home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ibmodf.zip / SIMPLPRT.ZIP / SIMPLPRT.IDL < prev    next >
Text File  |  1995-04-13  |  6KB  |  224 lines

  1. #ifdef __PRIVATE__
  2. //#
  3. //#    File:        CntnrPrt.idl
  4. //#
  5. //#    Contains:    IDL description of Simple Part
  6. //#
  7. //#    Written by:    Jason Crawford
  8. //#
  9. //#    Copyright:    (c) 1994 by IBM Corp., all rights reserved.
  10. //#
  11. //#    Change History (most recent first):
  12. //#
  13. //#         <1>      7/6/94    jlc        first checked in
  14. //#
  15. //#    To Do:
  16. //#
  17. #else
  18. //#    Copyright:    (c) 1993-1994 by IBM Corp., all rights reserved.
  19. #endif
  20.  
  21.  
  22. #ifndef _SIMPLPRT_
  23. #define _SIMPLPRT_
  24.  
  25. #ifndef _PART_
  26. #include "Part.idl"
  27. #endif
  28.  
  29. // Next three lines added - mcs aj
  30. #ifndef _ODTYPESM_
  31. #include "ODTypesM.idl"
  32. #endif
  33.  
  34. interface ODWindow;
  35. interface ODFocusSet;
  36. interface ODSemanticInterface;
  37.  
  38.    
  39. //=====================================================================================
  40. // Implementation Types
  41. //=====================================================================================
  42.  
  43. typedef somToken ODxOrderedCollection;
  44. typedef somToken Proxy;
  45.    //@jlc hack to get this to pass through idl compile without asking too many questions.
  46.    typedef long PRNINFO;
  47.    // typedef long MRESULT;
  48.    typedef long HPS;
  49.    typedef long HDC;
  50.    //typedef long RECTL;
  51.  
  52.  
  53. typedef somToken RGBColor;
  54.  
  55. interface SimplePart : ODPart
  56. {
  57.  
  58.     ODSemanticInterface GetSemanticInterface();
  59.  
  60.     void CommonInitSimplePart();
  61.         ODBoolean HandleMouseDown( in ODFacet facet,
  62.                        in ODPoint where,
  63.                        in ODEventData event);
  64.         void MoveResize( in ODFacet facet, in Proxy* selection, in ODSLong fs );
  65.         ODBoolean HandleMouseDownEdgeResize(in ODFacet facet, in Proxy* selection, in POINTL mouse);
  66.         ODBoolean HandleMouseDownCornerResize(in ODFacet facet, in Proxy* selection, in POINTL mouse);
  67.         ODBoolean HandleKeyDown(in ODFrame focusFrame, in ODEventData event);
  68.            ODBoolean HandleMouseMove( in ODFacet facet,
  69.                                        in ODPoint where,
  70.                                        in ODEventData event);
  71.  
  72.     void ActivateFrame(in ODFrame frame);
  73.     void DeActivateFrame(in ODFrame frame);
  74.     void ActivatingWindow(in ODFrame frame);
  75.     void DeActivatingWindow(in ODFrame frame);
  76.  
  77.         void UserSetBGColor(in ODFrame frame, in RGBColor whichColor);
  78.         void SetBGColor(in ODFrame aFrame, in ODUShort whichColor);
  79.     ODWindow CreateWindow(in ODFrame sourceFrame);
  80.  
  81.         ODBoolean HandleMenuEvent(in ODFrame focusFrame, in ODEventData event);
  82.         void SetGrafPortOrigin(in ODFacet facet);
  83.         RGBColor GetDefaultColor( );
  84.         void SetDefaultColor( in RGBColor color );
  85.         void Activate( in ODFacet facet );
  86.  
  87. #ifdef __SOMIDL__
  88.     implementation
  89.     {
  90.                 functionprefix = SimplePart;
  91.         majorversion = 1;
  92.         minorversion = 0;
  93.         
  94.     releaseorder:
  95.         GetSemanticInterface,
  96.         CommonInitSimplePart,
  97.             HandleMouseDown,
  98.                 MoveResize,
  99.         HandleMouseDownDrag,
  100.         HandleMouseDownEdgeResize,
  101.         HandleMouseDownCornerResize,
  102.         HandleKeyDown,
  103.         HandleMenuEvent,
  104.                 HandleMouseMove,
  105.             ActivateFrame,
  106.         DeActivateFrame,
  107.         ActivatingWindow,
  108.         DeActivatingWindow,
  109.         SetBGColor,
  110.         UserSetBGColor,
  111.         SetGrafPortOrigin,
  112.             CreateWindow,
  113.                 GetDefaultColor,
  114.                 SetDefaultColor,
  115.                 Activate
  116.                         ;
  117.  
  118.     override:
  119.         somInit,
  120.         somUninit,
  121.         FulfillPromise,
  122.         DropCompleted,
  123.         DragEnter,
  124.         DragWithin,
  125.         DragLeave,
  126.         Drop,
  127.         ContainingPartPropertiesChanged,
  128.         GetContainingPartProperties,
  129.         RevealFrame,
  130.         EmbeddedFrameSpec,
  131.         CreateEmbeddedFramesIterator,
  132.         AddDisplayFrame,
  133.         AttachSourceFrame,
  134.         RemoveDisplayFrame,
  135.         CloseDisplayFrame,
  136.         FrameShapeChanged,
  137.         ViewTypeChanged,
  138.         PresentationChanged,
  139.         SequenceChanged,
  140.         WritePartInfo,
  141.         ReadPartInfo,
  142.         Open,
  143.         RequestEmbeddedFrame,
  144.         RemoveEmbeddedFrame,
  145.         RequestFrameShape,
  146.         UsedShapeChanged,
  147.         AdjustBorderShape,
  148.         FacetAdded,
  149.         FacetRemoved,
  150.         CanvasChanged,
  151.         GeometryChanged,
  152.         Draw,
  153.         CanvasUpdated,
  154.         HighlightChanged,
  155.         CreateLink,
  156.         LinkUpdated,
  157.         RevealLink,
  158.         EmbeddedFrameChanged,
  159.         LinkStatusChanged,
  160.         BeginRelinquishFocus,
  161.         CommitRelinquishFocus,
  162.         AbortRelinquishFocus,
  163.         FocusAcquired,
  164.         FocusLost,
  165.         CloneInto,
  166.         ExternalizeKinds,
  167.         Externalize,
  168.         ChangeKind,
  169.         HandleEvent,
  170.         HandleEventInEmbedded,
  171.         MouseEnter,
  172.         MouseWithin,
  173.         MouseLeave,
  174.         AdjustMenus,
  175.         UndoAction,
  176.         RedoAction,
  177.         DisposeActionState,
  178.         WriteActionState,
  179.         ReadActionState,
  180.         InitPart,
  181.         InitPartFromStorage,
  182.         Release;
  183.  
  184.  
  185.         passthru C_xh = ""
  186.             "class ODFrame ;"
  187.             "class ODTransform ;"
  188.                            "struct Proxy;"
  189.                            "struct PRNINFO;";
  190.                            passthru C_xh_after = "typedef long RGBColor;";
  191.         passthru C_xih = "class ODxOrderedCollection;"
  192.                 ;
  193.  
  194.     // instance variables
  195.    //        ODxOrderedCollection*    fDisplayFrames;
  196.              ODID                fWindowID;            // ID of View As Window window
  197.              
  198.              ODULong            fFrameGroupIDCounter;
  199.              POINTL            fDragStart;
  200.              
  201.              RGBColor            fDefaultColor; // Initial background color of all display frames
  202.              ODxOrderedCollection*    fContents;
  203.  
  204.              ODFocusSet         fFocusSet;
  205.              ODTypeToken        fSelectionFocus;
  206.              ODTypeToken        fMenuFocus;
  207.              ODTypeToken        fKeyFocus;
  208.              
  209.              ODSemanticInterface    fSemtIntf;
  210.  
  211.              ODSession            fSession;
  212.  
  213.              ODStorageUnit              fTestDrawSU;
  214.                 HPS               hpsMem;
  215.                 HDC               hdcMem;
  216.              
  217.                 ODPoint           mouseStart;   //dwf
  218.  
  219.     };
  220. #endif
  221. };
  222.  
  223. #endif    // _SIMPLPRT_
  224.