00001 // 00002 // CtrlLibraryHeaderPanel.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_CTRLLIBRARYHEADERPANEL_H__9E5471F0_5957_470D_9B52_9C8D18A76C3D__INCLUDED_) 00023 #define AFX_CTRLLIBRARYHEADERPANEL_H__9E5471F0_5957_470D_9B52_9C8D18A76C3D__INCLUDED_ 00024 00025 #pragma once 00026 00027 #include "MetaList.h" 00028 00029 class CAlbumFolder; 00030 00031 00032 class CLibraryHeaderPanel : public CWnd 00033 { 00034 // Construction 00035 public: 00036 CLibraryHeaderPanel(); 00037 virtual ~CLibraryHeaderPanel(); 00038 00039 // Attributes 00040 protected: 00041 int m_nIcon32; 00042 int m_nIcon48; 00043 CString m_sTitle; 00044 CString m_sSubtitle; 00045 CMetaList m_pMetadata; 00046 int m_nMetaWidth; 00047 int m_nKeyWidth; 00048 protected: 00049 CSize m_szBuffer; 00050 CDC m_dcBuffer; 00051 CBitmap m_bmBuffer; 00052 HBITMAP m_hBuffer; 00053 CBitmap m_bmWatermark; 00054 00055 // Operations 00056 public: 00057 int Update(); 00058 void OnSkinChange(); 00059 protected: 00060 CAlbumFolder* GetSelectedAlbum() const; 00061 void DoPaint(CDC* pDC, CRect& rcClient); 00062 void DrawText(CDC* pDC, int nX, int nY, LPCTSTR pszText); 00063 00064 // Overrides 00065 public: 00066 //{{AFX_VIRTUAL(CLibraryHeaderPanel) 00067 public: 00068 virtual BOOL Create(CWnd* pParentWnd); 00069 //}}AFX_VIRTUAL 00070 00071 // Implementation 00072 protected: 00073 //{{AFX_MSG(CLibraryHeaderPanel) 00074 afx_msg void OnSize(UINT nType, int cx, int cy); 00075 afx_msg void OnPaint(); 00076 afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); 00077 afx_msg void OnLButtonUp(UINT nFlags, CPoint point); 00078 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 00079 afx_msg void OnDestroy(); 00080 //}}AFX_MSG 00081 00082 DECLARE_MESSAGE_MAP() 00083 00084 }; 00085 00086 //{{AFX_INSERT_LOCATION}} 00087 00088 #define ID_LIBRARY_HEADER 134 00089 00090 #endif // !defined(AFX_CTRLLIBRARYHEADERPANEL_H__9E5471F0_5957_470D_9B52_9C8D18A76C3D__INCLUDED_)