home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / Bitmap / Sources / Select.h < prev    next >
Encoding:
Text File  |  1996-04-25  |  2.6 KB  |  85 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Select.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Author:                Henri Lamiraux
  7. //
  8. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef SELECT_H
  13. #define SELECT_H
  14.  
  15. // ----- FrameWork Includes -----
  16.  
  17. #ifndef FWSELECT_H
  18. #include "FWSelect.h"
  19. #endif
  20.  
  21. // ----- Graphic Includes -----
  22.  
  23. #ifndef FWRECSHP_H
  24. #include "FWRecShp.h"
  25. #endif
  26.  
  27. //========================================================================================
  28. //    Forward Declarations
  29. //========================================================================================
  30.  
  31. class FW_CGraphicContext;
  32. class CBitmapPart;
  33. class CBitmapFrame;
  34. class CBitmapSelectionContent;
  35. class CBitmapContent;
  36.  
  37. //========================================================================================
  38. //    class CBitmapSelection
  39. //========================================================================================
  40.  
  41. class CBitmapSelection : public FW_CSelection
  42. {
  43. //----------------------------------------------------------------------------------------
  44. //    Initialization/Destruction
  45. //
  46. public:
  47.     FW_DECLARE_AUTO(CBitmapSelection)
  48.  
  49.     CBitmapSelection(Environment* ev, CBitmapPart* thePart, CBitmapContent* content);
  50.     virtual         ~CBitmapSelection();
  51.     
  52. //----------------------------------------------------------------------------------------
  53. //    Inherited API
  54. //
  55. public:
  56.     virtual FW_Boolean        IsEmpty(Environment* ev) const;
  57.     virtual void            SelectAll(Environment* ev);
  58.     virtual void            ClearSelection(Environment* ev);
  59.     virtual void            CloseSelection(Environment* ev);
  60.     virtual FW_CContent*    GetSelectedContent(Environment* ev);
  61.     
  62.     virtual ODShape*        CreateSelectionShape(Environment* ev, ODFacet* facet, FW_CFrame* frame) const;
  63.                     
  64. //----------------------------------------------------------------------------------------
  65. //    New API
  66. //
  67. public:
  68.     void                    GetSelectRect(const FW_CPoint& ratio, const FW_CRect& usedRect, FW_CRect& rect) const;
  69.     void                    SetSelectRect(const FW_CPoint& ratio, const FW_CRect& usedRect, const FW_CRect& rect);
  70.     
  71.     void                    MoveAnts(Environment* ev, CBitmapFrame* frame);
  72.     void                    DrawAnts(Environment* ev, CBitmapFrame* frame);
  73.     void                    DoDrawAnts(Environment* ev, FW_CGraphicContext& fc, CBitmapFrame* frame);
  74.         
  75. //----------------------------------------------------------------------------------------
  76. //    Data Members
  77. //
  78. private:
  79.     CBitmapSelectionContent*    fSelectedContent;
  80.     CBitmapPart*                fBitmapPart;
  81.     FW_Boolean                    fHasSelection;
  82.     FW_CRectShape                fRectShape;
  83. };
  84.  
  85. #endif