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

CSearchDetailPanel Class Reference

#include <CtrlSearchDetailPanel.h>

List of all members.

Public Member Functions

 CSearchDetailPanel ()
virtual ~CSearchDetailPanel ()
void Update (CMatchFile *pFile)
virtual BOOL Create (CWnd *pParentWnd)

Protected Member Functions

void DrawThumbnail (CDC *pDC, CRect &rcClient, CRect &rcWork)
void DrawThumbnail (CDC *pDC, CRect &rcThumb)
void ClearReviews ()
BOOL RequestPreview ()
void CancelPreview ()
void OnRun ()
BOOL ExecuteRequest (CString strURL, BYTE **ppBuffer, DWORD *pnBuffer)
void OnPreviewLoaded (SHA1 *pSHA1, CImageFile *pImage)
BOOL CachePreviewImage (SHA1 *pSHA1, LPBYTE pBuffer, DWORD nBuffer)
afx_msg int OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void OnDestroy ()
afx_msg void OnSize (UINT nType, int cx, int cy)
afx_msg void OnVScroll (UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
afx_msg BOOL OnMouseWheel (UINT nFlags, short zDelta, CPoint pt)
afx_msg void OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void OnPaint ()
afx_msg BOOL OnSetCursor (CWnd *pWnd, UINT nHitTest, UINT message)
afx_msg void OnLButtonUp (UINT nFlags, CPoint point)
afx_msg BOOL OnEraseBkgnd (CDC *pDC)
afx_msg void OnClickReview (RVN_ELEMENTEVENT *pNotify, LRESULT *pResult)

Static Protected Member Functions

static void DrawText (CDC *pDC, int nX, int nY, LPCTSTR pszText, RECT *pRect=NULL)
static UINT ThreadStart (LPVOID pParam)

Protected Attributes

CMatchListm_pMatches
BOOL m_bValid
CMatchFilem_pFile
SHA1 m_pSHA1
CString m_sName
CString m_sStatus
CRect m_rcStatus
CString m_sSize
int m_nIcon48
int m_nIcon32
int m_nRating
CSchemam_pSchema
CMetaPanel m_pMetadata
CPtrList m_pReviews
int m_nScrollWheelLines
CCriticalSection m_pSection
CEvent m_pWakeup
BOOL m_bCanPreview
BOOL m_bRunPreview
BOOL m_bIsPreviewing
HANDLE m_hThread
BOOL m_bThread
CHttpRequest m_pRequest
CStringList m_pPreviewURLs
CBitmap m_bmThumb
CSize m_szThumb
CRect m_rcThumb
COLORREF m_crLight
int m_nThumbSize

Friends

class Review

Classes

class  Review


Constructor & Destructor Documentation

CSearchDetailPanel::CSearchDetailPanel  ) 
 

Definition at line 73 of file CtrlSearchDetailPanel.cpp.

References CCoolInterface::CalculateColour(), CoolInterface, CCoolInterface::m_crTipBack, and NULL.

CSearchDetailPanel::~CSearchDetailPanel  )  [virtual]
 

Definition at line 91 of file CtrlSearchDetailPanel.cpp.

References ClearReviews().


Member Function Documentation

BOOL CSearchDetailPanel::CachePreviewImage SHA1 pSHA1,
LPBYTE  pBuffer,
DWORD  nBuffer
[protected]
 

Definition at line 996 of file CtrlSearchDetailPanel.cpp.

References CMatchList::FileToItem(), CMatchFile::m_nPreview, m_pFile, m_pMatches, CMatchFile::m_pPreview, CMatchList::m_pSection, and NULL.

Referenced by OnRun().

void CSearchDetailPanel::CancelPreview  )  [protected]
 

Definition at line 822 of file CtrlSearchDetailPanel.cpp.

References CHttpRequest::Cancel(), m_bIsPreviewing, m_bmThumb, m_bRunPreview, m_pPreviewURLs, m_pRequest, m_pSection, and NULL.

Referenced by OnDestroy(), and Update().

void CSearchDetailPanel::ClearReviews  )  [protected]
 

Definition at line 237 of file CtrlSearchDetailPanel.cpp.

References m_pReviews.

Referenced by OnDestroy(), Update(), and ~CSearchDetailPanel().

BOOL CSearchDetailPanel::Create CWnd *  pParentWnd  )  [virtual]
 

Definition at line 99 of file CtrlSearchDetailPanel.cpp.

References IDC_DETAIL_PANEL, and NULL.

Referenced by CSearchWnd::OnCreate(), and CBrowseFrameCtrl::OnCreate().

void CSearchDetailPanel::DrawText CDC *  pDC,
int  nX,
int  nY,
LPCTSTR  pszText,
RECT *  pRect = NULL
[static, protected]
 

Definition at line 488 of file CtrlSearchDetailPanel.cpp.

References NULL.

Referenced by DrawThumbnail(), OnPaint(), and CSearchDetailPanel::Review::Paint().

void CSearchDetailPanel::DrawThumbnail CDC *  pDC,
CRect &  rcThumb
[protected]
 

Definition at line 521 of file CtrlSearchDetailPanel.cpp.

References CShellIcons::Draw(), DrawText(), CMatchList::FileToItem(), IDS_SEARCH_DETAILS_PREVIEW, IDS_SEARCH_DETAILS_PREVIEWING, CImageFile::LoadFromMemory(), LoadString(), m_bCanPreview, m_bIsPreviewing, m_bmThumb, m_crLight, CShareazaApp::m_gdiFontBold, CShareazaApp::m_gdiFontLine, m_nIcon32, m_nIcon48, CMatchFile::m_nPreview, m_nThumbSize, m_pFile, m_pMatches, CMatchFile::m_pPreview, CMatchList::m_pSection, m_pSHA1, m_rcThumb, m_szThumb, NULL, OnPreviewLoaded(), ShellIcons, and theApp.

void CSearchDetailPanel::DrawThumbnail CDC *  pDC,
CRect &  rcClient,
CRect &  rcWork
[protected]
 

Definition at line 499 of file CtrlSearchDetailPanel.cpp.

References CoolInterface, CCoolInterface::m_crMargin, and m_nThumbSize.

Referenced by OnPaint().

BOOL CSearchDetailPanel::ExecuteRequest CString  strURL,
BYTE **  ppBuffer,
DWORD *  pnBuffer
[protected]
 

Definition at line 911 of file CtrlSearchDetailPanel.cpp.

References CHttpRequest::AddHeader(), CHttpRequest::Clear(), CHttpRequest::Execute(), CHttpRequest::GetHeader(), CHttpRequest::GetResponseBuffer(), CHttpRequest::GetStatusCode(), CHttpRequest::GetStatusSuccess(), CSHA::HashFromURN(), CHttpRequest::LimitContentLength(), CBuffer::m_nLength, CBuffer::m_pBuffer, m_pRequest, m_pSHA1, CSettings::sSearch::MaxPreviewLength, CShareazaApp::Message(), MSG_DEBUG, NULL, CSettings::Search, Settings, CHttpRequest::SetURL(), and theApp.

Referenced by OnRun().

void CSearchDetailPanel::OnClickReview RVN_ELEMENTEVENT pNotify,
LRESULT *  pResult
[protected]
 

Definition at line 789 of file CtrlSearchDetailPanel.cpp.

References CShareazaApp::InternalURI(), RVN_ELEMENTEVENT::pElement, and theApp.

int CSearchDetailPanel::OnCreate LPCREATESTRUCT  lpCreateStruct  )  [protected]
 

Definition at line 250 of file CtrlSearchDetailPanel.cpp.

void CSearchDetailPanel::OnDestroy  )  [protected]
 

Definition at line 256 of file CtrlSearchDetailPanel.cpp.

References CancelPreview(), ClearReviews(), m_bThread, m_hThread, m_pWakeup, CShareazaApp::Message(), MSG_DEBUG, NULL, and theApp.

BOOL CSearchDetailPanel::OnEraseBkgnd CDC *  pDC  )  [protected]
 

Definition at line 393 of file CtrlSearchDetailPanel.cpp.

void CSearchDetailPanel::OnLButtonDown UINT  nFlags,
CPoint  point
[protected]
 

Definition at line 382 of file CtrlSearchDetailPanel.cpp.

void CSearchDetailPanel::OnLButtonUp UINT  nFlags,
CPoint  point
[protected]
 

Definition at line 668 of file CtrlSearchDetailPanel.cpp.

References m_bCanPreview, m_bIsPreviewing, m_bValid, CMetaPanel::m_nHeight, m_pMetadata, m_pReviews, m_rcStatus, m_rcThumb, NULL, CMetaPanel::OnClick(), OnVScroll(), and RequestPreview().

BOOL CSearchDetailPanel::OnMouseWheel UINT  nFlags,
short  zDelta,
CPoint  pt
[protected]
 

Definition at line 387 of file CtrlSearchDetailPanel.cpp.

References m_nScrollWheelLines, NULL, and OnVScroll().

void CSearchDetailPanel::OnPaint  )  [protected]
 

Definition at line 398 of file CtrlSearchDetailPanel.cpp.

References CoolInterface, CShellIcons::Draw(), DrawText(), DrawThumbnail(), IDS_SEARCH_DETAILS_EMPTY, IDS_TIP_SIZE, LoadString(), m_bValid, CCoolInterface::m_crMargin, CCoolInterface::m_crText, CCoolInterface::m_crWindow, CCoolInterface::m_fntBold, CCoolInterface::m_fntCaption, CCoolInterface::m_fntNormal, CCoolInterface::m_fntUnder, m_nRating, m_pMetadata, m_pReviews, m_pSection, m_rcStatus, m_sName, m_sSize, m_sStatus, NULL, CSearchDetailPanel::Review::Paint(), CMetaPanel::Paint(), ShellIcons, SHI_FAKE, and SHI_STAR.

void CSearchDetailPanel::OnPreviewLoaded SHA1 pSHA1,
CImageFile pImage
[protected]
 

Definition at line 964 of file CtrlSearchDetailPanel.cpp.

References CImageFile::CreateBitmap(), m_bCanPreview, m_bIsPreviewing, m_bmThumb, m_bRunPreview, CImageFile::m_nHeight, m_nThumbSize, CImageFile::m_nWidth, m_pSection, m_pSHA1, m_szThumb, and CImageFile::Resample().

Referenced by DrawThumbnail(), OnRun(), and Update().

void CSearchDetailPanel::OnRun  )  [protected]
 

Definition at line 851 of file CtrlSearchDetailPanel.cpp.

References CachePreviewImage(), ExecuteRequest(), IDS_SEARCH_DETAILS_PREVIEW_FAILED, CImageFile::LoadFromMemory(), m_bIsPreviewing, m_bRunPreview, m_bThread, m_bValid, m_pPreviewURLs, m_pSection, m_pSHA1, m_pWakeup, CShareazaApp::Message(), MSG_ERROR, OnPreviewLoaded(), and theApp.

Referenced by ThreadStart().

BOOL CSearchDetailPanel::OnSetCursor CWnd *  pWnd,
UINT  nHitTest,
UINT  message
[protected]
 

Definition at line 638 of file CtrlSearchDetailPanel.cpp.

References CMetaList::HitTest(), IDC_HAND, m_bCanPreview, m_bIsPreviewing, m_bValid, m_pMetadata, m_pReviews, m_rcStatus, m_rcThumb, and NULL.

void CSearchDetailPanel::OnSize UINT  nType,
int  cx,
int  cy
[protected]
 

Definition at line 289 of file CtrlSearchDetailPanel.cpp.

References CSearchDetailPanel::Review::Layout(), CMetaPanel::Layout(), m_bValid, m_pMetadata, m_pReviews, and SIZE_INTERNAL.

Referenced by Update().

void CSearchDetailPanel::OnVScroll UINT  nSBCode,
UINT  nPos,
CScrollBar *  pScrollBar
[protected]
 

Definition at line 332 of file CtrlSearchDetailPanel.cpp.

References m_pReviews, and CSearchDetailPanel::Review::Reposition().

Referenced by OnLButtonUp(), and OnMouseWheel().

BOOL CSearchDetailPanel::RequestPreview  )  [protected]
 

Definition at line 800 of file CtrlSearchDetailPanel.cpp.

References m_bCanPreview, m_bRunPreview, m_bThread, m_bValid, m_hThread, m_pPreviewURLs, m_pSection, m_pWakeup, NULL, and ThreadStart().

Referenced by OnLButtonUp().

UINT CSearchDetailPanel::ThreadStart LPVOID  pParam  )  [static, protected]
 

Definition at line 844 of file CtrlSearchDetailPanel.cpp.

References OnRun().

Referenced by RequestPreview().

void CSearchDetailPanel::Update CMatchFile pFile  ) 
 

Definition at line 105 of file CtrlSearchDetailPanel.cpp.

References _tcsistr(), CancelPreview(), CSchema::CheckURI(), CMetaList::Clean(), ClearReviews(), CMetaList::Combine(), CMetaList::CreateLinks(), CSchemaCache::Get(), CShellIcons::Get(), CSHA::HashToString(), IDS_SEARCH_DETAILS_REVIEWS_MANY, IDS_SEARCH_DETAILS_REVIEWS_ONE, IDS_SEARCH_DETAILS_SOURCES_MANY, IDS_SEARCH_DETAILS_SOURCES_ONE, CImageFile::LoadFromMemory(), LoadString(), m_bCanPreview, m_bValid, m_nIcon32, m_nIcon48, CMatchFile::m_nPreview, CMatchFile::m_nRated, CMatchFile::m_nRating, m_nRating, CMatchFile::m_nSources, CMatchFile::m_pBest, m_pFile, CMatchFile::m_pHits, CMatchFile::m_pList, m_pMatches, m_pMetadata, CQueryHit::m_pNext, CMatchFile::m_pPreview, m_pPreviewURLs, m_pReviews, m_pSchema, m_pSection, CMatchFile::m_pSHA1, m_pSHA1, CQueryHit::m_sName, m_sName, CMatchFile::m_sSize, m_sSize, m_sStatus, NULL, OnPreviewLoaded(), OnSize(), Review, SchemaCache, Settings, CMetaList::Setup(), ShellIcons, SIZE_INTERNAL, CSettings::SmartVolume(), TS_FALSE, and CMetaList::Vote().

Referenced by CSearchWnd::OnSelChangeMatches(), CBrowseFrameCtrl::OnSelChangeMatches(), and CSearchWnd::OnTimer().


Friends And Related Function Documentation

friend class Review [friend]
 

Definition at line 80 of file CtrlSearchDetailPanel.h.

Referenced by Update().


Member Data Documentation

BOOL CSearchDetailPanel::m_bCanPreview [protected]
 

Definition at line 102 of file CtrlSearchDetailPanel.h.

Referenced by DrawThumbnail(), OnLButtonUp(), OnPreviewLoaded(), OnSetCursor(), RequestPreview(), and Update().

BOOL CSearchDetailPanel::m_bIsPreviewing [protected]
 

Definition at line 104 of file CtrlSearchDetailPanel.h.

Referenced by CancelPreview(), DrawThumbnail(), OnLButtonUp(), OnPreviewLoaded(), OnRun(), and OnSetCursor().

CBitmap CSearchDetailPanel::m_bmThumb [protected]
 

Definition at line 110 of file CtrlSearchDetailPanel.h.

Referenced by CancelPreview(), DrawThumbnail(), and OnPreviewLoaded().

BOOL CSearchDetailPanel::m_bRunPreview [protected]
 

Definition at line 103 of file CtrlSearchDetailPanel.h.

Referenced by CancelPreview(), OnPreviewLoaded(), OnRun(), and RequestPreview().

BOOL CSearchDetailPanel::m_bThread [protected]
 

Definition at line 106 of file CtrlSearchDetailPanel.h.

Referenced by OnDestroy(), OnRun(), and RequestPreview().

BOOL CSearchDetailPanel::m_bValid [protected]
 

Definition at line 85 of file CtrlSearchDetailPanel.h.

Referenced by OnLButtonUp(), OnPaint(), OnRun(), OnSetCursor(), OnSize(), RequestPreview(), and Update().

COLORREF CSearchDetailPanel::m_crLight [protected]
 

Definition at line 113 of file CtrlSearchDetailPanel.h.

Referenced by DrawThumbnail().

HANDLE CSearchDetailPanel::m_hThread [protected]
 

Definition at line 105 of file CtrlSearchDetailPanel.h.

Referenced by OnDestroy(), and RequestPreview().

int CSearchDetailPanel::m_nIcon32 [protected]
 

Definition at line 93 of file CtrlSearchDetailPanel.h.

Referenced by DrawThumbnail(), and Update().

int CSearchDetailPanel::m_nIcon48 [protected]
 

Definition at line 92 of file CtrlSearchDetailPanel.h.

Referenced by DrawThumbnail(), and Update().

int CSearchDetailPanel::m_nRating [protected]
 

Definition at line 94 of file CtrlSearchDetailPanel.h.

Referenced by OnPaint(), and Update().

int CSearchDetailPanel::m_nScrollWheelLines [protected]
 

Definition at line 98 of file CtrlSearchDetailPanel.h.

Referenced by OnMouseWheel().

int CSearchDetailPanel::m_nThumbSize [protected]
 

Definition at line 114 of file CtrlSearchDetailPanel.h.

Referenced by DrawThumbnail(), and OnPreviewLoaded().

CMatchFile* CSearchDetailPanel::m_pFile [protected]
 

Definition at line 86 of file CtrlSearchDetailPanel.h.

Referenced by CachePreviewImage(), DrawThumbnail(), and Update().

CMatchList* CSearchDetailPanel::m_pMatches [protected]
 

Definition at line 84 of file CtrlSearchDetailPanel.h.

Referenced by CachePreviewImage(), DrawThumbnail(), and Update().

CMetaPanel CSearchDetailPanel::m_pMetadata [protected]
 

Definition at line 96 of file CtrlSearchDetailPanel.h.

Referenced by OnLButtonUp(), OnPaint(), OnSetCursor(), OnSize(), and Update().

CStringList CSearchDetailPanel::m_pPreviewURLs [protected]
 

Definition at line 108 of file CtrlSearchDetailPanel.h.

Referenced by CancelPreview(), OnRun(), RequestPreview(), and Update().

CHttpRequest CSearchDetailPanel::m_pRequest [protected]
 

Definition at line 107 of file CtrlSearchDetailPanel.h.

Referenced by CancelPreview(), and ExecuteRequest().

CPtrList CSearchDetailPanel::m_pReviews [protected]
 

Definition at line 97 of file CtrlSearchDetailPanel.h.

Referenced by ClearReviews(), OnLButtonUp(), OnPaint(), OnSetCursor(), OnSize(), OnVScroll(), and Update().

CSchema* CSearchDetailPanel::m_pSchema [protected]
 

Definition at line 95 of file CtrlSearchDetailPanel.h.

Referenced by Update().

CCriticalSection CSearchDetailPanel::m_pSection [protected]
 

Definition at line 100 of file CtrlSearchDetailPanel.h.

Referenced by CancelPreview(), OnPaint(), OnPreviewLoaded(), OnRun(), RequestPreview(), and Update().

SHA1 CSearchDetailPanel::m_pSHA1 [protected]
 

Definition at line 87 of file CtrlSearchDetailPanel.h.

Referenced by DrawThumbnail(), ExecuteRequest(), OnPreviewLoaded(), OnRun(), and Update().

CEvent CSearchDetailPanel::m_pWakeup [protected]
 

Definition at line 101 of file CtrlSearchDetailPanel.h.

Referenced by OnDestroy(), OnRun(), and RequestPreview().

CRect CSearchDetailPanel::m_rcStatus [protected]
 

Definition at line 90 of file CtrlSearchDetailPanel.h.

Referenced by OnLButtonUp(), OnPaint(), and OnSetCursor().

CRect CSearchDetailPanel::m_rcThumb [protected]
 

Definition at line 112 of file CtrlSearchDetailPanel.h.

Referenced by DrawThumbnail(), OnLButtonUp(), and OnSetCursor().

CString CSearchDetailPanel::m_sName [protected]
 

Definition at line 88 of file CtrlSearchDetailPanel.h.

Referenced by OnPaint(), and Update().

CString CSearchDetailPanel::m_sSize [protected]
 

Definition at line 91 of file CtrlSearchDetailPanel.h.

Referenced by OnPaint(), and Update().

CString CSearchDetailPanel::m_sStatus [protected]
 

Definition at line 89 of file CtrlSearchDetailPanel.h.

Referenced by OnPaint(), and Update().

CSize CSearchDetailPanel::m_szThumb [protected]
 

Definition at line 111 of file CtrlSearchDetailPanel.h.

Referenced by DrawThumbnail(), and OnPreviewLoaded().


The documentation for this class was generated from the following files:
Generated on Thu Dec 15 10:40:11 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2