home *** CD-ROM | disk | FTP | other *** search
/ Troubleshooting Netware Systems / CSTRIAL0196.BIN / attach / msj / v10n04 / olecont.exe / CONTVIEW.H < prev    next >
C/C++ Source or Header  |  1995-04-01  |  2KB  |  76 lines

  1. // contview.h : interface of the CContainerView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. class CContainerItem;
  6.  
  7. class CContainerView : public CView
  8. {
  9. protected: // create from serialization only
  10.     CContainerView();
  11.     DECLARE_DYNCREATE(CContainerView)
  12.  
  13. // Attributes
  14. public:
  15.     CContainerDoc* GetDocument();
  16.     // m_pSelection holds the selection to the current CContainerItem.
  17.     // For many applications, such a member variable isn't adequate to
  18.     //  represent a selection, such as a multiple selection or a selection
  19.     //  of objects that are not CContainerItem objects.  This selection
  20.     //  mechanism is provided just to help you get started.
  21.  
  22.     // TODO: replace this selection mechanism with one appropriate to your app.
  23.     CContainerItem* m_pSelection;  
  24.  
  25. // Operations
  26. public:
  27.  
  28. // Implementation
  29. public:
  30.     virtual ~CContainerView();
  31.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  32. #ifdef _DEBUG
  33.     virtual void AssertValid() const;
  34.     virtual void Dump(CDumpContext& dc) const;
  35. #endif
  36.  
  37. protected:     
  38.     virtual void OnInitialUpdate(); // called first time after construct
  39.  
  40.     // Printing support
  41.     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  42.     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  43.     virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  44.  
  45.     // Selection support
  46.     virtual BOOL IsSelected(const CObject* pDocItem) const;
  47.     virtual void SetSelection(CContainerItem* pNewSel);
  48.     CContainerItem*    HitTestItems(CPoint point);
  49.     
  50.     // Drawing Support
  51.     virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
  52.     virtual void SetupTracker(CRectTracker* pTracker, CContainerItem* pItem); 
  53.     virtual void InvalidateItem(CContainerItem* pItem);    
  54.     
  55. // Generated message map functions
  56. protected:
  57.     //{{AFX_MSG(CContainerView)
  58.     afx_msg void OnSetFocus(CWnd* pOldWnd);
  59.     afx_msg void OnSize(UINT nType, int cx, int cy);
  60.     afx_msg void InsertObject();
  61.     afx_msg void OnCancelEdit();
  62.     afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
  63.     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  64.     afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
  65.     afx_msg void OnDestroy();
  66.     //}}AFX_MSG
  67.     DECLARE_MESSAGE_MAP()
  68. };
  69.  
  70. #ifndef _DEBUG  // debug version in testview.cpp
  71. inline CContainerDoc* CContainerView::GetDocument()
  72.    { return (CContainerDoc*)m_pDocument; }
  73. #endif
  74.  
  75. /////////////////////////////////////////////////////////////////////////////
  76.