00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(AFX_CTRLLIBRARYDETAILVIEW_H__996200C6_D0C9_4508_BBD7_5DF796ECE954__INCLUDED_)
00023 #define AFX_CTRLLIBRARYDETAILVIEW_H__996200C6_D0C9_4508_BBD7_5DF796ECE954__INCLUDED_
00024
00025 #pragma once
00026
00027 #include "CtrlLibraryFileView.h"
00028
00029 class CSchema;
00030 class CLibraryFile;
00031
00032
00033 class CLibraryDetailView : public CLibraryFileView
00034 {
00035
00036 public:
00037 CLibraryDetailView(UINT nCommandID = ID_LIBRARY_VIEW_DETAIL);
00038 virtual ~CLibraryDetailView();
00039
00040 DECLARE_DYNCREATE(CLibraryDetailView)
00041
00042
00043 public:
00044 virtual void Update();
00045 virtual BOOL Select(DWORD nObject);
00046 virtual void CacheSelection();
00047 virtual DWORD HitTestIndex(const CPoint& point) const;
00048 public:
00049 void SetViewSchema(CSchema* pSchema, CPtrList* pColumns, BOOL bSave, BOOL bUpdate);
00050 protected:
00051 void CacheItem(int nItem);
00052 void SortItems(int nColumn = -1);
00053
00054
00055 protected:
00056 UINT m_nStyle;
00057 protected:
00058 CSchema* m_pSchema;
00059 CPtrList m_pColumns;
00060 CCoolMenu* m_pCoolMenu;
00061 BOOL m_bCreateDragImage;
00062
00063 struct LDVITEM
00064 {
00065 DWORD nIndex;
00066 DWORD nCookie;
00067 DWORD nState;
00068 int nIcon;
00069 CStringArray* pText;
00070 };
00071
00072
00073 protected:
00074 LDVITEM* m_pList;
00075 DWORD m_nList;
00076 DWORD m_nBuffer;
00077 DWORD m_nListCookie;
00078 int m_nSortColumn;
00079 BOOL m_bSortFlip;
00080
00081 static int ListCompare(LPCVOID pA, LPCVOID pB);
00082 static CLibraryDetailView* m_pThis;
00083
00084
00085 public:
00086
00087 public:
00088 virtual BOOL Create(CWnd* pParentWnd);
00089
00090
00091
00092 protected:
00093
00094 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00095 afx_msg void OnDestroy();
00096 afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00097 afx_msg void OnMeasureItem(int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct);
00098 afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
00099 afx_msg void OnUpdateLibraryRename(CCmdUI* pCmdUI);
00100 afx_msg void OnLibraryRename();
00101 afx_msg void OnLibraryColumns();
00102 afx_msg void OnUpdateLibraryColumns(CCmdUI* pCmdUI);
00103
00104
00105 afx_msg void OnCacheHint(NMLVCACHEHINT* pNotify, LRESULT* pResult);
00106 afx_msg void OnGetDispInfoW(NMLVDISPINFO* pNotify, LRESULT* pResult);
00107 afx_msg void OnGetDispInfoA(NMLVDISPINFO* pNotify, LRESULT* pResult);
00108 afx_msg void OnColumnClick(NM_LISTVIEW* pNotify, LRESULT* pResult);
00109 afx_msg void OnBeginLabelEdit(LV_DISPINFO* pNotify, LRESULT* pResult);
00110 afx_msg void OnEndLabelEditW(LV_DISPINFO* pNotify, LRESULT* pResult);
00111 afx_msg void OnEndLabelEditA(LV_DISPINFO* pNotify, LRESULT* pResult);
00112 afx_msg void OnBeginDrag(NM_LISTVIEW* pNotify, LRESULT* pResult);
00113 afx_msg void OnItemChanged(NM_LISTVIEW* pNotify, LRESULT* pResult);
00114 afx_msg void OnItemRangeChanged(NMLVODSTATECHANGE* pNotify, LRESULT* pResult);
00115 afx_msg void OnFindItemW(NMLVFINDITEM* pNotify, LRESULT* pResult);
00116 afx_msg void OnFindItemA(NMLVFINDITEM* pNotify, LRESULT* pResult);
00117 afx_msg void OnCustomDraw(NMLVCUSTOMDRAW* pNotify, LRESULT* pResult);
00118 afx_msg void OnDblClk(NMHDR* pNotify, LRESULT* pResult);
00119 afx_msg void OnUpdateBlocker(CCmdUI* pCmdUI);
00120
00121 DECLARE_MESSAGE_MAP()
00122
00123 };
00124
00125 class CLibraryListView : public CLibraryDetailView
00126 {
00127 public:
00128 CLibraryListView() : CLibraryDetailView( ID_LIBRARY_VIEW_LIST ) {}
00129 DECLARE_DYNCREATE(CLibraryListView);
00130 };
00131
00132 class CLibraryIconView : public CLibraryDetailView
00133 {
00134 public:
00135 CLibraryIconView() : CLibraryDetailView( ID_LIBRARY_VIEW_ICON ) {}
00136 DECLARE_DYNCREATE(CLibraryIconView);
00137 };
00138
00139
00140
00141 #define LDVI_SELECTED 0x01
00142 #define LDVI_PRIVATE 0x02
00143 #define LDVI_UNSCANNED 0x04
00144 #define LDVI_UNSAFE 0x08
00145
00146 #endif // !defined(AFX_CTRLLIBRARYDETAILVIEW_H__996200C6_D0C9_4508_BBD7_5DF796ECE954__INCLUDED_)