00001 // 00002 // CtrlLibraryTip.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_CTRLLIBRARYTIP_H__DA7457FB_37EE_4940_8619_ED56D5DA593A__INCLUDED_) 00023 #define AFX_CTRLLIBRARYTIP_H__DA7457FB_37EE_4940_8619_ED56D5DA593A__INCLUDED_ 00024 00025 #pragma once 00026 00027 #include "CtrlCoolTip.h" 00028 #include "MetaList.h" 00029 00030 00031 class CLibraryTipCtrl : public CCoolTipCtrl 00032 { 00033 // Construction 00034 public: 00035 CLibraryTipCtrl(); 00036 virtual ~CLibraryTipCtrl(); 00037 00038 DECLARE_DYNAMIC(CLibraryTipCtrl) 00039 00040 // Attributes 00041 protected: 00042 CString m_sName; 00043 CString m_sPath; 00044 CString m_sFolder; 00045 CString m_sSize; 00046 CString m_sType; 00047 CString m_sSHA1; 00048 CString m_sTTH; 00049 CString m_sED2K; 00050 int m_nIndex; 00051 int m_nIcon; 00052 CMetaList m_pMetadata; 00053 int m_nKeyWidth; 00054 COLORREF m_crLight; 00055 protected: 00056 CCriticalSection m_pSection; 00057 CEvent m_pWakeup; 00058 HANDLE m_hThread; 00059 BOOL m_bThread; 00060 CSize m_szThumb; 00061 CBitmap m_bmThumb; 00062 DWORD m_tHidden; 00063 00064 // Operations 00065 public: 00066 virtual BOOL OnPrepare(); 00067 virtual void OnCalcSize(CDC* pDC); 00068 virtual void OnShow(); 00069 virtual void OnHide(); 00070 virtual void OnPaint(CDC* pDC); 00071 protected: 00072 void DrawThumb(CDC* pDC, CRect& rcThumb); 00073 void StopThread(); 00074 static UINT CLibraryTipCtrl::ThreadStart(LPVOID pParam); 00075 void OnRun(); 00076 00077 // Overrides 00078 public: 00079 //{{AFX_VIRTUAL(CLibraryTipCtrl) 00080 //}}AFX_VIRTUAL 00081 00082 // Implementation 00083 protected: 00084 //{{AFX_MSG(CLibraryTipCtrl) 00085 afx_msg void OnDestroy(); 00086 afx_msg void OnTimer(UINT nIDEvent); 00087 //}}AFX_MSG 00088 00089 DECLARE_MESSAGE_MAP() 00090 00091 }; 00092 00093 //{{AFX_INSERT_LOCATION}} 00094 00095 #endif // !defined(AFX_CTRLLIBRARYTIP_H__DA7457FB_37EE_4940_8619_ED56D5DA593A__INCLUDED_)