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 / Developer University / DU Projects / Calc / Sources / Part.h < prev    next >
Encoding:
Text File  |  1996-08-22  |  1.7 KB  |  56 lines  |  [TEXT/CWIE]

  1. //    Release Version:    $ ODF 2 $
  2. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  3.  
  4. #ifndef PART_H
  5. #define PART_H
  6.  
  7. //=======================================================================
  8. // ----- Framework Includes -----
  9. #ifndef FWPART_H
  10. #include "FWPart.h"            // FW_CPart
  11. #endif
  12.  
  13. //=======================================================================
  14. class FW_CPresentation;
  15. class DevUniv_SFinance;
  16.  
  17. //=======================================================================
  18. typedef double CalcFloat;
  19.  
  20. //=======================================================================
  21. class CCalcPart : public FW_CPart {
  22. public:    
  23.     FW_DECLARE_AUTO(CCalcPart)
  24.     
  25.                             CCalcPart(ODPart* odPart);
  26.     virtual                 ~CCalcPart();
  27. // new methods
  28.     virtual void             MySetLoanAmount(CalcFloat borrowed);
  29.     virtual void             MySetAnnualInterestPercent(CalcFloat interest);
  30.     virtual void             MySetLoanYears(CalcFloat years);
  31.     virtual CalcFloat         MyComputePayment(Environment* ev);
  32. // overrides
  33. protected:
  34.     virtual void             Initialize(Environment* ev, 
  35.                                 ODStorageUnit* storageUnit, 
  36.                                 FW_Boolean fromStorage);
  37.     virtual FW_CContent*     NewPartContent(Environment* ev);
  38.     virtual FW_CFrame*        NewFrame(Environment* ev,
  39.                                  ODFrame* odFrame,
  40.                                  FW_CPresentation* presentation,
  41.                                  FW_Boolean fromStorage);
  42.     virtual FW_CWindow*        NewDocumentWindow(Environment* ev);
  43.     virtual FW_Handled        DoAbout(Environment* ev);
  44. // new members
  45. private:
  46.     FW_CPresentation*     fPresentation;
  47.     CalcFloat            fLoanAmount;
  48.     CalcFloat            fAnnualInterestPercent;
  49.     CalcFloat            fLoanYears;
  50.     CalcFloat            fMonthlyPayment;
  51.     DevUniv_SFinance*    fSOMFinanceCalc;
  52. };
  53.  
  54. //=======================================================================
  55. #endif
  56.