home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ibmodf.zip / ODFRK.ZIP / OFORMP.HPP < prev    next >
Text File  |  1995-06-15  |  5KB  |  112 lines

  1. #ifndef _OFORMP_
  2. #define _OFORMP_
  3.  
  4. /*******************************************************************************
  5. * FILE NAME: oformp.hpp                                                        *
  6. *                                                                              *
  7. * DESCRIPTION:  see online documentation                                       *
  8. *                                                                              *
  9. * COPYRIGHT:                                                                   *
  10. *   Licensed Materials - Property of IBM                                       *
  11. *   (C) Copyright IBM Corporation 1994                                         *
  12. *   All Rights Reserved                                                        *
  13. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  14. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  15. *                                                                              *
  16. *******************************************************************************/
  17.  
  18. //To avoid "true, True, etc. already defined" error, put include of IBASE before any OD stuff
  19. #include <ivbase.hpp>    
  20.  
  21. #ifndef _SIMPLPRT_
  22. //#include <smartprt.hh>  aj back to simplprt for devcon7
  23. #include <simplprt.hh>
  24. #endif
  25.  
  26. #ifndef _ISET_
  27.   #include <iset.h>
  28. #endif
  29.  
  30. /*----------------------------------------------------------------------------  */
  31. /* Align classes on four byte boundary.                                         */
  32. /*----------------------------------------------------------------------------  */
  33. #pragma pack(4)
  34.  
  35. // Forward declarations for other classes:
  36. class IVBase;
  37. class IString;
  38. class IResourceId;
  39. class IRectangle;
  40. class IField;
  41. class ODFFormView;
  42. class ODFWindowList;
  43. class ODFFormPartPrivateData;
  44.  
  45. typedef ISet <ODFrame*> FrameSet;
  46.  
  47. class ODFModel : public SimplePart {
  48. #pragma SOMClassName(*, "ODFModel")
  49. public:
  50.    typedef SimplePart Inherited;
  51.    virtual  ~ODFModel();
  52.  
  53. /*-----------------------OpenDoc overrides -------------------------------------
  54. ------------------------------------------------------------------------------*/
  55.    virtual void
  56.       FacetAdded (ODFacet* facet),
  57.       Draw (ODFacet *facet, ODShape *invalidShape),
  58.       FrameShapeChanged (ODFrame *frame),
  59.       GeometryChanged (ODFacet *facet),
  60.       AddDisplayFrame (ODFrame *frame),
  61.       CloseDisplayFrame (ODFrame *frame),
  62.       RemoveDisplayFrame (ODFrame *frame),
  63.       Release(),
  64.       WritePartInfo (ODPtr partInfo, ODStorageUnitView *storageUnitView),
  65.       Externalize (),
  66.       InitPart (ODStorageUnit *su),
  67.       InitPartFromStorage (ODStorageUnit *su);
  68.    virtual ODPtr ReadPartInfo (ODFrame *frame, ODStorageUnitView *storageUnitView);
  69.    virtual ODBoolean BeginRelinquishFocus(ODTypeToken focus,
  70.                                       ODFrame* ownerFrame,
  71.                                       ODFrame* proposedFrame);
  72.  
  73.  
  74. /*-------------------------Model Maintenance Functions--------------------------
  75. ------------------------------------------------------------------------------*/
  76. protected:
  77.    ODFModel &addView(ODFFormView *view);
  78.    ODFModel &removeView(ODFFormView *view);
  79.  
  80. /*---------------------------View-construction ---------------------------------
  81. ------------------------------------------------------------------------------*/
  82.    virtual ODFModel &openViews();
  83.    virtual ODFModel &openView (IResourceId viewId);
  84.  
  85. /*---------------------------Protected Constructors-----------------------------
  86. ------------------------------------------------------------------------------*/
  87.    ODFModel();
  88.  
  89. /*--------------------------------- Private ----------------------------------  */
  90. private:
  91. //   ODFModel(const ODFModel &);
  92. //   ODFModel &operator =(const ODFModel &);
  93.    FrameSet   *displayFrames;
  94.    Boolean     viewsOpened;
  95.    ODFFormPartPrivateData *pData;
  96.  
  97. // ODFFormView needs access to displayFrames ISet.  Make it a friend for now.
  98. friend class ODFFormView;
  99. };
  100. // class ODFModel
  101.  
  102. /*----------------------------------------------------------------------------  */
  103. /* Resume compiler default packing.                                             */
  104. /*----------------------------------------------------------------------------  */
  105. #pragma pack()
  106.  
  107. /*----------------------------- Inline Functions -----------------------------  */
  108.  
  109. #ifndef I_NO_INLINES
  110. #endif
  111. #endif /* _OFORMP_ */
  112.