home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12osp1.exe / pkg / ja_JP / ioddynam.odz / ioddynam.idl < prev    next >
Text File  |  1997-04-02  |  13KB  |  320 lines

  1. //#====START_GENERATED_PROLOG======================================
  2. //#
  3. //#
  4. //#   COMPONENT_NAME: oddynamicpart
  5. //#
  6. //#   CLASSES: none
  7. //#
  8. //#   ORIGINS: 82,27
  9. //#
  10. //#
  11. //#   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  12. //#   All Rights Reserved
  13. //#   Licensed Materials - Property of IBM
  14. //#   US Government Users Restricted Rights - Use, duplication or
  15. //#   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  16. //#
  17. //#   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  18. //#   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  19. //#   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  20. //#   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  21. //#   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  22. //#   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  23. //#   OR PERFORMANCE OF THIS SOFTWARE.
  24. //#
  25. //#====END_GENERATED_PROLOG========================================
  26. //#
  27. // @(#) 1.18 com/src/samples/dynamicp/ioddynam.idl, oddynamicpart, od96os2, odos29712d 2/18/97 13:54:38 [3/21/97 17:45:25]
  28.  
  29. #ifdef __PRIVATE__
  30. //#
  31. //#     File:           ioddynam.idl
  32. //#
  33. //#     Contains:       IDL description of sample Dynamic Part
  34. //#
  35. //#
  36. #endif
  37.  
  38.  
  39. #ifndef _DYNAMICPART_
  40. #define _DYNAMICPART_
  41.  
  42. #ifndef _SIMPLPART_
  43. #include "iodsimpl.idl"
  44. #include "oddsconn.idl"
  45. #endif
  46.  
  47. #ifdef __PRIVATE__
  48.    typedef somToken IDynamicLinkLibrary;
  49.    typedef somToken IdColor;
  50.    typedef somToken IFont;
  51.    typedef somToken IGString;
  52.    typedef somToken IGBitmap;
  53.    typedef somToken ITimer;
  54. #endif  // __PRIVATE__
  55.  
  56. interface M_DynamicPart;
  57. interface ODMenuBar;
  58. interface ODPopup;
  59. interface ODSession;
  60. interface ODxOrderedCollection;
  61. interface ODxOrderedCollectionIterator;
  62. interface ODStorageUnit;
  63.  
  64. interface ScriptableDynamicPartScrExt ;
  65.  
  66. //=====================================================================================
  67. // Implementation Types
  68. //=====================================================================================
  69.  
  70.  
  71. interface DynamicPart :   ODDSConnection, SimplePart
  72. {
  73.     attribute ODFloat    xRotAngle;        // current angle of rotation
  74.     attribute ODFloat    hShearAngle;
  75.     attribute ODFloat    vShearAngle;
  76.     attribute ODFloat    xAngleDelta;      // angle delta in degrees
  77.     attribute ODBoolean  scrolling;        // are we scrolling?
  78.     attribute ODBoolean  xRotateActive;    // are we rotating?
  79.     attribute ODBoolean  hShearActive;     // are we changing horiz shear?
  80.     attribute ODBoolean  vShearActive;     // are we changing vert shear?
  81.     attribute ODBoolean  xRotateClockwise; // which way to rotate? (1=clockwise, 0=counterclockwise)
  82.     attribute ODBoolean  hShearRight;      // which way to shear?  (1=left,      0=right}
  83.     attribute ODBoolean  vShearUp;         // which way to shear?  (1=up,        0=down)
  84.  
  85.     void ScrollTicker();
  86.     void RotateContent(in ODFloat byAngle);
  87.     void SetInternalXform(in ODFrame frame);
  88.     void Reset();
  89.     void CloneContents(in ODStorageUnit toSU);
  90.  
  91. #ifdef __PRIVATE__
  92.     void UpdateTransformAngles(in ODFloat angleDelta);
  93.     void CalcNewShape(in ODFrame frame);
  94.     void CalcRotationFactors(out ODFloat rotSin,
  95.                              out ODFloat rotCos,
  96.                              out ODFloat hshTan,
  97.                              out ODFloat vshTan);
  98.     void AdjustSize(in ODFrame frame, in ODFacet facet);
  99. #endif // __PRIVATE__
  100.  
  101.  
  102. #ifdef __SOMIDL__
  103.         implementation
  104.         {
  105.                 functionprefix = DynamicPart__;
  106.                 metaclass     = M_DynamicPart;
  107.                 dllname= "ioddynam.dll";
  108.                 majorversion = 1;
  109.                 minorversion = 0;
  110.                 ODGuid = "{9874b1c0-00f8-11d0-b25e-08005a49d940}";
  111.                 ODevent = "DynamicPartEvent";
  112.  
  113.         releaseorder:
  114.                 ScrollTicker,
  115.                 RotateContent,
  116.                 SetInternalXform,
  117.                 Reset,
  118. #ifdef __PRIVATE__
  119.                 UpdateTransformAngles,
  120.                 CalcRotationFactors,
  121.                 CalcNewShape,
  122.                 AdjustSize,
  123. #else
  124.                 temp1,
  125.                 temp2,
  126.                 temp3,
  127.                 temp4,
  128. #endif // __PRIVATE__
  129.                 _get_xRotAngle,        _set_xRotAngle,
  130.                 _get_hShearAngle,      _set_hShearAngle,
  131.                 _get_vShearAngle,      _set_vShearAngle,
  132.                 _get_xAngleDelta,      _set_xAngleDelta,
  133.                 _get_scrolling,        _set_scrolling,
  134.                 _get_xRotateActive,    _set_xRotateActive,
  135.                 _get_hShearActive,     _set_hShearActive,
  136.                 _get_vShearActive,     _set_vShearActive,
  137.                 _get_xRotateClockwise, _set_xRotateClockwise,
  138.                 _get_hShearRight,      _set_hShearRight,
  139.                 _get_vShearUp,         _set_vShearUp,
  140.                 CloneContents
  141.                 ;
  142.  
  143.         xRotAngle:          noset;
  144.         hShearAngle:        noset;
  145.         vShearAngle:        noset;
  146.         scrolling:          noset;
  147.         xRotateActive:      noset;
  148.         hShearActive:       noset;
  149.         vShearActive:       noset;
  150.  
  151.         AdjustMenus:        override;
  152.         CloneInto:          override;
  153.         CommonInit:         override;
  154.         ContainingPartPropertiesUpdated: override;
  155.         Draw:               override;
  156.         Externalize:        override;
  157.         FacetAdded:         override;
  158.         FacetRemoved:       override;
  159.         FrameShapeChanged:  override;
  160.         HandleMenuEvent:    override;
  161.         InitPart:           override;
  162.         InitPartFromStorage:override;
  163.         InstallMenus:       override;
  164.         somDefaultInit:     override;
  165.         somDestruct:        override;
  166.         somDumpSelfInt:     override;
  167.         HasExtension:       override;
  168.         AcquireExtension:   override;
  169.         ReleaseExtension:   override;
  170.         ViewTypeChanged:    override;
  171.         CreateIcons:        override;
  172.  
  173.                 passthru C_xih = " "
  174.                                 "#define ODDEBUG"
  175.                                 "#define VARIABLE_MACROS"
  176.                                  "#ifndef _OS2_OD_GA_"
  177.                                  "  typedef unsigned long RGBColor;"
  178.                                  "#endif"
  179.                                  "class ODxOrderedCollection;"
  180.                                  "#include <icolor.hpp>"
  181.                                  "#include <ifont.hpp>"
  182.                                  "#include <igbitmap.hpp>"
  183.                                  "#include <igstring.hpp>"
  184.                                  "#include <ireslib.hpp>"
  185.                                  "#include <istring.hpp>"
  186.                                  "#include <itimer.hpp>"
  187.                 ;
  188.  
  189.                 passthru C_xih_after = ""
  190.                                       "// create a subclass of IColor that provides a
  191.                                       "// default constructor.
  192.                                       "class IdColor : public  IColor {"
  193.                                       "  public:"
  194.                                       "   IdColor() : IColor(IColor::black){};
  195.                                       "   IdColor(IColor::Color color) : IColor(color){};
  196.                                       "};"
  197.                 ;
  198.  
  199.  
  200.                 // Instance Variables
  201.  
  202.                 /////////////////////////////////////////////////////////
  203.                 // These instance variables are not persistent.  They are
  204.                 // re-created each time the part is loaded.
  205.                 /////////////////////////////////////////////////////////
  206.                 IDynamicLinkLibrary  *Resources;        // Pointer to DLL for reading resources.
  207.                 ODBoolean             fIsInitialized;   // Variable to see if part has been initialized
  208.                 ODMenuBar             fMenuBar;         // menu bar
  209.                 ODPopup               fPopup;           // popup menu
  210.                 ODSession             fSession;
  211.                 ODID                  fWindowID;        // ID of View As Window window
  212.                 ODBoolean             fDraftReadOnly;   // Set if draft is not writeable
  213.  
  214.                 ODPart  fPartWrapper;          // part wrapper //
  215.                 ODSLong facetCount;
  216.  
  217.                 ///////////////////////////////////////////
  218.                 // These instance variables are persistent.
  219.                 ///////////////////////////////////////////
  220.                 // dynamic part instance variables //
  221.                 ODSLong         scrollTimerRate;  // timer interval in milli-seconds
  222.                 ODSLong         rotateTimerRate;  // timer interval in milli-seconds
  223.                 ODSLong         JumpRate;         // number of pixels skipped each time interval
  224.                 ITimer         *scrollTimer;
  225.                 ITimer         *rotateTimer;
  226.  
  227.                 // layout instance variables //
  228.                 ODSLong         ScrollPos;        // Position of message in scroll bar.
  229.                 ODBoolean       fFrameNegotiated; // flag for initial frame size negotiation
  230.  
  231.                 // drawing instance variables //
  232.                 ODBoolean       customBackground; // is background color customized?
  233.                 IdColor         BackColor;        // background color for bottom half
  234.                 ODBoolean       customTextColor;  // is text color customized?
  235.                 IdColor         TextColor;        // foreground color
  236.                 IGString       *Message;          // scrolling message
  237.  
  238.                 // transform instance variables //
  239.              // made these attributes //
  240.              // ODFloat         xRotAngle;        // current angle of rotation
  241.              // ODFloat         hShearAngle;
  242.              // ODFloat         vShearAngle;
  243.              // ODFloat         xAngleDelta;      // angle delta in degrees
  244.              // ODBoolean       scrolling;        // are we scrolling?
  245.              // ODBoolean       xRotateActive;    // are we rotating?
  246.              // ODBoolean       hShearActive;     // are we changing horiz shear?
  247.              // ODBoolean       vShearActive;     // are we changing vert shear?
  248.              // ODBoolean       xRotateClockwise; // which way to rotate? (1=clockwise, 0=counterclockwise)
  249.              // ODBoolean       hShearRight;      // which way to shear?  (1=left,      0=right}
  250.              // ODBoolean       vShearUp;         // which way to shear?  (1=up,        0=down)
  251.  
  252.                 ///////////////////////////////////////////////////////////////////////
  253.                 // The following are used but are not persistent
  254.                 // because they can be calculated easily from the frame shape.
  255.                 ///////////////////////////////////////////////////////////////////////
  256.                 // drawing instance variables //
  257.                 ODBoolean       customFont;       // custom font, or use containers?
  258.                 IFont          *Font;             // font
  259.                 IGBitmap       *ODBitmap;         // bitmap to use for title
  260.  
  261.                 // Scripting instance variables //
  262.                 ODDSEventMgr                fEventMgr;
  263.                 ODGUID                      fEvtGuid;
  264.                 ScriptableDynamicPartScrExt fScriptExtension ;
  265.  
  266.            // Scripting Methods and Properties
  267.            xRotataAngle     :  ODid = 101;
  268.            hShareAngle      :  ODid = 103;
  269.            vShareAngle      :  ODid = 105;
  270.            xAngleDelta      :  ODid = 107;
  271.            scrolling        :  ODid = 109;
  272.            xRotateActive    :  ODid = 111;
  273.            hShearActive     :  ODid = 113;
  274.            vShearActive     :  ODid = 115;
  275.            xRotateClockwise :  ODid = 117;
  276.            hShearRight      :  ODid = 119;
  277.            vShearUp         :  ODid = 121;
  278.            Reset            :  ODid = 123;
  279.         }; // end implementation section
  280.  
  281.  
  282. #endif
  283. };
  284.  
  285.  
  286.  
  287.  
  288. interface M_DynamicPart : M_SimplePart
  289. {
  290.  
  291. #ifdef __SOMIDL__
  292.   implementation
  293.   {
  294.     functionprefix = M_DynamicPart__;
  295.     override:
  296.       clsGetODPartHandlerName,
  297.       clsGetODPartHandlerDisplayName,
  298.       clsGetODPartKinds,
  299.       clsGetOLE2ClassId,
  300.       clsGetWindowsIconFileName;
  301.   };
  302. #endif
  303. };
  304.  
  305.  
  306. interface DynamicPartEvent : SOMObject {
  307.    void PositionChange(in ODFloat rotate_ang, in ODFloat h_ang,
  308.                        in ODFloat v_ang);
  309. #ifdef __SOMIDL__
  310.    implementation {
  311.      ODevent;
  312.      releaseorder: PositionChange;
  313.      ODGuid = "{d3662880-267a-11d0-a5c3-0004ac3280dc}";
  314.      PositionChange:ODid = 200;
  315.    };
  316. #endif
  317.  
  318. };
  319. #endif  // _DYNAMICPART_
  320.