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 Development Framework / ODFDev / Form / Sources / Dialog.h < prev    next >
Encoding:
Text File  |  1996-08-16  |  3.2 KB  |  119 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Dialog.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Author:                Laurent Delamare
  7. //
  8. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef DIALOG_H
  13. #define DIALOG_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. #ifndef FWEDVIEW_H
  30. #include "FWEdView.h"
  31. #endif
  32.  
  33. // ----- Foundation Layer -----
  34.  
  35.  
  36. //==============================================================================
  37. // Forward Declarations
  38. //==============================================================================
  39.  
  40. class CFormPart;
  41. class CFormFrame;
  42.  
  43. //==============================================================================
  44. // class CPwdDialogFrame
  45. //==============================================================================
  46.  
  47. class CPwdDialogFrame : public FW_CDialogFrame
  48. {
  49.   public:
  50.     FW_DECLARE_AUTO(CPwdDialogFrame)
  51.  
  52.     CPwdDialogFrame(Environment* ev, 
  53.                 ODFrame* odFrame, 
  54.                 FW_CPresentation* presentation, 
  55.                 CFormPart* formPart,
  56.                 FW_ResourceId id = 0);
  57.  
  58.     virtual ~CPwdDialogFrame();
  59.  
  60.   public:    
  61.     // ---- FW_CDialogFrame API
  62.     virtual void         HandleNotification(Environment* ev, const FW_CNotification& notification);
  63.  
  64.     // ----- FW_CView & FW_CFrame API
  65. #ifdef FW_BUILD_MAC
  66.     virtual void         FacetAdded(Environment* ev, ODFacet* facet, unsigned short facetCount);
  67. #else
  68.     virtual void         Draw(Environment *ev, ODFacet* odFacet, ODShape* invalidShape);
  69. #endif
  70. //    virtual void        CreateSubViews(Environment* ev);
  71.     virtual void         PostCreateViewFromStream(Environment* ev);
  72.   
  73.     // -----New API
  74.     void                 Initialize(Environment* ev, CFormFrame* frame);
  75.     
  76.     // ----- Private data
  77.   private:
  78.       CFormFrame*         fFormFrame;  // pointer back to the main frame
  79. };
  80.  
  81. //==============================================================================
  82. // class CPwdEditView
  83. //==============================================================================
  84.  
  85. class CPwdEditView : public FW_CEditView
  86. {
  87.   public:
  88.     FW_DECLARE_CLASS
  89.     FW_DECLARE_AUTO(CPwdEditView)
  90.  
  91.     CPwdEditView(Environment* ev, 
  92.                 FW_CSuperView* container, 
  93.                 ODID  viewId,
  94.                 const FW_CRect& bounds);
  95.                 
  96.     CPwdEditView(Environment* ev); 
  97.     virtual ~CPwdEditView();
  98.     
  99.     // ----- FW_CEditView
  100.     virtual FW_Boolean     DoMenu (Environment* ev, const FW_CMenuEvent& event);
  101.     virtual FW_Boolean     DoCharKey (Environment* ev, const FW_CCharKeyEvent & event);
  102.     FW_CString            GetText (Environment * ev);
  103.     virtual void         ActivateTarget (Environment * ev, FW_Boolean tabSelection);
  104.  
  105.     // ----- Archiving -----
  106.     static void*        Create(FW_CReadableStream& stream, FW_ClassTypeConstant type);
  107.     static void            Destroy(void* object, FW_ClassTypeConstant type);
  108.     virtual void        Flatten(Environment* ev, FW_CWritableStream& stream) const;
  109.     virtual void        InitializeFromStream(Environment* ev, FW_CReadableStream& stream);
  110.  
  111.   private:
  112.     void                Initialize(Environment* ev, FW_CSuperView* container, const FW_CRect& bounds);
  113.  
  114.   private:
  115.       FW_CEditView*     fShadowTEd;
  116. };
  117.  
  118. #endif
  119.