home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 4.7 KB | 167 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Dialog.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef DIALOG_H
- #define DIALOG_H
-
- #ifndef FWFRAME_H
- #include "FWFrame.h"
- #endif
-
- #ifndef FWEVENT_H
- #include "FWEvent.h"
- #endif
-
- #ifndef FWDIALOG_H
- #include "FWDialog.h"
- #endif
-
- #ifndef FWEDVIEW_H
- #include "FWEdView.h"
- #endif
-
- #ifndef DEFINES_K
- #include "Defines.k"
- #endif
-
- #if FW_PPOB_VIEWS
- #include "FWPPobOb.h"
- #endif
-
- #if FW_MACAPP_VIEWS
- #include "FWMAObjs.h"
- #endif
-
- //==============================================================================
- // Forward Declarations
- //==============================================================================
-
- class CFormPart;
- class CFormFrame;
-
- //==============================================================================
- // class CPwdDialogFrame
- //==============================================================================
-
- class CPwdDialogFrame : public FW_CDialogFrame
- {
- public:
- FW_DECLARE_AUTO(CPwdDialogFrame)
-
- CPwdDialogFrame(Environment* ev,
- ODFrame* odFrame,
- FW_CPresentation* presentation,
- CFormPart* formPart);
-
- virtual ~CPwdDialogFrame();
-
- public:
- // ---- FW_CDialogFrame API
- virtual void HandleNotification(Environment* ev, const FW_CNotification& notification);
-
- // ----- FW_CView & FW_CFrame API
- #ifdef FW_BUILD_MAC
- virtual void FacetAdded(Environment* ev, ODFacet* facet, unsigned short facetCount);
- #else
- virtual void Draw(Environment *ev, ODFacet* odFacet, ODShape* invalidShape);
- #endif
- #if FW_PPOB_VIEWS || FW_MACAPP_VIEWS
- virtual void CreateSubViews(Environment* ev);
- #endif
- virtual void PostCreateViewFromStream(Environment* ev);
-
- // -----New API
- void Initialize(Environment* ev, CFormFrame* frame);
-
- // ----- Private data
- private:
- CFormFrame* fFormFrame; // pointer back to the main frame
- };
-
- //==============================================================================
- // class CPwdEditView
- //==============================================================================
-
- class CPwdEditView : public FW_CEditView
- {
- public:
- FW_DECLARE_CLASS
- FW_DECLARE_AUTO(CPwdEditView)
-
- CPwdEditView(Environment* ev,
- FW_CSuperView* container,
- const FW_CRect& bounds,
- ODID viewID);
-
- CPwdEditView(Environment* ev);
- virtual ~CPwdEditView();
-
- // ----- FW_CEditView
- virtual FW_Handled DoMenu (Environment* ev, const FW_CMenuEvent& event);
- virtual FW_Handled DoCharKey (Environment* ev, const FW_CCharKeyEvent & event);
- FW_CString GetText (Environment * ev);
- virtual void ActivateTarget (Environment * ev, FW_Boolean tabSelection);
-
- // ----- Archiving -----
- #if FW_ODFRC_VIEWS
- static void* Create(FW_CReadableStream& stream, FW_ClassTypeConstant type);
- static void Destroy(void* object, FW_ClassTypeConstant type);
- virtual void Flatten(Environment* ev, FW_CWritableStream& stream) const;
- virtual void InitializeFromStream(Environment* ev, FW_CReadableStream& stream);
- #endif
-
- private:
- void Initialize(Environment* ev, FW_CSuperView* container, const FW_CRect& bounds);
-
- private:
- FW_CEditView* fShadowTEd;
- };
-
- //========================================================================================
- // class CPPobPwdEditView
- //========================================================================================
- #if FW_PPOB_VIEWS
-
- // CPPobPwdEditView doesn't need to derive from FW_CPPobEditView because we are only
- // interested in the LPane fields.
- // (ODF's PPobReader will ignore extra fields if it finds a subclass of LPane)
-
- class CPPobPwdEditView : public FW_CPPobView
- {
- public:
- CPPobPwdEditView(Environment* ev, FW_CReadableStream& stream, long type);
-
- static void* Create(Environment* ev, FW_CReadableStream& stream, long type);
- virtual void CreateODFView(Environment* ev);
- };
-
- #endif // FW_PPOB_VIEWS
-
- //========================================================================================
- // class CMAPwdEditView
- //========================================================================================
- #if FW_MACAPP_VIEWS
-
- // We make CMAPwdEditView derive from FW_CMAEditText, so our TPwdEdit template in AdLib
- // must derive from TEditText (Unlike PowerPlant MacApp requires that all data be read
- // in the stream, even if we don't use it)
-
- class CMAPwdEditView : public FW_CMAEditText
- {
- public:
- CMAPwdEditView(ResType type);
-
- static FW_CMAObject* Create(ResType type);
- virtual FW_CView* CreateODFView(Environment* ev, FW_CSuperView* superview, FW_MReceiver* receiver);
- };
-
- #endif // FW_MACAPP_VIEWS
-
- #endif
-