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 / OS / FWODMisc / FWSUUtil.h < prev    next >
Encoding:
Text File  |  1996-09-17  |  3.3 KB  |  113 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWSUUtil.h
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWSUUTIL_H
  11. #define FWSUUTIL_H
  12.  
  13. #ifndef _STORUTIL_
  14. #include <StorUtil.h>
  15. #endif
  16.  
  17. // ----- OpenDoc Includes -----
  18.  
  19. #ifndef FWODTYPS_H
  20. #include "FWODTyps.h"
  21. #endif
  22.  
  23. #ifndef SOM_ODRefCntObject_xh
  24. #include <RefCtObj.xh>
  25. #endif
  26.  
  27. //========================================================================================
  28. //    Forward Declarations
  29. //========================================================================================
  30.  
  31. class ODShape;
  32. class ODStorageUnit;
  33. class ODFrame;
  34.  
  35. class FW_CFrame;
  36. class FW_CPoint;
  37. class FW_CRect;
  38.  
  39. //========================================================================================
  40. //    Storage Utilities
  41. //========================================================================================
  42.  
  43. FW_Boolean FW_SUExistsThenFocus(Environment* ev, 
  44.                                 ODStorageUnit* su, 
  45.                                 ODPropertyName prop,
  46.                                 ODValueType val);
  47. void FW_SUForceFocus(Environment* ev, 
  48.                                 ODStorageUnit* su, 
  49.                                 ODPropertyName prop, 
  50.                                 ODValueType val);
  51. void FW_SUAddPropValue(Environment* ev, 
  52.                                 ODStorageUnit* su, 
  53.                                 ODPropertyName prop, 
  54.                                 ODValueType val);
  55. void FW_SURemoveProperty(Environment* ev, 
  56.                                 ODStorageUnit* su, 
  57.                                 ODPropertyName prop);
  58. void FW_SURemoveValue(Environment* ev, 
  59.                                 ODStorageUnit* su, 
  60.                                 ODPropertyName prop, 
  61.                                 ODValueType val);
  62. void FW_SUClearValue(Environment* ev, 
  63.                                 ODStorageUnit* storageUnit, 
  64.                                 ODPropertyName prop, 
  65.                                 ODValueType val);
  66. void FW_SUDeleteEndOfFocusedValue(Environment* ev, 
  67.                                 ODStorageUnit* storageUnit);
  68.  
  69. #ifdef FW_BUILD_MAC
  70. FW_Boolean FW_MacSUReadHFSFlavor(Environment* ev, 
  71.                                 ODStorageUnit* su, 
  72.                                 ODPropertyName prop,
  73.                                 HFSFlavor& flavor);
  74. #endif
  75.  
  76. //========================================================================================
  77. //    Global Inline Methods
  78. //========================================================================================
  79.  
  80. //----------------------------------------------------------------------------------------
  81. // FW_SUForceFocus
  82. //----------------------------------------------------------------------------------------
  83. inline void FW_SUForceFocus(Environment* ev, 
  84.                             ODStorageUnit* su, 
  85.                             ODPropertyName prop, 
  86.                             ODValueType val)
  87. {
  88.     ODSUForceFocus(ev, su, prop, val);
  89. }
  90.  
  91. //----------------------------------------------------------------------------------------
  92. // FW_SUExistsThenFocus
  93. //----------------------------------------------------------------------------------------
  94. inline FW_Boolean FW_SUExistsThenFocus(Environment* ev, 
  95.                                         ODStorageUnit* su, 
  96.                                         ODPropertyName prop, 
  97.                                         ODValueType val)
  98. {
  99.     return ODSUExistsThenFocus(ev, su, prop, val);
  100. }
  101.  
  102. //----------------------------------------------------------------------------------------
  103. // FW_SURemoveProperty
  104. //----------------------------------------------------------------------------------------
  105. inline void FW_SURemoveProperty(Environment* ev, 
  106.                                 ODStorageUnit* su, 
  107.                                 ODPropertyName prop)
  108. {
  109.     ODSURemoveProperty(ev, su, prop);
  110. }
  111.  
  112. #endif
  113.