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 / ViewTester / Sources / Part.h < prev    next >
Encoding:
Text File  |  1996-09-17  |  2.3 KB  |  77 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Part.h
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef PART_H
  11. #define PART_H
  12.  
  13. // ----- Framework Includes -----
  14.  
  15. #ifndef FWPART_H
  16. #include "FWPart.h"
  17. #endif
  18.  
  19. //========================================================================================
  20. // Forward Class Desclarations
  21. //========================================================================================
  22.  
  23. class FW_CPresentation;
  24. class ODFrame;
  25. class CViewTesterFrame;
  26. class FW_CMenuEvent;
  27. class FW_CMenuBar;
  28.  
  29. //========================================================================================
  30. //    CLASS CViewTesterPart
  31. //========================================================================================
  32.  
  33. class CViewTesterPart : public FW_CPart
  34. {
  35. public:
  36.     FW_DECLARE_AUTO(CViewTesterPart)
  37.  
  38. //    Initialization/Destruction
  39. public:
  40.     CViewTesterPart(ODPart* odPart);
  41.     virtual ~CViewTesterPart();
  42.  
  43.     virtual void Initialize(Environment* ev, ODStorageUnit* storageUnit, FW_Boolean fromStorage);
  44.     
  45. //    Inherited API
  46. public:
  47.     virtual FW_CContent*     NewPartContent(Environment* ev);
  48.     virtual FW_CFrame*         NewFrame(Environment* ev,
  49.                                     ODFrame* odFrame, 
  50.                                     FW_CPresentation* presentation,
  51.                                     FW_Boolean fromStorage);
  52.     virtual FW_Handled         DoMenu(Environment* ev, const FW_CMenuEvent& theMenuEvent);
  53.     virtual FW_Handled         DoAdjustMenus(Environment* ev, FW_CMenuBar* menuBar, FW_Boolean hasMenuFocus, FW_Boolean isRoot);
  54.     virtual FW_Handled         DoAbout(Environment* ev);
  55.  
  56. //    New API
  57.     void                    ChangeViews(Environment* ev, ODID viewID);
  58.     FW_Boolean                UsingMacApp() { return fUsingMacApp; };
  59.     ODID                    GetTestViewID() { return fViewID; };
  60.     void                    ResetTestFrame() { fViewTestFrame = 0; };
  61.     FW_Boolean                HasWarningsOn(Environment* ev);
  62.     void                    CheckForError(Environment* ev, FW_PlatformError error);
  63.     void                    OpenDialog(Environment* ev);
  64.  
  65. //    Private data
  66. private:
  67.     FW_CPresentation*        fMainPresentation;
  68.     FW_CPresentation*        fTestPresentation;
  69.     FW_CPresentation*        fDialogPresentation;
  70.     
  71.     CViewTesterFrame*        fViewTestFrame;
  72.     ODID                    fViewID;
  73.     FW_Boolean                fUsingMacApp;
  74. };
  75.  
  76. #endif
  77.