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

CLibraryThumbView Class Reference

#include <CtrlLibraryThumbView.h>

Inheritance diagram for CLibraryThumbView:

CLibraryFileView CLibraryView List of all members.

Public Member Functions

 CLibraryThumbView ()
virtual ~CLibraryThumbView ()
virtual void Update ()
virtual BOOL Select (DWORD nObject)
virtual DWORD HitTestIndex (const CPoint &point) const

Protected Member Functions

void Clear ()
int GetThumbIndex (CLibraryThumbItem *pThumb) const
BOOL Select (CLibraryThumbItem *pThumb, TRISTATE bSelect=TS_TRUE)
BOOL DeselectAll (CLibraryThumbItem *pThumb=NULL)
BOOL SelectTo (CLibraryThumbItem *pThumb)
void SelectTo (int nDelta)
void UpdateScroll ()
void ScrollBy (int nDelta)
void ScrollTo (int nDelta)
CLibraryThumbItemHitTest (const CPoint &point) const
BOOL GetItemRect (CLibraryThumbItem *pThumb, CRect *pRect)
void StartDragging (CPoint &ptMouse)
CImageList * CreateDragImage (const CPoint &ptMouse)
void StartThread ()
void StopThread ()
void OnRun ()
virtual BOOL PreCreateWindow (CREATESTRUCT &cs)
afx_msg int OnCreate (LPCREATESTRUCT lpCreateStruct)
afx_msg void OnDestroy ()
afx_msg void OnSize (UINT nType, int cx, int cy)
afx_msg void OnPaint ()
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 OnMouseMove (UINT nFlags, CPoint point)
afx_msg void OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void OnRButtonDown (UINT nFlags, CPoint point)
afx_msg void OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void OnLButtonDblClk (UINT nFlags, CPoint point)
afx_msg void OnTimer (UINT nIDEvent)

Static Protected Member Functions

static int SortList (LPCVOID pA, LPCVOID pB)
static UINT ThreadStart (LPVOID pParam)

Protected Attributes

CCriticalSection m_pSection
HANDLE m_hThread
BOOL m_bThread
DWORD m_nInvalidate
BOOL m_bRush
CSize m_szThumb
CSize m_szBlock
int m_nColumns
int m_nRows
CLibraryThumbItem ** m_pList
int m_nCount
int m_nBuffer
int m_nScroll
int m_nSelected
CLibraryThumbItemm_pFocus
CLibraryThumbItemm_pFirst
CPtrList m_pSelThumb
BOOL m_bDrag
CPoint m_ptDrag

Constructor & Destructor Documentation

CLibraryThumbView::CLibraryThumbView  ) 
 

Definition at line 69 of file CtrlLibraryThumbView.cpp.

References ID_LIBRARY_VIEW_THUMBNAIL.

CLibraryThumbView::~CLibraryThumbView  )  [virtual]
 

Definition at line 74 of file CtrlLibraryThumbView.cpp.


Member Function Documentation

void CLibraryThumbView::Clear  )  [protected]
 

Definition at line 258 of file CtrlLibraryThumbView.cpp.

References m_nBuffer, m_nCount, m_nScroll, m_nSelected, m_pFirst, m_pFocus, m_pList, m_pSelThumb, NULL, CLibraryView::SelClear(), and StopThread().

Referenced by OnDestroy().

CImageList * CLibraryThumbView::CreateDragImage const CPoint &  ptMouse  )  [protected]
 

Definition at line 752 of file CtrlLibraryThumbView.cpp.

References CoolInterface, CCoolInterface::GetBuffer(), GetItemRect(), CCoolInterface::m_fntNormal, m_pSelThumb, m_szBlock, m_szThumb, MAX_DRAG_SIZE, MAX_DRAG_SIZE_2, and NULL.

Referenced by StartDragging().

BOOL CLibraryThumbView::DeselectAll CLibraryThumbItem pThumb = NULL  )  [protected]
 

Definition at line 328 of file CtrlLibraryThumbView.cpp.

References m_nCount, m_pList, Select(), and TS_FALSE.

Referenced by OnLButtonUp(), Select(), and SelectTo().

BOOL CLibraryThumbView::GetItemRect CLibraryThumbItem pThumb,
CRect *  pRect
[protected]
 

Definition at line 614 of file CtrlLibraryThumbView.cpp.

References m_nCount, m_nScroll, m_pList, and m_szBlock.

Referenced by CreateDragImage(), Select(), and SelectTo().

int CLibraryThumbView::GetThumbIndex CLibraryThumbItem pThumb  )  const [protected]
 

Definition at line 280 of file CtrlLibraryThumbView.cpp.

References m_nCount, and m_pList.

Referenced by SelectTo().

CLibraryThumbItem * CLibraryThumbView::HitTest const CPoint &  point  )  const [protected]
 

Definition at line 585 of file CtrlLibraryThumbView.cpp.

References m_nCount, m_nScroll, m_pList, m_szBlock, and NULL.

Referenced by HitTestIndex(), and OnLButtonDown().

DWORD CLibraryThumbView::HitTestIndex const CPoint &  point  )  const [virtual]
 

Implements CLibraryFileView.

Definition at line 242 of file CtrlLibraryThumbView.cpp.

References HitTest(), and CLibraryThumbItem::m_nIndex.

int CLibraryThumbView::OnCreate LPCREATESTRUCT  lpCreateStruct  )  [protected]
 

Reimplemented from CLibraryFileView.

Definition at line 87 of file CtrlLibraryThumbView.cpp.

References CSettings::Library, m_bDrag, m_bRush, m_bThread, m_hThread, m_nBuffer, m_nColumns, m_nCount, m_nInvalidate, m_nRows, m_nScroll, m_nSelected, m_pFirst, m_pFocus, m_pList, m_szBlock, m_szThumb, NULL, CLibraryFileView::OnCreate(), Settings, and CSettings::sLibrary::ThumbSize.

void CLibraryThumbView::OnDestroy  )  [protected]
 

Definition at line 116 of file CtrlLibraryThumbView.cpp.

References Clear().

void CLibraryThumbView::OnKeyDown UINT  nChar,
UINT  nRepCnt,
UINT  nFlags
[protected]
 

Reimplemented from CLibraryFileView.

Definition at line 701 of file CtrlLibraryThumbView.cpp.

References m_nColumns, m_nCount, m_nRows, CLibraryFileView::OnKeyDown(), and SelectTo().

void CLibraryThumbView::OnLButtonDblClk UINT  nFlags,
CPoint  point
[protected]
 

Definition at line 690 of file CtrlLibraryThumbView.cpp.

References ID_LIBRARY_LAUNCH.

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

Reimplemented from CLibraryFileView.

Definition at line 645 of file CtrlLibraryThumbView.cpp.

References HitTest(), m_bDrag, m_ptDrag, CLibraryFileView::OnLButtonDown(), and SelectTo().

Referenced by OnRButtonDown().

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

Definition at line 679 of file CtrlLibraryThumbView.cpp.

References DeselectAll(), m_bDrag, CLibraryThumbItem::m_bSelected, and m_pFocus.

void CLibraryThumbView::OnMouseMove UINT  nFlags,
CPoint  point
[protected]
 

Reimplemented from CLibraryFileView.

Definition at line 663 of file CtrlLibraryThumbView.cpp.

References m_bDrag, m_ptDrag, CLibraryFileView::OnMouseMove(), and StartDragging().

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

Definition at line 502 of file CtrlLibraryThumbView.cpp.

References m_szBlock, and ScrollBy().

void CLibraryThumbView::OnPaint  )  [protected]
 

Definition at line 533 of file CtrlLibraryThumbView.cpp.

References CoolInterface, CCoolInterface::GetBuffer(), m_bRush, CCoolInterface::m_crText, CCoolInterface::m_crWindow, CCoolInterface::m_fntNormal, m_nCount, m_nScroll, CLibraryThumbItem::m_nThumb, m_pList, m_pSection, m_szBlock, m_szThumb, CLibraryThumbItem::Paint(), and CLibraryThumbItem::thumbWaiting.

void CLibraryThumbView::OnRButtonDown UINT  nFlags,
CPoint  point
[protected]
 

Reimplemented from CLibraryFileView.

Definition at line 695 of file CtrlLibraryThumbView.cpp.

References OnLButtonDown(), and CLibraryFileView::OnRButtonDown().

void CLibraryThumbView::OnRun  )  [protected]
 

Definition at line 917 of file CtrlLibraryThumbView.cpp.

References CImageFile::CreateBitmap(), CImageFile::EnsureRGB(), Library, CThumbCache::Load(), CImageFile::LoadFromFile(), CLibrary::LookupFile(), m_bRush, m_bThread, m_nCount, CImageFile::m_nHeight, CLibraryThumbItem::m_nIndex, m_nInvalidate, CImageFile::m_nWidth, m_pList, CLibrary::m_pSection, m_pSection, m_szThumb, NULL, CImageFile::Resample(), CThumbCache::Store(), THUMB_STORE_SIZE, CLibraryThumbItem::thumbError, CLibraryThumbItem::thumbValid, and CLibraryThumbItem::thumbWaiting.

Referenced by ThreadStart().

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

Definition at line 437 of file CtrlLibraryThumbView.cpp.

References m_nColumns, m_nRows, m_szBlock, and UpdateScroll().

void CLibraryThumbView::OnTimer UINT  nIDEvent  )  [protected]
 

Definition at line 522 of file CtrlLibraryThumbView.cpp.

References m_nInvalidate, and m_pSection.

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

Definition at line 468 of file CtrlLibraryThumbView.cpp.

References ScrollBy(), and ScrollTo().

BOOL CLibraryThumbView::PreCreateWindow CREATESTRUCT &  cs  )  [protected, virtual]
 

Definition at line 81 of file CtrlLibraryThumbView.cpp.

void CLibraryThumbView::ScrollBy int  nDelta  )  [protected]
 

Definition at line 508 of file CtrlLibraryThumbView.cpp.

References m_nScroll, and ScrollTo().

Referenced by OnMouseWheel(), OnVScroll(), Select(), and SelectTo().

void CLibraryThumbView::ScrollTo int  nDelta  )  [protected]
 

Definition at line 513 of file CtrlLibraryThumbView.cpp.

References m_nScroll, NULL, and UpdateScroll().

Referenced by OnVScroll(), and ScrollBy().

BOOL CLibraryThumbView::Select CLibraryThumbItem pThumb,
TRISTATE  bSelect = TS_TRUE
[protected]
 

Definition at line 292 of file CtrlLibraryThumbView.cpp.

References m_nSelected, m_pSelThumb, CLibraryView::SelAdd(), CLibraryView::SelRemove(), TS_FALSE, TS_TRUE, and TS_UNKNOWN.

BOOL CLibraryThumbView::Select DWORD  nObject  )  [virtual]
 

Reimplemented from CLibraryView.

Definition at line 207 of file CtrlLibraryThumbView.cpp.

References DeselectAll(), GetItemRect(), m_nCount, CLibraryThumbItem::m_nIndex, m_pFocus, m_pList, and ScrollBy().

Referenced by DeselectAll(), SelectTo(), and Update().

void CLibraryThumbView::SelectTo int  nDelta  )  [protected]
 

Definition at line 414 of file CtrlLibraryThumbView.cpp.

References GetThumbIndex(), m_nCount, m_pFocus, m_pList, and SelectTo().

BOOL CLibraryThumbView::SelectTo CLibraryThumbItem pThumb  )  [protected]
 

Definition at line 344 of file CtrlLibraryThumbView.cpp.

References DeselectAll(), GetItemRect(), GetThumbIndex(), CLibraryThumbItem::m_bSelected, m_nSelected, m_pFirst, m_pFocus, m_pList, NULL, ScrollBy(), Select(), TS_TRUE, and TS_UNKNOWN.

Referenced by OnKeyDown(), OnLButtonDown(), and SelectTo().

int CLibraryThumbView::SortList LPCVOID  pA,
LPCVOID  pB
[static, protected]
 

Definition at line 248 of file CtrlLibraryThumbView.cpp.

References CLibraryThumbItem::m_sText.

Referenced by Update().

void CLibraryThumbView::StartDragging CPoint &  ptMouse  )  [protected]
 

Definition at line 740 of file CtrlLibraryThumbView.cpp.

References CreateDragImage(), CLibraryView::DragObjects(), and m_pSection.

Referenced by OnMouseMove().

void CLibraryThumbView::StartThread  )  [protected]
 

Definition at line 847 of file CtrlLibraryThumbView.cpp.

References m_bThread, m_hThread, m_nCount, m_pList, m_pSection, NULL, StopThread(), ThreadStart(), and CLibraryThumbItem::thumbWaiting.

Referenced by Update().

void CLibraryThumbView::StopThread  )  [protected]
 

Definition at line 881 of file CtrlLibraryThumbView.cpp.

References m_bThread, m_hThread, m_pSection, CShareazaApp::Message(), MSG_DEBUG, NULL, and theApp.

Referenced by Clear(), and StartThread().

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

Definition at line 910 of file CtrlLibraryThumbView.cpp.

References OnRun().

Referenced by StartThread().

void CLibraryThumbView::Update  )  [virtual]
 

Reimplemented from CLibraryView.

Definition at line 126 of file CtrlLibraryThumbView.cpp.

References CSchema::Equals(), CSchema::FilterType(), CSettings::sLibrary::FilterURI, CSchemaCache::Get(), CLibraryMaps::GetFileIterator(), CLibraryView::GetFolderCookie(), CLibraryMaps::GetNextFile(), Library, CSettings::Library, LibraryMaps, CLibrary::LookupFile(), CLibraryThumbItem::m_bSelected, m_nBuffer, m_nColumns, m_nCount, CLibraryThumbItem::m_nIndex, CLibraryFile::m_nListCookie, m_nScroll, CLibraryFile::m_nSelectCookie, m_pFirst, m_pFocus, m_pList, CLibraryFile::m_pMetadata, CLibraryFile::m_pSchema, m_pSection, CLibraryFile::m_sName, m_szBlock, NULL, SchemaCache, Select(), Settings, CSettings::sLibrary::ShowVirtual, SortList(), StartThread(), TS_FALSE, CLibraryThumbItem::Update(), and UpdateScroll().

void CLibraryThumbView::UpdateScroll  )  [protected]
 

Definition at line 447 of file CtrlLibraryThumbView.cpp.

References m_nColumns, m_nCount, m_nScroll, and m_szBlock.

Referenced by OnSize(), ScrollTo(), and Update().


Member Data Documentation

BOOL CLibraryThumbView::m_bDrag [protected]
 

Definition at line 64 of file CtrlLibraryThumbView.h.

Referenced by OnCreate(), OnLButtonDown(), OnLButtonUp(), and OnMouseMove().

BOOL CLibraryThumbView::m_bRush [protected]
 

Definition at line 48 of file CtrlLibraryThumbView.h.

Referenced by OnCreate(), OnPaint(), and OnRun().

BOOL CLibraryThumbView::m_bThread [protected]
 

Definition at line 46 of file CtrlLibraryThumbView.h.

Referenced by OnCreate(), OnRun(), StartThread(), and StopThread().

HANDLE CLibraryThumbView::m_hThread [protected]
 

Definition at line 45 of file CtrlLibraryThumbView.h.

Referenced by OnCreate(), StartThread(), and StopThread().

int CLibraryThumbView::m_nBuffer [protected]
 

Definition at line 57 of file CtrlLibraryThumbView.h.

Referenced by Clear(), OnCreate(), and Update().

int CLibraryThumbView::m_nColumns [protected]
 

Definition at line 52 of file CtrlLibraryThumbView.h.

Referenced by OnCreate(), OnKeyDown(), OnSize(), Update(), and UpdateScroll().

int CLibraryThumbView::m_nCount [protected]
 

Definition at line 56 of file CtrlLibraryThumbView.h.

Referenced by Clear(), DeselectAll(), GetItemRect(), GetThumbIndex(), HitTest(), OnCreate(), OnKeyDown(), OnPaint(), OnRun(), Select(), SelectTo(), StartThread(), Update(), and UpdateScroll().

DWORD CLibraryThumbView::m_nInvalidate [protected]
 

Definition at line 47 of file CtrlLibraryThumbView.h.

Referenced by OnCreate(), OnRun(), and OnTimer().

int CLibraryThumbView::m_nRows [protected]
 

Definition at line 53 of file CtrlLibraryThumbView.h.

Referenced by OnCreate(), OnKeyDown(), and OnSize().

int CLibraryThumbView::m_nScroll [protected]
 

Definition at line 58 of file CtrlLibraryThumbView.h.

Referenced by Clear(), GetItemRect(), HitTest(), OnCreate(), OnPaint(), ScrollBy(), ScrollTo(), Update(), and UpdateScroll().

int CLibraryThumbView::m_nSelected [protected]
 

Definition at line 60 of file CtrlLibraryThumbView.h.

Referenced by Clear(), OnCreate(), Select(), and SelectTo().

CLibraryThumbItem* CLibraryThumbView::m_pFirst [protected]
 

Definition at line 62 of file CtrlLibraryThumbView.h.

Referenced by Clear(), OnCreate(), SelectTo(), and Update().

CLibraryThumbItem* CLibraryThumbView::m_pFocus [protected]
 

Definition at line 61 of file CtrlLibraryThumbView.h.

Referenced by Clear(), OnCreate(), OnLButtonUp(), Select(), SelectTo(), and Update().

CLibraryThumbItem** CLibraryThumbView::m_pList [protected]
 

Definition at line 55 of file CtrlLibraryThumbView.h.

Referenced by Clear(), DeselectAll(), GetItemRect(), GetThumbIndex(), HitTest(), OnCreate(), OnPaint(), OnRun(), Select(), SelectTo(), StartThread(), and Update().

CCriticalSection CLibraryThumbView::m_pSection [protected]
 

Definition at line 44 of file CtrlLibraryThumbView.h.

Referenced by OnPaint(), OnRun(), OnTimer(), StartDragging(), StartThread(), StopThread(), and Update().

CPtrList CLibraryThumbView::m_pSelThumb [protected]
 

Definition at line 63 of file CtrlLibraryThumbView.h.

Referenced by Clear(), CreateDragImage(), and Select().

CPoint CLibraryThumbView::m_ptDrag [protected]
 

Definition at line 65 of file CtrlLibraryThumbView.h.

Referenced by OnLButtonDown(), and OnMouseMove().

CSize CLibraryThumbView::m_szBlock [protected]
 

Definition at line 51 of file CtrlLibraryThumbView.h.

Referenced by CreateDragImage(), GetItemRect(), HitTest(), OnCreate(), OnMouseWheel(), OnPaint(), OnSize(), Update(), and UpdateScroll().

CSize CLibraryThumbView::m_szThumb [protected]
 

Definition at line 50 of file CtrlLibraryThumbView.h.

Referenced by CreateDragImage(), OnCreate(), OnPaint(), and OnRun().


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