home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12ort2.exe / pkg / en_us / iodsimpl.odz / iodsimpl.idl < prev    next >
Text File  |  1997-04-02  |  9KB  |  267 lines

  1. /* @(#)Z 1.15 com/src/samples/simple/iodsimpl.idl, odsimplepart, od96os2, odos29712d 97/03/21 17:45:27 (97/01/29 18:29:24) */
  2. //#====START_GENERATED_PROLOG======================================
  3. //#
  4. //#
  5. //#   COMPONENT_NAME: odsamples
  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. #ifdef __PRIVATE__
  29. //#
  30. //#     File:           SimplPrt.idl
  31. //#
  32. //#     Contains:       IDL description of Simple Part
  33. //#
  34. //#     Written by:     Jason Crawford
  35. //#
  36. //#     Copyright:      (c) 1994 by IBM Corp., all rights reserved.
  37. //#
  38. #else
  39. //#     Copyright:      (c) 1996 by IBM Corp., all rights reserved.
  40. #endif
  41.  
  42.  
  43. #ifndef _SIMPLPRT_
  44. #define _SIMPLPRT_
  45. #ifndef _PART_
  46.  
  47. #include "Part.idl"
  48. #endif
  49.  
  50. typedef somToken HDraw;
  51. typedef somToken HIconView;
  52. typedef somToken HThumbView;
  53. typedef somToken HResModule;
  54. typedef somToken ViewTypeEnum;
  55. typedef somToken PartInfoRec;
  56.  
  57. interface ODWindow;
  58. interface ODSession;
  59. interface ODFocusSet;
  60. interface M_SimplePart;
  61. interface ODMenuBar;
  62. interface ODPopup;
  63. interface IODLinkedList;
  64.  
  65. interface SimplePart : ODPart
  66. {
  67.         void CommonInit(in ODPart partWrapper);
  68.         void ActivateFrame(in ODFrame frame);
  69.         ODWindow  MakeWindow(in ODFrame frame);
  70. #ifdef __PRIVATE__
  71.         void ActivatingWindow(in ODFrame frame);
  72.         void DeActivatingWindow(in ODFrame frame);
  73. #endif
  74.         void Activate( in ODFacet facet );
  75.         ODBoolean HandleMenuEvent(in ODFrame focusFrame, in ODEventData event);
  76.         void InstallMenus();
  77.         ODMenuBar GetMenuBar();
  78.         ODPopup GetPopupMenu();
  79.  
  80.         void SetViewTypeRect(in ViewTypeEnum viewType, inout ODRect rect);
  81.         void AdjustViewTypeShapes(in ODFrame frame);
  82.         void LoadIconsFromModule(in string moduleName, in long iconID);
  83.         void FreeResModule();
  84.         void CreateIcons();
  85.         void DrawIcon(in ODFacet facet, in ODShape invalidShape, in ViewTypeEnum viewType);
  86.         void DrawThumbnail(in ODFacet facet, in ODShape invalidShape);
  87.         void DrawFrame(in ODFacet facet, in ODShape invalidShape);
  88.         PartInfoRec * CreateFramePartInfo();
  89.         void DeleteFramePartInfo(in PartInfoRec *pInfo);
  90.         IODLinkedList GetDisplayFrames();
  91. #ifdef __PRIVATE__
  92.         ODBoolean DisplayPopupMenu(in ODEventData event, in ODFrame frame, in ODFacet facet, in ODEventInfo eventInfo);
  93. #endif
  94.         void DisplayInfoDialog(in string catalog,         // Catalog name
  95.                                in long  msgSet,           // Message set number
  96.                                in long infoTitle,         // Catalog msg id for dialog box title 
  97.                                in string defaultInfoTitle,// Default dialog box title
  98.                                in long infoMsg,           // Catalog msg id for information msg
  99.                                in string defaultInfoMsg); // Default information msg
  100.  
  101.         readonly attribute ODPart  fPartWrapper;
  102.  
  103. #ifdef __PRIVATE__
  104.         attribute HIconView  hSmallIcon;
  105.         attribute HIconView  hLargeIcon;
  106.         attribute HThumbView hThumbnail;
  107.         attribute HResModule hResModule;
  108.         attribute ODRect     lastFrameRect;
  109.         attribute ODBoolean  fInFrameNegotiation;
  110.         attribute ViewTypeEnum fPrevViewType;
  111. #endif
  112.  
  113. #ifdef __SOMIDL__
  114.         implementation
  115.         {
  116.                 functionprefix = SimplePart;
  117.                 metaclass     = M_SimplePart;
  118.                 majorversion = 1;
  119.                 minorversion = 0;
  120.                 dllname = "iodsimpl.dll";
  121.  
  122.         releaseorder:
  123.                CommonInit,
  124.                ActivateFrame,
  125.                ActivatingWindow,
  126.                DeActivatingWindow,
  127.                MakeWindow,
  128.                Activate,
  129.                HandleMenuEvent,
  130.                InstallMenus,
  131.                CreateFramePartInfo,
  132.                DeleteFramePartInfo,
  133.                GetDisplayFrames,
  134.                _get_fPartWrapper,
  135.                _get_hSmallIcon,
  136.                _set_hSmallIcon,
  137.                _get_hLargeIcon,
  138.                _set_hLargeIcon,
  139.                _get_hThumbnail,
  140.                _set_hThumbnail,
  141.                _get_hResModule,
  142.                _set_hResModule,
  143.                SetViewTypeRect,
  144.                AdjustViewTypeShapes,
  145.                LoadIconsFromModule,
  146.                FreeResModule,
  147.                CreateIcons,
  148.                DrawIcon,
  149.                DrawFrame,
  150.                GetMenuBar,
  151.                GetPopupMenu,
  152.                DrawThumbnail,
  153.                DisplayPopupMenu,
  154.                DisplayInfoDialog,
  155.                _get_lastFrameRect,
  156.                _set_lastFrameRect,
  157.                _get_fInFrameNegotiation,
  158.                _set_fInFrameNegotiation,
  159.                _get_fPrevViewType,
  160.                _set_fPrevViewType
  161.                ;
  162.  
  163.         override:
  164.                somInit,
  165.                somUninit,
  166.                FulfillPromise,
  167.                DropCompleted,
  168.                Drop,
  169.                ContainingPartPropertiesUpdated,
  170.                AcquireContainingPartProperties,
  171.                RevealFrame,
  172.                EmbeddedFrameSpec,
  173.                CreateEmbeddedFramesIterator,
  174.                DisplayFrameAdded,
  175.                DisplayFrameConnected,
  176.                AttachSourceFrame,
  177.                DisplayFrameRemoved,
  178.                DisplayFrameClosed,
  179.                FrameShapeChanged,
  180.                ViewTypeChanged,
  181.                PresentationChanged,
  182.                SequenceChanged,
  183.                WritePartInfo,
  184.                ReadPartInfo,
  185.                ClonePartInfo,
  186.                Open,
  187.                RequestEmbeddedFrame,
  188.                RemoveEmbeddedFrame,
  189.                RequestFrameShape,
  190.                UsedShapeChanged,
  191.                AdjustBorderShape,
  192.                FacetAdded,
  193.                FacetRemoved,
  194.                CanvasChanged,
  195.                GeometryChanged,
  196.                Draw,
  197.                CanvasUpdated,
  198.                HighlightChanged,
  199.                CreateLink,
  200.                LinkUpdated,
  201.                RevealLink,
  202.                EmbeddedFrameUpdated,
  203.                LinkStatusChanged,
  204.                BeginRelinquishFocus,
  205.                CommitRelinquishFocus,
  206.                AbortRelinquishFocus,
  207.                FocusAcquired,
  208.                FocusLost,
  209.                CloneInto,
  210.                ExternalizeKinds,
  211.                Externalize,
  212.                ChangeKind,
  213.                HandleEvent,
  214.                AdjustMenus,
  215.                UndoAction,
  216.                RedoAction,
  217.                DisposeActionState,
  218.                WriteActionState,
  219.                ReadActionState,
  220.                InitPart,
  221.                InitPartFromStorage,
  222.                Release,
  223.                HasExtension,
  224.                AcquireExtension,
  225.                ReleaseExtension;
  226.  
  227.         passthru C_xh = ""
  228.          "#include \"iodsimpl.h\""
  229.          ;
  230.  
  231.          // instance variables
  232.          ODID                       fWindowID;
  233.          ODSession                  fSession;
  234.  
  235.          IODLinkedList              fDisplayFrames;
  236.  
  237.          ODFocusSet                 fFocusSet;
  238.          ODTypeToken                fSelectionFocus;
  239.          ODTypeToken                fMenuFocus;
  240.          ODTypeToken                fKeyFocus;
  241.  
  242.          ODMenuBar                  fMenuBar;
  243.          ODPopup                    fPopup;
  244.          ODBoolean                  fIsInitialized;
  245.  
  246.         };
  247. #endif
  248. };
  249.  
  250. interface M_SimplePart : M_ODPart
  251. {
  252.  
  253. #ifdef __SOMIDL__
  254.   implementation
  255.   {
  256.     functionprefix = M_SimplePart;
  257.     override:
  258.       clsGetODPartHandlerName,
  259.       clsGetODPartHandlerDisplayName,
  260.       clsGetODPartKinds,
  261.       clsGetOLE2ClassId,
  262.       clsGetWindowsIconFileName;
  263.   };
  264. #endif
  265. };
  266. #endif  // _SIMPLPRT_
  267.