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

CtrlLibraryMetaPanel.h

Go to the documentation of this file.
00001 //
00002 // CtrlLibraryMetaPanel.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_CTRLLIBRARYMETAPANEL_H__A50ED736_E285_4656_903C_8C32D565ABD5__INCLUDED_)
00023 #define AFX_CTRLLIBRARYMETAPANEL_H__A50ED736_E285_4656_903C_8C32D565ABD5__INCLUDED_
00024 
00025 #pragma once
00026 
00027 #include "CtrlLibraryPanel.h"
00028 #include "MetaPanel.h"
00029 
00030 class CSchema;
00031 class CLibraryFile;
00032 
00033 
00034 class CLibraryMetaPanel : public CLibraryPanel
00035 {
00036 // Construction
00037 public:
00038         CLibraryMetaPanel();
00039         virtual ~CLibraryMetaPanel();
00040 
00041         DECLARE_DYNCREATE(CLibraryMetaPanel)
00042 
00043 // Attributes
00044 protected:
00045         int                             m_nSelected;
00046         DWORD                   m_nIndex;
00047         BOOL                    m_bNewFile;  // flag used to switch off thread if thumbnail can not be extracted
00048         CString                 m_sName;
00049         CString                 m_sPath;
00050         CString                 m_sFolder;
00051         CString                 m_sType;
00052         CString                 m_sSize;
00053         int                             m_nIcon32;
00054         int                             m_nIcon48;
00055         int                             m_nRating;
00056         CSchema*                m_pSchema;
00057         CMetaPanel              m_pMetadata;
00058         CRect                   m_rcFolder;
00059         CRect                   m_rcRating;
00060         int                             m_nScrollWheelLines;
00061 protected:
00062         CCriticalSection        m_pSection;
00063         CEvent                          m_pWakeup;
00064         HANDLE                          m_hThread;
00065         BOOL                            m_bThread;
00066         CSize                           m_szThumb;
00067         CBitmap                         m_bmThumb;
00068         COLORREF                        m_crLight;
00069         int                                     m_nThumbSize;
00070         CString                         m_sThumb;
00071 
00072 // Operations
00073 public:
00074         virtual BOOL CheckAvailable(CLibraryTreeItem* pFolders, CLibraryList* pObjects);
00075         virtual void Update();
00076 protected:
00077         void    DrawText(CDC* pDC, int nX, int nY, LPCTSTR pszText, RECT* pRect = NULL);
00078         void    DrawThumbnail(CDC* pDC, CRect& rcClient, CRect& rcWork);
00079         void    DrawThumbnail(CDC* pDC, CRect& rcThumb);
00080 protected:
00081         static UINT ThreadStart(LPVOID pParam);
00082         void            OnRun();
00083 
00084 // Overrides
00085 public:
00086         //{{AFX_VIRTUAL(CLibraryMetaPanel)
00087         //}}AFX_VIRTUAL
00088 
00089 // Implementation
00090 protected:
00091         //{{AFX_MSG(CLibraryMetaPanel)
00092         afx_msg void OnPaint();
00093         afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
00094         afx_msg void OnSize(UINT nType, int cx, int cy);
00095         afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00096         afx_msg void OnDestroy();
00097         afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
00098         afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00099         afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00100         afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
00101         //}}AFX_MSG
00102 
00103         DECLARE_MESSAGE_MAP()
00104 
00105 };
00106 
00107 //{{AFX_INSERT_LOCATION}}
00108 
00109 #endif // !defined(AFX_CTRLLIBRARYMETAPANEL_H__A50ED736_E285_4656_903C_8C32D565ABD5__INCLUDED_)

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