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

CUploadsCtrl Class Reference

#include <CtrlUploads.h>

List of all members.

Public Member Functions

 CUploadsCtrl ()
virtual ~CUploadsCtrl ()
BOOL Create (CWnd *pParentWnd, UINT nID)
BOOL Update ()
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 void OnHScroll (UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
afx_msg BOOL OnMouseWheel (UINT nFlags, short zDelta, CPoint pt)
afx_msg void OnChangeHeader (NMHDR *pNotifyStruct, LRESULT *pResult)
afx_msg void OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void OnRButtonDown (UINT nFlags, CPoint point)
afx_msg void OnLButtonDblClk (UINT nFlags, CPoint point)
afx_msg void OnMouseMove (UINT nFlags, CPoint point)
afx_msg void OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void OnRButtonUp (UINT nFlags, CPoint point)
afx_msg void OnSetFocus (CWnd *pOldWnd)
afx_msg void OnKillFocus (CWnd *pNewWnd)

Static Public Member Functions

static POSITION GetQueueIterator ()
static CUploadQueueGetNextQueue (POSITION &pos)
static POSITION GetFileIterator (CUploadQueue *pQueue)
static CUploadFileGetNextFile (CUploadQueue *pQueue, POSITION &pos, int *pnPosition=NULL)

Protected Member Functions

void InsertColumn (int nColumn, LPCTSTR pszCaption, int nFormat, int nWidth)
void SaveColumnState ()
BOOL LoadColumnState ()
void SelectTo (int nIndex)
void DeselectAll (CUploadFile *pExcept=NULL)
BOOL HitTest (const CPoint &point, CUploadQueue **ppQueue, CUploadFile **ppFile, int *pnIndex, RECT *prcItem)
BOOL GetAt (int nSelect, CUploadQueue **ppQueue, CUploadFile **ppFile)
void PaintQueue (CDC &dc, const CRect &rcRow, CUploadQueue *pQueue, BOOL bFocus)
void PaintFile (CDC &dc, const CRect &rcRow, CUploadQueue *pQueue, CUploadFile *pFile, int nPosition, BOOL bFocus)
int GetExpandableColumnX () const

Protected Attributes

CHeaderCtrl m_wndHeader
CUploadTipCtrl m_wndTip
CImageList m_pProtocols
int m_nFocus
CUploadFilem_pDeselect
int m_nScrollWheelLines

Friends

class CUploadsWnd


Constructor & Destructor Documentation

CUploadsCtrl::CUploadsCtrl  ) 
 

Definition at line 79 of file CtrlUploads.cpp.

CUploadsCtrl::~CUploadsCtrl  )  [virtual]
 

Definition at line 88 of file CtrlUploads.cpp.


Member Function Documentation

BOOL CUploadsCtrl::Create CWnd *  pParentWnd,
UINT  nID
 

Definition at line 95 of file CtrlUploads.cpp.

References NULL.

Referenced by CUploadsWnd::OnCreate().

void CUploadsCtrl::DeselectAll CUploadFile pExcept = NULL  )  [protected]
 

Definition at line 306 of file CtrlUploads.cpp.

References CUploadFiles::GetIterator(), CUploadQueues::GetIterator(), CUploadFiles::GetNext(), CUploadQueues::GetNext(), CUploadFile::m_bSelected, CUploadQueue::m_bSelected, CUploadQueues::m_pHistoryQueue, CTransfers::m_pSection, CUploadQueues::m_pTorrentQueue, Transfers, UploadFiles, and UploadQueues.

Referenced by OnLButtonDown(), OnLButtonUp(), OnRButtonUp(), and SelectTo().

BOOL CUploadsCtrl::GetAt int  nSelect,
CUploadQueue **  ppQueue,
CUploadFile **  ppFile
[protected]
 

Definition at line 400 of file CtrlUploads.cpp.

References GetFileIterator(), GetNextFile(), GetNextQueue(), GetQueueIterator(), CUploadQueue::m_bExpanded, and NULL.

Referenced by OnKeyDown(), and SelectTo().

int CUploadsCtrl::GetExpandableColumnX  )  const [protected]
 

Definition at line 1397 of file CtrlUploads.cpp.

References m_wndHeader, and UPLOAD_COLUMN_TITLE.

Referenced by OnLButtonDblClk(), and OnLButtonDown().

POSITION CUploadsCtrl::GetFileIterator CUploadQueue pQueue  )  [static]
 

Definition at line 505 of file CtrlUploads.cpp.

References CSettings::sUploads::FilterMask, CUploadFile::GetActive(), CUploadFiles::GetIterator(), CUploadFiles::GetNext(), CUploadTransfer::m_nProtocol, CUploadTransfer::m_nState, CUploadQueues::m_pHistoryQueue, CUploadTransfer::m_pQueue, CUploadQueues::m_pTorrentQueue, NULL, PROTOCOL_BT, Settings, ULF_ACTIVE, ULF_QUEUED, UploadFiles, UploadQueues, CSettings::Uploads, and upsNull.

Referenced by GetAt(), HitTest(), OnPaint(), OnSize(), and CRemote::PageUploads().

CUploadFile * CUploadsCtrl::GetNextFile CUploadQueue pQueue,
POSITION &  pos,
int *  pnPosition = NULL
[static]
 

Definition at line 560 of file CtrlUploads.cpp.

References CSettings::sUploads::FilterMask, CUploadFile::GetActive(), CUploadFiles::GetNext(), CUploadTransfer::m_nProtocol, CUploadTransfer::m_nState, CUploadTransfer::m_pBaseFile, CUploadQueues::m_pHistoryQueue, CUploadTransfer::m_pQueue, CUploadQueues::m_pTorrentQueue, NULL, PROTOCOL_BT, Settings, ULF_QUEUED, UploadFiles, UploadQueues, CSettings::Uploads, and upsNull.

Referenced by GetAt(), HitTest(), OnPaint(), OnSize(), and CRemote::PageUploads().

CUploadQueue * CUploadsCtrl::GetNextQueue POSITION &  pos  )  [static]
 

Definition at line 462 of file CtrlUploads.cpp.

References CSettings::sUploads::FilterMask, CUploadQueues::GetIterator(), CUploadQueues::GetNext(), CUploadQueues::m_pHistoryQueue, CUploadQueues::m_pTorrentQueue, NULL, Settings, ULF_ACTIVE, ULF_HISTORY, ULF_QUEUED, UploadQueues, and CSettings::Uploads.

Referenced by GetAt(), HitTest(), OnPaint(), OnSize(), and CRemote::PageUploads().

POSITION CUploadsCtrl::GetQueueIterator  )  [static]
 

Definition at line 442 of file CtrlUploads.cpp.

References CSettings::sUploads::FilterMask, CUploadQueues::GetIterator(), CUploadQueues::m_pHistoryQueue, CUploadQueues::m_pTorrentQueue, NULL, Settings, ULF_ACTIVE, ULF_HISTORY, ULF_QUEUED, ULF_TORRENT, UploadQueues, and CSettings::Uploads.

Referenced by GetAt(), HitTest(), OnPaint(), OnSize(), and CRemote::PageUploads().

BOOL CUploadsCtrl::HitTest const CPoint &  point,
CUploadQueue **  ppQueue,
CUploadFile **  ppFile,
int *  pnIndex,
RECT *  prcItem
[protected]
 

Definition at line 329 of file CtrlUploads.cpp.

References GetFileIterator(), GetNextFile(), GetNextQueue(), GetQueueIterator(), HEADER_HEIGHT, ITEM_HEIGHT, CUploadQueue::m_bExpanded, and NULL.

Referenced by CUploadsWnd::OnContextMenu(), OnLButtonDblClk(), OnLButtonDown(), and OnMouseMove().

void CUploadsCtrl::InsertColumn int  nColumn,
LPCTSTR  pszCaption,
int  nFormat,
int  nWidth
[protected]
 

Definition at line 153 of file CtrlUploads.cpp.

References m_wndHeader.

Referenced by OnCreate().

BOOL CUploadsCtrl::LoadColumnState  )  [protected]
 

Definition at line 189 of file CtrlUploads.cpp.

References m_wndHeader, and theApp.

Referenced by OnCreate().

void CUploadsCtrl::OnChangeHeader NMHDR *  pNotifyStruct,
LRESULT *  pResult
 

Definition at line 1161 of file CtrlUploads.cpp.

References Update().

int CUploadsCtrl::OnCreate LPCREATESTRUCT  lpCreateStruct  ) 
 

Definition at line 110 of file CtrlUploads.cpp.

References CCoolTipCtrl::Create(), CreateMirroredBitmap(), IDB_PROTOCOLS, InsertColumn(), CSettings::Interface, LoadColumnState(), CShareazaApp::m_bRTL, CShareazaApp::m_gdiFont, m_nFocus, m_pDeselect, m_pProtocols, m_wndHeader, m_wndTip, NULL, Settings, theApp, CSettings::sInterface::TipUploads, UPLOAD_COLUMN_CLIENT, UPLOAD_COLUMN_PROGRESS, UPLOAD_COLUMN_RATING, UPLOAD_COLUMN_SIZE, UPLOAD_COLUMN_SPEED, UPLOAD_COLUMN_TITLE, and UPLOAD_COLUMN_USER.

void CUploadsCtrl::OnDestroy  ) 
 

Definition at line 144 of file CtrlUploads.cpp.

References SaveColumnState().

void CUploadsCtrl::OnHScroll UINT  nSBCode,
UINT  nPos,
CScrollBar *  pScrollBar
 

Definition at line 1105 of file CtrlUploads.cpp.

References HEADER_HEIGHT, m_wndHeader, and NULL.

void CUploadsCtrl::OnKeyDown UINT  nChar,
UINT  nRepCnt,
UINT  nFlags
 

Definition at line 1166 of file CtrlUploads.cpp.

References CUploadFile::GetActive(), GetAt(), CCoolTipCtrl::Hide(), CUploadQueue::m_bExpanded, m_nFocus, CTransfers::m_pSection, m_wndTip, NULL, SelectTo(), Transfers, and Update().

void CUploadsCtrl::OnKillFocus CWnd *  pNewWnd  ) 
 

Definition at line 1391 of file CtrlUploads.cpp.

void CUploadsCtrl::OnLButtonDblClk UINT  nFlags,
CPoint  point
 

Definition at line 1293 of file CtrlUploads.cpp.

References GetExpandableColumnX(), HitTest(), ID_UPLOADS_LAUNCH, CUploadQueue::m_bExpanded, CUploadFile::m_bSelected, CUploadQueue::m_pActive, CUploadTransfer::m_pBaseFile, CUploadQueue::m_pQueued, CTransfers::m_pSection, NULL, Transfers, and Update().

void CUploadsCtrl::OnLButtonDown UINT  nFlags,
CPoint  point
 

Definition at line 1224 of file CtrlUploads.cpp.

References DeselectAll(), GetExpandableColumnX(), CCoolTipCtrl::Hide(), HitTest(), CUploadQueue::m_bExpanded, CUploadFile::m_bSelected, CUploadQueue::m_pActive, CUploadTransfer::m_pBaseFile, m_pDeselect, CUploadQueue::m_pQueued, CTransfers::m_pSection, m_wndTip, NULL, SelectTo(), Transfers, and Update().

Referenced by OnRButtonDown().

void CUploadsCtrl::OnLButtonUp UINT  nFlags,
CPoint  point
 

Definition at line 1363 of file CtrlUploads.cpp.

References DeselectAll(), m_pDeselect, and NULL.

void CUploadsCtrl::OnMouseMove UINT  nFlags,
CPoint  point
 

Definition at line 1341 of file CtrlUploads.cpp.

References CCoolTipCtrl::Hide(), HitTest(), m_wndTip, NULL, and CCoolTipCtrl::Show().

BOOL CUploadsCtrl::OnMouseWheel UINT  nFlags,
short  zDelta,
CPoint  pt
 

Definition at line 1155 of file CtrlUploads.cpp.

References m_nScrollWheelLines, NULL, and OnVScroll().

void CUploadsCtrl::OnPaint  ) 
 

Definition at line 705 of file CtrlUploads.cpp.

References CoolInterface, GetFileIterator(), GetNextFile(), GetNextQueue(), GetQueueIterator(), HEADER_HEIGHT, ITEM_HEIGHT, CUploadQueue::m_bExpanded, CShareazaApp::m_bRTL, CCoolInterface::m_crWindow, CShareazaApp::m_gdiFont, m_nFocus, CTransfers::m_pSection, NULL, PaintFile(), PaintQueue(), theApp, and Transfers.

void CUploadsCtrl::OnRButtonDown UINT  nFlags,
CPoint  point
 

Definition at line 1286 of file CtrlUploads.cpp.

References CCoolTipCtrl::Hide(), m_wndTip, and OnLButtonDown().

void CUploadsCtrl::OnRButtonUp UINT  nFlags,
CPoint  point
 

Definition at line 1374 of file CtrlUploads.cpp.

References DeselectAll(), m_pDeselect, and NULL.

void CUploadsCtrl::OnSetFocus CWnd *  pOldWnd  ) 
 

Definition at line 1385 of file CtrlUploads.cpp.

void CUploadsCtrl::OnSize UINT  nType,
int  cx,
int  cy
 

Definition at line 635 of file CtrlUploads.cpp.

References GetFileIterator(), GetNextFile(), GetNextQueue(), GetQueueIterator(), HEADER_HEIGHT, ITEM_HEIGHT, CUploadQueue::m_bExpanded, CUploadQueue::m_bSelected, m_nFocus, CTransfers::m_pSection, m_wndHeader, NULL, and Transfers.

Referenced by Update().

void CUploadsCtrl::OnVScroll UINT  nSBCode,
UINT  nPos,
CScrollBar *  pScrollBar
 

Definition at line 1062 of file CtrlUploads.cpp.

Referenced by OnMouseWheel().

void CUploadsCtrl::PaintFile CDC &  dc,
const CRect &  rcRow,
CUploadQueue pQueue,
CUploadFile pFile,
int  nPosition,
BOOL  bFocus
[protected]
 

Definition at line 903 of file CtrlUploads.cpp.

References CoolInterface, CFragmentBar::DrawUpload(), CShellIcons::Get(), CUploadFile::GetActive(), CShellIcons::GetHandle(), CUploadTransfer::GetMeasuredSpeed(), IDS_STATUS_CHOKED, IDS_STATUS_COMPLETED, IDS_STATUS_NEXT, IDS_STATUS_Q, IDS_STATUS_UNINTERESTED, LoadString(), CUploadTransferBT::m_bChoked, CUploadTransferBT::m_bInterested, CUploadFile::m_bSelected, CCoolInterface::m_crBackSel, CCoolInterface::m_crBorder, CCoolInterface::m_crDisabled, CCoolInterface::m_crText, CCoolInterface::m_crWindow, CUploadTransfer::m_nProtocol, CUploadFile::m_nSize, CUploadTransfer::m_nState, CUploadTransfer::m_nUserRating, CConnection::m_sAddress, CUploadFile::m_sName, CUploadTransfer::m_sNick, CConnection::m_sUserAgent, m_wndHeader, NULL, PROTOCOL_BT, Settings, ShellIcons, CSettings::SmartVolume(), UPLOAD_COLUMN_CLIENT, UPLOAD_COLUMN_PROGRESS, UPLOAD_COLUMN_RATING, UPLOAD_COLUMN_SIZE, UPLOAD_COLUMN_SPEED, UPLOAD_COLUMN_TITLE, UPLOAD_COLUMN_USER, and upsNull.

Referenced by OnPaint().

void CUploadsCtrl::PaintQueue CDC &  dc,
const CRect &  rcRow,
CUploadQueue pQueue,
BOOL  bFocus
[protected]
 

Definition at line 773 of file CtrlUploads.cpp.

References CoolInterface, CShellIcons::GetHandle(), CUploadQueue::GetMeasuredSpeed(), CUploadQueue::GetQueuedCount(), CUploadQueue::GetTransferCount(), CUploadQueue::m_bExpanded, CUploadQueue::m_bSelected, CCoolInterface::m_crBackSel, CCoolInterface::m_crBorder, CCoolInterface::m_crText, CCoolInterface::m_crWindow, CShareazaApp::m_gdiFont, CShareazaApp::m_gdiFontBold, CUploadQueue::m_nMaxTransfers, CUploadQueue::m_nMinTransfers, CUploadQueue::m_nProtocols, CUploadQueues::m_pHistoryQueue, m_pProtocols, CUploadQueues::m_pTorrentQueue, CUploadQueue::m_sName, m_wndHeader, NULL, PROTOCOL_BT, PROTOCOL_ED2K, PROTOCOL_HTTP, Settings, ShellIcons, SHI_FOLDER_CLOSED, SHI_FOLDER_OPEN, SHI_MINUS, SHI_PLUS, CSettings::SmartVolume(), theApp, UPLOAD_COLUMN_SIZE, UPLOAD_COLUMN_SPEED, UPLOAD_COLUMN_TITLE, and UploadQueues.

Referenced by OnPaint().

void CUploadsCtrl::SaveColumnState  )  [protected]
 

Definition at line 168 of file CtrlUploads.cpp.

References m_wndHeader, and theApp.

Referenced by OnDestroy().

void CUploadsCtrl::SelectTo int  nIndex  )  [protected]
 

Definition at line 224 of file CtrlUploads.cpp.

References DeselectAll(), GetAt(), HEADER_HEIGHT, ITEM_HEIGHT, CUploadFile::m_bSelected, CUploadQueue::m_bSelected, m_nFocus, m_pDeselect, CTransfers::m_pSection, NULL, Transfers, and Update().

Referenced by OnKeyDown(), and OnLButtonDown().

BOOL CUploadsCtrl::Update  ) 
 

Definition at line 101 of file CtrlUploads.cpp.

References OnSize().

Referenced by OnChangeHeader(), OnKeyDown(), OnLButtonDblClk(), OnLButtonDown(), CUploadsWnd::OnTimer(), CUploadsWnd::OnUploadsClearCompleted(), CUploadsWnd::OnUploadsFilterActive(), CUploadsWnd::OnUploadsFilterAll(), CUploadsWnd::OnUploadsFilterHistory(), CUploadsWnd::OnUploadsFilterQueued(), CUploadsWnd::OnUploadsFilterTorrent(), and SelectTo().


Friends And Related Function Documentation

friend class CUploadsWnd [friend]
 

Definition at line 55 of file CtrlUploads.h.


Member Data Documentation

int CUploadsCtrl::m_nFocus [protected]
 

Definition at line 62 of file CtrlUploads.h.

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

int CUploadsCtrl::m_nScrollWheelLines [protected]
 

Definition at line 64 of file CtrlUploads.h.

Referenced by OnMouseWheel().

CUploadFile* CUploadsCtrl::m_pDeselect [protected]
 

Definition at line 63 of file CtrlUploads.h.

Referenced by OnCreate(), OnLButtonDown(), OnLButtonUp(), OnRButtonUp(), and SelectTo().

CImageList CUploadsCtrl::m_pProtocols [protected]
 

Definition at line 61 of file CtrlUploads.h.

Referenced by OnCreate(), and PaintQueue().

CHeaderCtrl CUploadsCtrl::m_wndHeader [protected]
 

Definition at line 59 of file CtrlUploads.h.

Referenced by GetExpandableColumnX(), InsertColumn(), LoadColumnState(), OnCreate(), OnHScroll(), OnSize(), CUploadsWnd::OnSkinChange(), PaintFile(), PaintQueue(), and SaveColumnState().

CUploadTipCtrl CUploadsCtrl::m_wndTip [protected]
 

Definition at line 60 of file CtrlUploads.h.

Referenced by OnCreate(), OnKeyDown(), OnLButtonDown(), OnMouseMove(), and OnRButtonDown().


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