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 / Tools & Goodies / IntlTest / Sources / Dialogs.h < prev    next >
Encoding:
Text File  |  1996-09-12  |  4.2 KB  |  156 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Dialogs.h
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Author:                Mary Boetcher
  7. //
  8. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef DIALOGS_H
  13. #define DIALOGS_H
  14.  
  15. // ----- Framework Includes -----
  16.  
  17. #ifndef FWFRAME_H
  18. #include "FWFrame.h"
  19. #endif
  20.  
  21. #ifndef FWEVENT_H
  22. #include "FWEvent.h"
  23. #endif
  24.  
  25. #ifndef FWDIALOG_H
  26. #include "FWDialog.h"
  27. #endif
  28.  
  29. //==============================================================================
  30. // Forward Declarations
  31. //==============================================================================
  32.  
  33. class CIntlTestPart;
  34. class CMyEditView;
  35. class FW_CStaticText;
  36.  
  37. //==============================================================================
  38. // class COpTestDialogFrame
  39. //==============================================================================
  40.  
  41. class COpTestDialogFrame : public FW_CDialogFrame
  42. {
  43.   public:
  44.     FW_DECLARE_AUTO(COpTestDialogFrame)
  45.  
  46.     COpTestDialogFrame(Environment* ev, 
  47.                 ODFrame* odFrame, 
  48.                 FW_CPresentation* presentation, 
  49.                 CIntlTestPart* part);
  50.  
  51.     virtual ~COpTestDialogFrame();
  52.  
  53.   public:    
  54.     // ---- FW_CDialogFrame API
  55.     virtual void         HandleNotification(Environment* ev, const FW_CNotification& notification);
  56.  
  57.     // ----- FW_CView & FW_CFrame API
  58.     virtual void         PostCreateViewFromStream(Environment* ev);
  59.   
  60.     // -----New API
  61.     void                 Initialize(Environment* ev, CMyEditView* editView);
  62.  
  63.     // ----- Private data
  64.   private:
  65.       CIntlTestPart*         fTestPart;
  66.     FW_CString            fTargetString;
  67.     FW_Boolean             fIsJapanese;
  68.     FW_CStaticText*        fResultView;        // static text where result is displayed
  69. };
  70.  
  71. //==============================================================================
  72. // class CReaderTestDialogFrame
  73. //==============================================================================
  74.  
  75. class CReaderTestDialogFrame : public FW_CDialogFrame
  76. {
  77.   public:
  78.     FW_DECLARE_AUTO(CReaderTestDialogFrame)
  79.  
  80.     CReaderTestDialogFrame(Environment* ev, 
  81.                 ODFrame* odFrame, 
  82.                 FW_CPresentation* presentation, 
  83.                 CIntlTestPart* part);
  84.  
  85.     virtual ~CReaderTestDialogFrame();
  86.  
  87.   public:    
  88.     // ---- FW_CDialogFrame API
  89.     virtual void         HandleNotification(Environment* ev, const FW_CNotification& notification);
  90.  
  91.     // ----- FW_CView & FW_CFrame API
  92.     virtual void         PostCreateViewFromStream(Environment* ev);
  93.   
  94.     // -----New API
  95.     void                 Initialize(Environment* ev, CMyEditView* editView);
  96.  
  97.   private:
  98.     void ClearResultViews(Environment* ev);
  99.     void UpdateDisplay(Environment* ev, FW_LChar ch);
  100.  
  101.     void GetCharacterAndAdvanceReader(Environment* ev);
  102.     void BackupReaderAndGetCharacter(Environment* ev);
  103.     void AdvanceReader(Environment* ev);
  104.     void BackupReader(Environment* ev);
  105.     void PeekCharReader(Environment* ev);
  106.  
  107.     // ----- Private data
  108.   private:
  109.       CIntlTestPart*         fTestPart;
  110.     FW_CString            fTargetString;
  111.     FW_Boolean             fIsJapanese;
  112.     FW_CStaticText*        fCharacterView;        // static text where character is displayed
  113.     FW_CStaticText*        fPositionView;        // static text where byte position is displayed
  114.     FW_CStringReader*    fReader;
  115.     FW_ByteCount        fBytePosition;
  116. };
  117.  
  118. //==============================================================================
  119. // class CNumberTestDialogFrame
  120. //==============================================================================
  121.  
  122. class CNumberTestDialogFrame : public FW_CDialogFrame
  123. {
  124.   public:
  125.     FW_DECLARE_AUTO(CNumberTestDialogFrame)
  126.  
  127.     CNumberTestDialogFrame(Environment* ev, 
  128.                 ODFrame* odFrame, 
  129.                 FW_CPresentation* presentation, 
  130.                 CIntlTestPart* part);
  131.  
  132.     virtual ~CNumberTestDialogFrame();
  133.  
  134.   public:    
  135.     // ---- FW_CDialogFrame API
  136.     virtual void         HandleNotification(Environment* ev, const FW_CNotification& notification);
  137.  
  138.     // ----- FW_CView & FW_CFrame API
  139.     virtual void         PostCreateViewFromStream(Environment* ev);
  140.   
  141.     // -----New API
  142.     void                 Initialize(Environment* ev, FW_Boolean testNewCode);
  143.  
  144.     void                SetInputFont(Environment* ev, FW_Boolean setJapanese);
  145.  
  146.     // ----- Private data
  147.   private:
  148.       CIntlTestPart*         fTestPart;
  149.     FW_CString            fTargetString;
  150.     FW_Boolean             fIsNewTest;
  151.     FW_Boolean             fIsJapanese;
  152.     FW_CStaticText*        fResultView;        // static text where result is displayed
  153. };
  154.  
  155.  
  156. #endif