home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc / OpenDoc Development / Debugging Support / OpenDoc Source Code / DocShell / ShPrpAcc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-22  |  3.9 KB  |  159 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        ShPrpAcc.h
  3.  
  4.     Contains:    Interfaces to property accessor classes used with Object
  5.                 Support Library
  6.  
  7.     Owned by:    Eric House
  8.  
  9.     Copyright:    © 1993 - 1995 by Apple Computer, Inc., all rights reserved.
  10.  
  11.     Change History (most recent first):
  12.  
  13.          <4>     8/22/95    eeh        1230007: refbal-inspired cleanup
  14.          <3>     2/20/95    TÇ        #1210979 BB: 5-$ Bugs need to be evaluated
  15.                                     and removed from Shell
  16.          <2>     8/19/94    NP        1181622: Ownership fix.
  17.          <1>     6/30/94    TÇ        first checked in
  18.          <0>     6/29/94    SV        SOMverted
  19.          <7>     3/24/94    eeh        bug# 1151750: scripting support for
  20.                                     operations on draft
  21.          <6>      2/8/94    JA        Minor tweaks for CodeWarrior.
  22.          <5>     1/11/94    eeh        removed "frame" from objspec vocab
  23.          <4>    12/17/93    eeh        more tweaks....
  24.          <3>     12/9/93    eeh        new classes: ShellSelfPropAccessor and
  25.                                     ShellFramePropAccessor
  26.          <2>    11/15/93    eeh        added GetPropertyData and SetPropertyData
  27.          <1>    10/11/93    NP        first checked in
  28.  
  29.     To Do:
  30. */
  31.  
  32. #ifndef _SHPRPACC_
  33. #define _SHPRPACC_
  34.  
  35. #ifndef _PLFMDEF_
  36. #include "PlfmDef.h"
  37. #endif
  38.  
  39. //==============================================================================
  40. // Theory of Operation
  41. //==============================================================================
  42.  
  43. /*
  44.     These classes aid with the getting and setting of properties for
  45.     the callback routines for the Object Support Library. They encapulate the
  46.     information necessary to represent a property and to get and set the
  47.     property's value.
  48. */
  49.  
  50. //==============================================================================
  51. // Classes defined in this interface
  52. //==============================================================================
  53.  
  54. // class ShellWinPropAccessor;
  55.  
  56. //==============================================================================
  57. // Classes used by this interface
  58. //==============================================================================
  59.  
  60. class PropAccessor;
  61. class RealShell;
  62. //class ODWindow;
  63.  
  64. //==============================================================================
  65. // ShellWinPropAccessor
  66. //==============================================================================
  67.  
  68. #ifdef TO_BE_DELETED
  69. class ShellPropAccessor
  70. {
  71.     public:
  72.         ShellPropAccessor( DescType property, RealShell* shell ) ;
  73.  
  74.         virtual void GetPropertyData( AEDesc* result ) = 0;
  75.         virtual void SetPropertyData( AEDesc* data ) = 0;
  76.  
  77.         DescType    GetProperty();
  78.         RealShell*    GetShell() ;
  79.  
  80. protected :
  81.     DescType    fProperty;
  82.  
  83.   private:
  84.  
  85.     RealShell*    fShell;
  86. } ;
  87. #endif /* TO_BE_DELETED */
  88.  
  89. #ifdef TO_BE_DELETED
  90. class ShellSelfPropAccessor : public ShellPropAccessor
  91. {
  92.     public:
  93.         ShellSelfPropAccessor( DescType property, RealShell* shell ) ;
  94.  
  95.         void GetPropertyData( AEDesc* result ) ;
  96.         void SetPropertyData( AEDesc* data ) ;
  97. } ;
  98.  
  99. class ShellPartPropAccessor : public ShellPropAccessor
  100. {
  101.     public:
  102.         ShellPartPropAccessor( DescType property, RealShell* shell,
  103.                 ODFrame* frame) ;
  104.  
  105.         void GetPropertyData( AEDesc* result ) ;
  106.         void SetPropertyData( AEDesc* data ) ;
  107.  
  108.   private:
  109.     ODFrame* fFrame ;
  110. } ;
  111. #endif /* TO_BE_DELETED */
  112.  
  113. #ifdef TO_BE_DELETED
  114. class ShellFramePropAccessor : public ShellPropAccessor
  115. {
  116.     public:
  117.         ShellFramePropAccessor( DescType property, RealShell* shell,
  118.                 ODFrame* frame) ;
  119.  
  120.         void GetPropertyData( AEDesc* result ) ;
  121.         void SetPropertyData( AEDesc* data ) ;
  122.  
  123.   private:
  124.     ODFrame* fFrame ;
  125. } ;
  126. #endif // TO_BE_DELETED
  127.  
  128. #ifdef TO_BE_DELETED
  129. class ShellDraftPropAccessor : public ShellPropAccessor
  130. {
  131.     public:
  132.         ShellDraftPropAccessor( DescType property, RealShell* shell,
  133.                 ODDraft* draft ) ;
  134.  
  135.         void GetPropertyData( AEDesc* result ) ;
  136.         void SetPropertyData( AEDesc* data ) ;
  137.  
  138.   private:
  139.     ODDraft* fDraft ;
  140. } ;
  141.  
  142. class ShellWinPropAccessor : public ShellPropAccessor
  143. {
  144.   public:
  145.  
  146.     ShellWinPropAccessor(DescType property, RealShell* shell, ODWindow* window);
  147.  
  148.     void GetName(StringPtr name);
  149.         // Caller must allocate storage
  150.  
  151.     void GetPropertyData( AEDesc* result ) ;
  152.     void SetPropertyData( AEDesc* data ) ;
  153.  
  154.   private:
  155.     ODWindow*    fWindow;
  156. };
  157. #endif /* TO_BE_DELETED */
  158.  
  159. #endif // _SHPRPACC_