home *** CD-ROM | disk | FTP | other *** search
/ PC World 2003 June / PCWorld_2003-06_cd.bin / KOMUNIK / MIRRORIT / SRC / MIRRORITVIEW.H < prev    next >
C/C++ Source or Header  |  1998-01-04  |  4KB  |  113 lines

  1. // MirrorItView.h : interface of the CMirrorItView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. #if !defined(AFX_MIRRORITVIEW_H__C2396A6F_40C6_11D1_83C6_0000C0003048__INCLUDED_)
  6. #define AFX_MIRRORITVIEW_H__C2396A6F_40C6_11D1_83C6_0000C0003048__INCLUDED_
  7.  
  8. #if _MSC_VER >= 1000
  9. #pragma once
  10. #endif // _MSC_VER >= 1000
  11.  
  12. #define C_COLUMNS           3
  13. #define COLUMN_SESSION      0
  14. #define COLUMN_URL          1
  15. #define COLUMN_COMMENT      2
  16.  
  17. #define UPDATE_ADD            1000
  18. #define UPDATE_MODIFY        1001
  19. #define UPDATE_REMOVE        1002
  20. #define UPDATE_MOVE            1003
  21.  
  22. class CSession;
  23.  
  24. class CMirrorItView : public CListView
  25. {
  26. protected: // create from serialization only
  27.     CMirrorItView();
  28.     DECLARE_DYNCREATE(CMirrorItView)
  29.  
  30. // Attributes
  31. public:
  32.     CMirrorItDoc* GetDocument();
  33.  
  34. // Operations
  35. public:
  36.  
  37. // Overrides
  38.     // ClassWizard generated virtual function overrides
  39.     //{{AFX_VIRTUAL(CMirrorItView)
  40.     public:
  41.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  42.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  43.     virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
  44.     protected:
  45.     virtual void OnInitialUpdate(); // called first time after construct
  46.     virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
  47.     //}}AFX_VIRTUAL
  48.  
  49. // Implementation
  50. public:
  51.     CImageList m_ilSmall;
  52.     CImageList m_ilLarge;
  53.     afx_msg void OnUpdateEditCopyCut(CCmdUI* pCmdUI);
  54.     afx_msg void OnUpdateEditPaste(CCmdUI* pCmdUI);
  55.     afx_msg void OnEditCopy();
  56.     afx_msg void OnEditCut();
  57.     afx_msg void OnEditPaste();
  58.     BOOL IsSelected();
  59.     void DoCutCopyPaste(CArchive &ar, BOOL bCut);
  60.     UINT m_nClipboardFormat;
  61.     void UpdateSession(int n, CSession * session);
  62.     void AddSession(CSession * session);
  63.     virtual ~CMirrorItView();
  64. #ifdef _DEBUG
  65.     virtual void AssertValid() const;
  66.     virtual void Dump(CDumpContext& dc) const;
  67. #endif
  68.  
  69. protected:
  70.  
  71. // Generated message map functions
  72. protected:
  73.     void UpdateListView(CCmdUI * pCmdUI, DWORD dwView);
  74.     void SetListView(DWORD dwView);
  75.     //{{AFX_MSG(CMirrorItView)
  76.     afx_msg void OnViewDetails();
  77.     afx_msg void OnViewLargeicons();
  78.     afx_msg void OnViewList();
  79.     afx_msg void OnViewSmallicons();
  80.     afx_msg void OnUpdateViewSmallicons(CCmdUI* pCmdUI);
  81.     afx_msg void OnUpdateViewList(CCmdUI* pCmdUI);
  82.     afx_msg void OnUpdateViewLargeicons(CCmdUI* pCmdUI);
  83.     afx_msg void OnUpdateViewDetails(CCmdUI* pCmdUI);
  84.     afx_msg void OnSessionProperties();
  85.     afx_msg void OnUpdateSessionProperties(CCmdUI* pCmdUI);
  86.     afx_msg void OnSessionRemove();
  87.     afx_msg void OnUpdateSessionRemove(CCmdUI* pCmdUI);
  88.     afx_msg void OnUpdateEditClear(CCmdUI* pCmdUI);
  89.     afx_msg void OnEditClear();
  90.     afx_msg void OnSessionAdd();
  91.     afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
  92.     afx_msg void OnUpdateSessionMovedown(CCmdUI* pCmdUI);
  93.     afx_msg void OnSessionMovedown();
  94.     afx_msg void OnSessionMoveup();
  95.     afx_msg void OnUpdateSessionMoveup(CCmdUI* pCmdUI);
  96.     afx_msg void OnUpdateSessionStart(CCmdUI* pCmdUI);
  97.     afx_msg void OnSessionStart();
  98.     //}}AFX_MSG
  99.     DECLARE_MESSAGE_MAP()
  100. };
  101.  
  102. #ifndef _DEBUG  // debug version in MirrorItView.cpp
  103. inline CMirrorItDoc* CMirrorItView::GetDocument()
  104.    { return (CMirrorItDoc*)m_pDocument; }
  105. #endif
  106.  
  107. /////////////////////////////////////////////////////////////////////////////
  108.  
  109. //{{AFX_INSERT_LOCATION}}
  110. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  111.  
  112. #endif // !defined(AFX_MIRRORITVIEW_H__C2396A6F_40C6_11D1_83C6_0000C0003048__INCLUDED_)
  113.