home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / DU Folder / Calc / Sources / Include / CalcPrt.h < prev    next >
Encoding:
Text File  |  1995-10-10  |  1.7 KB  |  62 lines  |  [TEXT/MPS ]

  1. //    Copyright © 1995 Apple Computer, Inc. All rights reserved.
  2. //    Release Version:    $ 1.0 d11 $
  3.  
  4. #ifndef CALCPRT_H
  5. #define CALCPRT_H
  6.  
  7. //=======================================================================
  8. #ifndef _CALCDEF_
  9. #include "CalcDef.h"
  10. #endif
  11.  
  12. // ----- Framework Includes -----
  13. #ifndef FWPART_H
  14. #include "FWPart.h"            // FW_CPart
  15. #endif
  16.  
  17. // ----- Foundation Layer -----
  18. #ifndef FWSTDDEF_H
  19. #include <FWStdDef.h>        // ?
  20. #endif
  21.  
  22. //=======================================================================
  23. class FW_CLASS_ATTR FW_CPart;
  24. class FW_CLASS_ATTR FW_CString;
  25. class FW_CLASS_ATTR FW_CMenuBar;
  26. class FW_CLASS_ATTR FW_CMenuEvent;
  27. class FW_CLASS_ATTR FW_CPresentation;
  28. class FW_CLASS_ATTR    DevUniv_SFinance;
  29.  
  30. typedef double CalcFloat;
  31.  
  32. //=======================================================================
  33. class FW_CLASS_ATTR CCalcPart : public FW_CPart {
  34. public:
  35.                         CCalcPart(ODPart* odPart);
  36.     virtual             ~CCalcPart();
  37.     static const ODValueType     kPartKind;
  38.     static const ODValueType     kPartUserName;
  39. // new methods
  40.     virtual void         MySetLoanAmount(CalcFloat borrowed);
  41.     virtual void         MySetAnnualInterestPercent(CalcFloat interest);
  42.     virtual void         MySetLoanYears(CalcFloat years);
  43.     virtual CalcFloat     MyComputePayment(Environment* ev);
  44. // overrides
  45. protected:
  46.     virtual void         Initialize(Environment* ev);
  47.     virtual FW_CFrame*    NewFrame(Environment* ev,
  48.                                  ODFrame* odFrame,
  49.                                  FW_CPresentation* presentation,
  50.                                  FW_Boolean fromStorage);
  51. // new members
  52. private:
  53.     CalcFloat            fLoanAmount;
  54.     CalcFloat            fAnnualInterestPercent;
  55.     CalcFloat            fLoanYears;
  56.     CalcFloat            fMonthlyPayment;
  57.     DevUniv_SFinance*    fSOMFinanceCalc;
  58. };
  59.  
  60. //=======================================================================
  61. #endif
  62.