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 / Developer University / DU Projects / GraphicsBfr / Sources / Frame.h < prev    next >
Encoding:
Text File  |  1996-08-22  |  2.7 KB  |  72 lines  |  [TEXT/CWIE]

  1. //    Release Version:    $ ODF 2 $
  2. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  3.  
  4. #ifndef FRAME_H
  5. #define FRAME_H
  6.  
  7. //=======================================================================
  8. // ----- Framework Includes -----
  9. #ifndef FWFRAME_H
  10. #include <FWFrame.h>        // FW_CFrame
  11. #endif
  12.  
  13. //=======================================================================
  14. class CGraphicsBfrPart;
  15. class FW_CLineShape;
  16. class FW_CRegionShape;
  17. class FW_CPolygonShape;
  18. class FW_CPrintHandler;
  19. class FW_CBitmap;
  20.  
  21. //=======================================================================
  22. class CGraphicsBfrFrame : public FW_CFrame {
  23. public:
  24.     FW_DECLARE_AUTO(CGraphicsBfrFrame)
  25.                         CGraphicsBfrFrame(Environment* ev, 
  26.                                     ODFrame* odFrame, 
  27.                                     FW_CPresentation* presentation, 
  28.                                     CGraphicsBfrPart* graphicsbfrPart);
  29.     virtual             ~CGraphicsBfrFrame();
  30. protected:
  31. // overrides
  32.     virtual void        Draw(Environment* ev, 
  33.                                  ODFacet* odFacet, 
  34.                                  ODShape* invalidShape);
  35.     virtual FW_Handled     DoMouseDown(Environment* ev, 
  36.                                     const FW_CMouseEvent& theMouseEvent);
  37.     virtual void        FrameShapeChanged(Environment* ev);
  38. // overrides printing
  39.     virtual FW_CPrintHandler*    NewPrintHandler(Environment* ev);
  40.     virtual    FW_Boolean            IsCurrentlyPrintable(Environment* ev) const;
  41.     virtual void                GetPrintContentExtent(Environment* ev, FW_CPoint& extent) const;
  42. // new members
  43.     virtual FW_CPictureShape*     MyCreatePictureShape(Environment* ev);
  44.     virtual FW_CPolygonShape*     MyCreatePolygonShape(Environment* ev);
  45.     virtual FW_CLineShape*         MyCreateLineShape(Environment* ev);
  46.     virtual FW_CRegionShape*     MyCreateRegionShape(Environment* ev);
  47.     virtual void         MyDrawBackground(Environment* ev, FW_CGraphicContext& gc);
  48.     virtual void         MyDrawShapes(Environment* ev, FW_CGraphicContext& gc);
  49.     virtual void         MyDrawText(Environment* ev, FW_CGraphicContext& gc);
  50.     virtual void         MyDrawPictures(Environment* ev, FW_CGraphicContext& gc);
  51.     virtual void         MyDrawLine(Environment* ev, FW_CGraphicContext& gc);
  52.     virtual void         MyDrawPolygon(Environment* ev, FW_CGraphicContext& gc);
  53.     virtual void         MyInvalidateLine(Environment* ev);
  54. // for offscreen buffer
  55.     virtual void         MyDrawAllStuff(Environment* ev, FW_CGraphicContext& gc);
  56.     virtual void         MyUpdateBitmap(Environment* ev);
  57.     virtual void         MyDrawToBitmap(Environment* ev, ODShape* invalidShape);
  58. private:
  59.     FW_CPictureShape*    fLargePictureShape;
  60.     FW_CLineShape*        fLineShape;
  61.     FW_CRegionShape*    fRegionShape;
  62.     FW_CPolygonShape*    fPolygonShape;
  63.     FW_CRect            fLargePictRect;
  64.     FW_CBitmap            fBitmap;
  65.     FW_CRect            fFrameRect;
  66.     FW_CBitmapShape*    fBitmapShape;
  67.     FW_Boolean            fDisplayChanged;
  68. };
  69.  
  70. //=======================================================================
  71. #endif
  72.