home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 3.3 KB | 111 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FormView.h
- // Release Version: $ ODF 1 $
- //
- // Author: Laurent Delamare
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FORMVIEW_H
- #define FORMVIEW_H
-
- #ifndef DEFINES_K
- #include "Defines.k"
- #endif
-
- // ----- Part Layer -----
-
- #ifndef FWSVIEW_H
- #include "FWSView.h"
- #endif
-
- //========================================================================================
- // Forward Declaration
- //========================================================================================
-
- class CFormPart;
- class FW_CViewContext;
- class FW_CMouseEvent;
- class FW_CRadioCluster;
- class FW_CListBox;
-
- //========================================================================================
- // CFormView
- //========================================================================================
- // Implementation of a content view drawing a background picture
-
- class CFormView : public FW_CSuperView
- {
- public:
- FW_DECLARE_CLASS
-
- public:
- CFormView(Environment *ev,
- FW_CSuperView* container,
- const FW_CRect& bounds,
- const FW_CPoint& extent);
- virtual ~ CFormView();
-
- private:
- CFormView(Environment *ev);
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- public:
- virtual void Draw(Environment *ev, ODFacet* odFacet, ODShape* invalidShape);
- virtual void AdjustToNewLayout(Environment *ev, const FW_CPoint& oldExtent,
- const FW_CPoint& newExtent, FW_Boolean redraw);
-
- virtual FW_Boolean DoMouseDown(Environment* ev, const FW_CMouseEvent& theMouseEvent);
-
- virtual void PostCreateViewFromStream(Environment* ev);
-
- virtual void ActivateTarget(Environment* ev, FW_Boolean tabSelection);
-
- // ----- Archiving -----
- 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);
-
- //----------------------------------------------------------------------------------------
- // New API
- void CenterInFrame(Environment* ev, FW_CPoint& size, FW_Boolean redraw);
- void CreateOwnSubViews(Environment* ev);
-
- void SwitchForm(Environment* ev);
- void DrawUserData(Environment *ev, FW_CViewContext& vc);
- void ResetData(Environment *ev);
-
- //----------------------------------------------------------------------------------------
- // Private data
- private:
- FW_Boolean fFirstFormOn; // switch between 2 kind of forms
- FW_CRadioCluster* fRadioClusters[kNumRadioClusters];
- };
-
- //========================================================================================
- // class CMouseUpBehavior
- //========================================================================================
- // See comments in .cpp file
-
- class CMouseUpBehavior : public FW_MEventHandler
- {
- public:
- FW_DECLARE_AUTO(CMouseUpBehavior)
-
- CMouseUpBehavior(Environment* ev, FW_CListBox* listBox);
- virtual ~CMouseUpBehavior();
-
- public:
- virtual FW_Boolean DoMouseUp(Environment* ev, const FW_CMouseEvent& theMouseEvent);
-
- private:
- FW_CListBox* fListBox;
- };
-
- #endif
-