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

CtrlSharedFolder.h

Go to the documentation of this file.
00001 //
00002 // CtrlSharedFolder.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_CTRLSHAREDFOLDER_H__15350972_9EEB_47FD_896F_5644AA6546B8__INCLUDED_)
00023 #define AFX_CTRLSHAREDFOLDER_H__15350972_9EEB_47FD_896F_5644AA6546B8__INCLUDED_
00024 
00025 #pragma once
00026 
00027 class CLibraryFolder;
00028 
00029 
00030 class CLibraryFolderCtrl : public CTreeCtrl
00031 {
00032 // Construction
00033 public:
00034         CLibraryFolderCtrl();
00035         virtual ~CLibraryFolderCtrl();
00036 
00037 // Attributes
00038 protected:
00039         HTREEITEM       m_hRoot;
00040         HTREEITEM       m_hFirstSelected;
00041         BOOL            m_bFirstClick;
00042         BOOL            m_bMultiSelect;
00043         BOOL            m_bSaveExpand;
00044 
00045 // Operations
00046 public:
00047         void            SetMultiSelect(BOOL bMultiSelect);
00048         void            SetSaveExpand(BOOL bSaveExpand);
00049         void            Update(DWORD nUpdateCookie = 0);
00050         void            SetSelectedCookie(DWORD nUpdateCookie, HTREEITEM hParent = NULL, BOOL bSelect = FALSE);
00051         POSITION                GetSelectedFolderIterator() const;
00052         CLibraryFolder* GetNextSelectedFolder(POSITION& pos) const;
00053         BOOL            ClearSelection(HTREEITEM hExcept = NULL, HTREEITEM hItem = NULL, BOOL bSelect = FALSE);
00054         BOOL            SelectAll(HTREEITEM hExcept = NULL);
00055         BOOL            SelectFolder(CLibraryFolder* pFolder, HTREEITEM hItem = NULL);
00056 protected:
00057         void            Update(CLibraryFolder* pFolder, HTREEITEM hFolder, HTREEITEM hParent, DWORD nUpdateCookie, BOOL bRecurse);
00058         BOOL            SelectItems(HTREEITEM hItemFrom, HTREEITEM hItemTo);
00059         HTREEITEM       GetFirstSelectedItem() const;
00060         HTREEITEM       GetNextSelectedItem(HTREEITEM hItem) const;
00061         void            NotifySelectionChanged();
00062 
00063 // Overrides
00064 public:
00065         //{{AFX_VIRTUAL(CLibraryFolderCtrl)
00066         public:
00067         virtual BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID);
00068         //}}AFX_VIRTUAL
00069 
00070 // Implementation
00071 protected:
00072         //{{AFX_MSG(CLibraryFolderCtrl)
00073         afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00074         afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
00075         afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00076         afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
00077         afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00078         afx_msg void OnItemExpanded(NMHDR* pNMHDR, LRESULT* pResult);
00079         afx_msg void OnSelChanged(NMHDR* pNMHDR, LRESULT* pResult);
00080         afx_msg void OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult);
00081         afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
00082         afx_msg void OnNcPaint();
00083         //}}AFX_MSG
00084 
00085         DECLARE_MESSAGE_MAP()
00086 };
00087 
00088 //{{AFX_INSERT_LOCATION}}
00089 
00090 #endif // !defined(AFX_CTRLSHAREDFOLDER_H__15350972_9EEB_47FD_896F_5644AA6546B8__INCLUDED_)

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