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

CtrlMediaList.h

Go to the documentation of this file.
00001 //
00002 // CtrlMediaList.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_CTRLMEDIALIST_H__342211C4_F17F_451C_97C7_1BBE4BF2969F__INCLUDED_)
00023 #define AFX_CTRLMEDIALIST_H__342211C4_F17F_451C_97C7_1BBE4BF2969F__INCLUDED_
00024 
00025 #pragma once
00026 
00027 #include "CtrlLibraryTip.h"
00028 
00029 
00030 class CMediaListCtrl : public CListCtrl
00031 {
00032 // Construction
00033 public:
00034         CMediaListCtrl();
00035         virtual ~CMediaListCtrl();
00036 
00037         DECLARE_DYNAMIC(CMediaListCtrl)
00038 
00039 // Attributes
00040 protected:
00041         CImageList*     m_pDragImage;
00042         int                     m_nDragDrop;
00043         BOOL            m_bCreateDragImage;
00044 protected:
00045         CLibraryTipCtrl m_wndTip;
00046 
00047 // Operations
00048 protected:
00049         int             Add(LPCTSTR pszPath, int nItem = -1);
00050         void    Remove(int nItem);
00051 public:
00052         BOOL    Open(LPCTSTR pszFile);
00053         BOOL    Enqueue(LPCTSTR pszFile, BOOL bStart = TRUE);
00054         int             RecursiveEnqueue(LPCTSTR pszPath);
00055         void    Remove(LPCTSTR pszFile);
00056         BOOL    LoadTextList(LPCTSTR pszFile);
00057         int             GetCount();
00058         void    Clear();
00059         int             GetCurrent();
00060         void    SetCurrent(int nCurrent);
00061         int             GetNext(BOOL bSet = TRUE);
00062         void    Reset(BOOL bNext = TRUE);
00063         CString GetPath(int nItem);
00064 
00065 // Overrides
00066 public:
00067         //{{AFX_VIRTUAL(CMediaListCtrl)
00068         public:
00069         virtual BOOL Create(CWnd* pParentWnd, UINT nID);
00070         //}}AFX_VIRTUAL
00071 
00072 // Implementation
00073 protected:
00074         //{{AFX_MSG(CMediaListCtrl)
00075         afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00076         afx_msg void OnDoubleClick(NMHDR* pNMHDR, LRESULT* pResult);
00077         afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
00078         afx_msg void OnMediaAdd();
00079         afx_msg void OnUpdateMediaRemove(CCmdUI* pCmdUI);
00080         afx_msg void OnMediaRemove();
00081         afx_msg void OnUpdateMediaClear(CCmdUI* pCmdUI);
00082         afx_msg void OnMediaClear();
00083         afx_msg void OnUpdateMediaSelect(CCmdUI* pCmdUI);
00084         afx_msg void OnMediaSelect();
00085         afx_msg void OnUpdateMediaSave(CCmdUI* pCmdUI);
00086         afx_msg void OnMediaSave();
00087         afx_msg void OnMediaOpen();
00088         afx_msg void OnUpdateMediaPrevious(CCmdUI* pCmdUI);
00089         afx_msg void OnMediaPrevious();
00090         afx_msg void OnUpdateMediaNext(CCmdUI* pCmdUI);
00091         afx_msg void OnMediaNext();
00092         afx_msg void OnKeyDown(NMHDR* pNMHDR, LRESULT* pResult);
00093         afx_msg void OnSize(UINT nType, int cx, int cy);
00094         afx_msg void OnBeginDrag(NMHDR* pNMHDR, LRESULT* pResult);
00095         afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00096         afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00097         afx_msg void OnUpdateMediaRepeat(CCmdUI* pCmdUI);
00098         afx_msg void OnMediaRepeat();
00099         afx_msg void OnUpdateMediaRandom(CCmdUI* pCmdUI);
00100         afx_msg void OnMediaRandom();
00101         afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00102         afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
00103         afx_msg void OnMediaAddFolder();
00104         //}}AFX_MSG
00105         afx_msg void OnCustomDraw(NMLVCUSTOMDRAW* pNotify, LRESULT* pResult);
00106 
00107         DECLARE_MESSAGE_MAP()
00108 };
00109 
00110 //{{AFX_INSERT_LOCATION}}
00111 
00112 #define MLN_NEWCURRENT  101
00113 
00114 #endif // !defined(AFX_CTRLMEDIALIST_H__342211C4_F17F_451C_97C7_1BBE4BF2969F__INCLUDED_)

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