home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Framewrk / FWPart / FWUtil.h < prev    next >
Encoding:
Text File  |  1996-09-17  |  3.7 KB  |  93 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWUtil.h
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWUTIL_H
  11. #define FWUTIL_H
  12.  
  13. // ----- OpenDoc Includes -----
  14.  
  15. #ifndef FWODTYPS_H
  16. #include "FWODTyps.h"
  17. #endif
  18.  
  19. #ifndef SOM_ODRefCntObject_xh
  20. #include <RefCtObj.xh>
  21. #endif
  22.  
  23. //========================================================================================
  24. //    Forward Declarations
  25. //========================================================================================
  26.  
  27. class ODShape;
  28. class ODFrame;
  29.  
  30. class FW_CFrame;
  31. class FW_CPoint;
  32. class FW_CRect;
  33. class FW_CReadableStream;
  34.  
  35. //========================================================================================
  36. //    Streams Utilities
  37. //========================================================================================
  38.  
  39. ODValueType FW_ReadODValueTypeFromStream(Environment* ev, 
  40.                                 FW_CReadableStream& stream);
  41. ODTypeToken FW_ReadODTypeTokenFromStream(Environment* ev, 
  42.                                 FW_CReadableStream& stream);
  43.  
  44. //========================================================================================
  45. //    Clipboard Utilities
  46. //========================================================================================
  47.  
  48. //========================================================================================
  49. // utilities
  50. //========================================================================================
  51.  
  52. FW_Boolean FW_IsInLimbo(Environment* ev, ODFrame* frame);
  53.  
  54. //========================================================================================
  55. //    Coordinate conversion utilities
  56. //========================================================================================
  57.  
  58. void FW_ContentToFrame(Environment* ev, ODFrame* frame, ODShape* shape);
  59. void FW_FrameToContent(Environment* ev, ODFrame* frame, ODShape* shape);
  60. void FW_ContentToFrame(Environment* ev, ODFrame* frame, FW_CPoint& point);
  61. void FW_FrameToContent(Environment* ev, ODFrame* frame, FW_CPoint& point);
  62. void FW_ContentToFrame(Environment* ev, ODFrame* frame, FW_CRect& rect);
  63. void FW_FrameToContent(Environment* ev, ODFrame* frame, FW_CRect& rect);
  64.  
  65. void FW_ContentToWindow(Environment* ev, ODFacet* facet, ODShape* shape);
  66. void FW_WindowToContent(Environment* ev, ODFacet* facet, ODShape* shape);
  67. void FW_ContentToWindow(Environment* ev, ODFacet* facet, FW_CPoint& point);
  68. void FW_WindowToContent(Environment* ev, ODFacet* facet, FW_CPoint& point);
  69. void FW_ContentToWindow(Environment* ev, ODFacet* facet, FW_CRect& rect);
  70. void FW_WindowToContent(Environment* ev, ODFacet* facet, FW_CRect& rect);
  71.  
  72. void FW_FrameToWindow(Environment* ev, ODFacet* facet, ODShape* shape);
  73. void FW_WindowToFrame(Environment* ev, ODFacet* facet, ODShape* shape);
  74. void FW_FrameToWindow(Environment* ev, ODFacet* facet, FW_CPoint& point);
  75. void FW_WindowToFrame(Environment* ev, ODFacet* facet, FW_CPoint& point);
  76. void FW_FrameToWindow(Environment* ev, ODFacet* facet, FW_CRect& rect);
  77. void FW_WindowToFrame(Environment* ev, ODFacet* facet, FW_CRect& rect);
  78.  
  79. //========================================================================================
  80. //    Global Inline Methods
  81. //========================================================================================
  82.  
  83. //----------------------------------------------------------------------------------------
  84. // FW_ReleaseODObject
  85. //----------------------------------------------------------------------------------------
  86. inline void FW_ReleaseODObject(Environment* ev, ODRefCntObject* odObject)
  87. {
  88.     if (odObject)
  89.         odObject->Release(ev);
  90. }
  91.  
  92. #endif
  93.