Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

CtrlLibraryDetailView.h

Go to the documentation of this file.
00001 //
00002 // CtrlLibraryDetailView.h
00003 //
00004 // Copyright (c) Shareaza Development Team, 2002-2005.
00005 // This file is part of SHAREAZA (www.shareaza.com)
00006 //
00007 // Shareaza is free software; you can redistribute it
00008 // and/or modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2 of
00010 // the License, or (at your option) any later version.
00011 //
00012 // Shareaza is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with Shareaza; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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 // Construction
00036 public:
00037         CLibraryDetailView(UINT nCommandID = ID_LIBRARY_VIEW_DETAIL);
00038         virtual ~CLibraryDetailView();
00039 
00040         DECLARE_DYNCREATE(CLibraryDetailView)
00041 
00042 // Operations
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 // Attributes
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 // List
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 // Overrides
00085 public:
00086         //{{AFX_VIRTUAL(CLibraryDetailView)
00087         public:
00088         virtual BOOL Create(CWnd* pParentWnd);
00089         //}}AFX_VIRTUAL
00090 
00091 // Implementation
00092 protected:
00093         //{{AFX_MSG(CLibraryDetailView)
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         //}}AFX_MSG
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 //{{AFX_INSERT_LOCATION}}
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_)

Generated on Thu Dec 15 10:39:35 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2