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

CBrowseTreeCtrl Class Reference

#include <CtrlBrowseTree.h>

List of all members.

Public Member Functions

 CBrowseTreeCtrl ()
virtual ~CBrowseTreeCtrl ()
virtual BOOL Create (CWnd *pParentWnd)
void Clear (BOOL bGUI=TRUE)
BOOL Expand (CBrowseTreeItem *pItem, TRISTATE bExpand=TS_TRUE, BOOL bInvalidate=TRUE)
BOOL Select (CBrowseTreeItem *pItem, TRISTATE bSelect=TS_TRUE, BOOL bInvalidate=TRUE)
BOOL DeselectAll (CBrowseTreeItem *pExcept=NULL, CBrowseTreeItem *pParent=NULL, BOOL bInvalidate=TRUE)
BOOL Highlight (CBrowseTreeItem *pItem)
int GetSelectedCount () const
CBrowseTreeItemGetFirstSelected () const
CBrowseTreeItemGetLastSelected () const
CBrowseTreeItemHitTest (const POINT &point, RECT *pRect=NULL) const
BOOL GetRect (CBrowseTreeItem *pItem, RECT *pRect)
void OnTreePacket (CG2Packet *pPacket)
CSyncObject * SyncRoot ()

Protected Member Functions

void UpdateScroll ()
void ScrollBy (int nDelta)
void ScrollTo (int nPosition)
void Paint (CDC &dc, CRect &rcClient, CPoint &pt, CBrowseTreeItem *pItem)
CBrowseTreeItemHitTest (CRect &rcClient, CPoint &pt, CBrowseTreeItem *pItem, const POINT &point, RECT *pRect) const
BOOL GetRect (CPoint &pt, CBrowseTreeItem *pItem, CBrowseTreeItem *pFind, RECT *pRect)
BOOL CleanItems (CBrowseTreeItem *pItem, DWORD nCookie, BOOL bVisible)
BOOL CollapseRecursive (CBrowseTreeItem *pItem)
void NotifySelection ()
void OnTreePacket (CG2Packet *pPacket, DWORD nFinish, CBrowseTreeItem *pItem)
afx_msg void OnSize (UINT nType, int cx, int cy)
afx_msg void OnVScroll (UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)
afx_msg BOOL OnEraseBkgnd (CDC *pDC)
afx_msg void OnPaint ()
afx_msg void OnLButtonDown (UINT nFlags, CPoint point)
afx_msg void OnLButtonDblClk (UINT nFlags, CPoint point)
afx_msg BOOL OnMouseWheel (UINT nFlags, short zDelta, CPoint pt)
afx_msg void OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags)
afx_msg void OnRButtonDown (UINT nFlags, CPoint point)
afx_msg void OnMouseMove (UINT nFlags, CPoint point)
afx_msg void OnLButtonUp (UINT nFlags, CPoint point)

Protected Attributes

CCriticalSection m_csRoot
CBrowseTreeItemm_pRoot
int m_nTotal
int m_nVisible
int m_nScroll
int m_nSelected
CBrowseTreeItemm_pSelFirst
CBrowseTreeItemm_pSelLast
CBrowseTreeItemm_pFocus
DWORD m_nCleanCookie


Constructor & Destructor Documentation

CBrowseTreeCtrl::CBrowseTreeCtrl  ) 
 

Definition at line 61 of file CtrlBrowseTree.cpp.

References NULL.

CBrowseTreeCtrl::~CBrowseTreeCtrl  )  [virtual]
 

Definition at line 76 of file CtrlBrowseTree.cpp.

References m_pRoot.


Member Function Documentation

BOOL CBrowseTreeCtrl::CleanItems CBrowseTreeItem pItem,
DWORD  nCookie,
BOOL  bVisible
[protected]
 

Definition at line 334 of file CtrlBrowseTree.cpp.

References DeselectAll(), m_csRoot, CBrowseTreeItem::m_nCount, m_nTotal, m_pFocus, CBrowseTreeItem::m_pList, NULL, Select(), and TS_FALSE.

void CBrowseTreeCtrl::Clear BOOL  bGUI = TRUE  ) 
 

Definition at line 91 of file CtrlBrowseTree.cpp.

References CBrowseTreeItem::Clear(), m_csRoot, CBrowseTreeItem::m_nCount, m_nSelected, m_nTotal, m_pFocus, m_pRoot, m_pSelFirst, m_pSelLast, NULL, and UpdateScroll().

Referenced by OnTreePacket().

BOOL CBrowseTreeCtrl::CollapseRecursive CBrowseTreeItem pItem  )  [protected]
 

Definition at line 165 of file CtrlBrowseTree.cpp.

References Expand(), CBrowseTreeItem::m_bContract1, CBrowseTreeItem::m_bExpanded, m_csRoot, CBrowseTreeItem::m_nCount, CBrowseTreeItem::m_pList, m_pRoot, and TS_FALSE.

Referenced by Highlight().

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

Definition at line 84 of file CtrlBrowseTree.cpp.

References IDC_BROWSE_TREE, and NULL.

Referenced by CBrowseFrameCtrl::OnCreate().

BOOL CBrowseTreeCtrl::DeselectAll CBrowseTreeItem pExcept = NULL,
CBrowseTreeItem pParent = NULL,
BOOL  bInvalidate = TRUE
 

Definition at line 252 of file CtrlBrowseTree.cpp.

References CBrowseTreeItem::m_bSelected, m_csRoot, CBrowseTreeItem::m_nCount, CBrowseTreeItem::m_pList, m_pRoot, NULL, Select(), and TS_FALSE.

Referenced by CleanItems(), Expand(), OnKeyDown(), and OnLButtonDown().

BOOL CBrowseTreeCtrl::Expand CBrowseTreeItem pItem,
TRISTATE  bExpand = TS_TRUE,
BOOL  bInvalidate = TRUE
 

Definition at line 115 of file CtrlBrowseTree.cpp.

References DeselectAll(), CBrowseTreeItem::GetChildCount(), CBrowseTreeItem::IsVisible(), CBrowseTreeItem::m_bContract1, CBrowseTreeItem::m_bExpanded, m_csRoot, m_nTotal, NULL, TS_FALSE, TS_TRUE, TS_UNKNOWN, and UpdateScroll().

Referenced by CollapseRecursive(), Highlight(), OnKeyDown(), OnLButtonDblClk(), and OnLButtonDown().

CBrowseTreeItem * CBrowseTreeCtrl::GetFirstSelected  )  const
 

Definition at line 282 of file CtrlBrowseTree.cpp.

References m_pSelFirst.

Referenced by CBrowseFrameCtrl::OnTreeSelection().

CBrowseTreeItem * CBrowseTreeCtrl::GetLastSelected  )  const
 

Definition at line 287 of file CtrlBrowseTree.cpp.

References m_pSelLast.

BOOL CBrowseTreeCtrl::GetRect CPoint &  pt,
CBrowseTreeItem pItem,
CBrowseTreeItem pFind,
RECT *  pRect
[protected]
 

Definition at line 792 of file CtrlBrowseTree.cpp.

References CoolInterface, GetRect(), ITEM_HEIGHT, CBrowseTreeItem::m_bBold, CBrowseTreeItem::m_bExpanded, CCoolInterface::m_fntBold, CCoolInterface::m_fntNormal, CBrowseTreeItem::m_nCount, CBrowseTreeItem::m_pList, and CBrowseTreeItem::m_sText.

BOOL CBrowseTreeCtrl::GetRect CBrowseTreeItem pItem,
RECT *  pRect
 

Definition at line 773 of file CtrlBrowseTree.cpp.

References m_csRoot, CBrowseTreeItem::m_nCount, m_nScroll, CBrowseTreeItem::m_pList, and m_pRoot.

Referenced by GetRect(), Highlight(), and OnKeyDown().

int CBrowseTreeCtrl::GetSelectedCount  )  const
 

Definition at line 277 of file CtrlBrowseTree.cpp.

References m_nSelected.

Referenced by CBrowseFrameCtrl::OnTreeSelection().

BOOL CBrowseTreeCtrl::Highlight CBrowseTreeItem pItem  ) 
 

Definition at line 292 of file CtrlBrowseTree.cpp.

References CollapseRecursive(), Expand(), GetRect(), m_csRoot, m_pFocus, CBrowseTreeItem::m_pParent, m_pRoot, ScrollBy(), TS_TRUE, and UpdateScroll().

Referenced by OnKeyDown().

CBrowseTreeItem * CBrowseTreeCtrl::HitTest CRect &  rcClient,
CPoint &  pt,
CBrowseTreeItem pItem,
const POINT &  point,
RECT *  pRect
const [protected]
 

Definition at line 729 of file CtrlBrowseTree.cpp.

References HitTest(), ITEM_HEIGHT, CBrowseTreeItem::m_bExpanded, CBrowseTreeItem::m_nCount, CBrowseTreeItem::m_pList, and NULL.

CBrowseTreeItem * CBrowseTreeCtrl::HitTest const POINT &  point,
RECT *  pRect = NULL
const
 

Definition at line 709 of file CtrlBrowseTree.cpp.

References m_csRoot, CBrowseTreeItem::m_nCount, m_nScroll, CBrowseTreeItem::m_pList, m_pRoot, and NULL.

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

void CBrowseTreeCtrl::NotifySelection  )  [protected]
 

Definition at line 365 of file CtrlBrowseTree.cpp.

References BTN_SELCHANGED.

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

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

Definition at line 637 of file CtrlBrowseTree.cpp.

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

Definition at line 453 of file CtrlBrowseTree.cpp.

References DeselectAll(), Expand(), GetRect(), Highlight(), HitTest(), ITEM_HEIGHT, CBrowseTreeItem::m_bExpanded, m_csRoot, CBrowseTreeItem::m_nCount, m_pFocus, CBrowseTreeItem::m_pList, CBrowseTreeItem::m_pParent, m_pRoot, NotifySelection(), NULL, Select(), TS_FALSE, and TS_TRUE.

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

Definition at line 419 of file CtrlBrowseTree.cpp.

References Expand(), m_csRoot, CBrowseTreeItem::m_nCount, m_pFocus, NotifySelection(), NULL, OnLButtonDown(), and TS_UNKNOWN.

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

Definition at line 381 of file CtrlBrowseTree.cpp.

References DeselectAll(), Expand(), HitTest(), CBrowseTreeItem::m_bSelected, m_csRoot, CBrowseTreeItem::m_nCount, m_pFocus, NotifySelection(), Select(), and TS_UNKNOWN.

Referenced by OnLButtonDblClk(), and OnRButtonDown().

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

Definition at line 446 of file CtrlBrowseTree.cpp.

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

Definition at line 441 of file CtrlBrowseTree.cpp.

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

Definition at line 609 of file CtrlBrowseTree.cpp.

References ITEM_HEIGHT, and ScrollBy().

void CBrowseTreeCtrl::OnPaint  )  [protected]
 

Definition at line 642 of file CtrlBrowseTree.cpp.

References CoolInterface, CCoolInterface::m_crWindow, m_csRoot, CCoolInterface::m_fntNormal, CBrowseTreeItem::m_nCount, m_nScroll, CBrowseTreeItem::m_pList, m_pRoot, and Paint().

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

Definition at line 435 of file CtrlBrowseTree.cpp.

References OnLButtonDown().

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

Definition at line 374 of file CtrlBrowseTree.cpp.

References m_nVisible, and UpdateScroll().

void CBrowseTreeCtrl::OnTreePacket CG2Packet pPacket,
DWORD  nFinish,
CBrowseTreeItem pItem
[protected]
 

Definition at line 847 of file CtrlBrowseTree.cpp.

References CBrowseTreeItem::AddXML(), CXMLElement::FromString(), CBrowseTreeItem::m_bExpanded, CBrowseTreeItem::m_nFiles, CPacket::m_nPosition, CBrowseTreeItem::m_pFiles, m_pRoot, CBrowseTreeItem::m_sText, NULL, OnTreePacket(), CPacket::ReadLongBE(), CG2Packet::ReadPacket(), and CG2Packet::ReadString().

void CBrowseTreeCtrl::OnTreePacket CG2Packet pPacket  ) 
 

Definition at line 834 of file CtrlBrowseTree.cpp.

References Clear(), CBrowseTreeItem::GetChildCount(), m_csRoot, m_nTotal, and m_pRoot.

Referenced by CBrowseFrameCtrl::OnLibraryTreePhysical(), CBrowseFrameCtrl::OnLibraryTreeVirtual(), CBrowseFrameCtrl::OnPhysicalTree(), OnTreePacket(), and CBrowseFrameCtrl::OnVirtualTree().

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

Definition at line 580 of file CtrlBrowseTree.cpp.

References m_nVisible, ScrollBy(), and ScrollTo().

void CBrowseTreeCtrl::Paint CDC &  dc,
CRect &  rcClient,
CPoint &  pt,
CBrowseTreeItem pItem
[protected]
 

Definition at line 666 of file CtrlBrowseTree.cpp.

References CoolInterface, ITEM_HEIGHT, CBrowseTreeItem::m_bBold, CBrowseTreeItem::m_bExpanded, CCoolInterface::m_fntBold, CCoolInterface::m_fntNormal, CBrowseTreeItem::m_nCount, CBrowseTreeItem::m_pList, CBrowseTreeItem::m_sText, and CBrowseTreeItem::Paint().

Referenced by OnPaint().

void CBrowseTreeCtrl::ScrollBy int  nDelta  )  [protected]
 

Definition at line 615 of file CtrlBrowseTree.cpp.

References m_nScroll, and ScrollTo().

Referenced by Highlight(), OnMouseWheel(), and OnVScroll().

void CBrowseTreeCtrl::ScrollTo int  nPosition  )  [protected]
 

Definition at line 620 of file CtrlBrowseTree.cpp.

References m_csRoot, m_nScroll, NULL, and UpdateScroll().

Referenced by OnVScroll(), and ScrollBy().

BOOL CBrowseTreeCtrl::Select CBrowseTreeItem pItem,
TRISTATE  bSelect = TS_TRUE,
BOOL  bInvalidate = TRUE
 

Definition at line 188 of file CtrlBrowseTree.cpp.

References CBrowseTreeItem::IsVisible(), CBrowseTreeItem::m_bSelected, m_csRoot, m_nSelected, m_pSelFirst, m_pSelLast, CBrowseTreeItem::m_pSelNext, CBrowseTreeItem::m_pSelPrev, NULL, TS_FALSE, TS_TRUE, and TS_UNKNOWN.

Referenced by CleanItems(), DeselectAll(), OnKeyDown(), and OnLButtonDown().

CSyncObject* CBrowseTreeCtrl::SyncRoot  )  [inline]
 

Definition at line 82 of file CtrlBrowseTree.h.

References m_csRoot.

Referenced by CBrowseFrameCtrl::OnLibraryTreePhysical(), CBrowseFrameCtrl::OnLibraryTreeVirtual(), CBrowseFrameCtrl::OnPhysicalTree(), CBrowseFrameCtrl::OnTreeSelection(), and CBrowseFrameCtrl::OnVirtualTree().

void CBrowseTreeCtrl::UpdateScroll  )  [protected]
 

Definition at line 565 of file CtrlBrowseTree.cpp.

References ITEM_HEIGHT, m_csRoot, m_nScroll, m_nTotal, and m_nVisible.

Referenced by Clear(), Expand(), Highlight(), OnSize(), and ScrollTo().


Member Data Documentation

CCriticalSection CBrowseTreeCtrl::m_csRoot [protected]
 

Definition at line 41 of file CtrlBrowseTree.h.

Referenced by CleanItems(), Clear(), CollapseRecursive(), DeselectAll(), Expand(), GetRect(), Highlight(), HitTest(), OnKeyDown(), OnLButtonDblClk(), OnLButtonDown(), OnPaint(), OnTreePacket(), ScrollTo(), Select(), SyncRoot(), and UpdateScroll().

DWORD CBrowseTreeCtrl::m_nCleanCookie [protected]
 

Definition at line 52 of file CtrlBrowseTree.h.

int CBrowseTreeCtrl::m_nScroll [protected]
 

Definition at line 45 of file CtrlBrowseTree.h.

Referenced by GetRect(), HitTest(), OnPaint(), ScrollBy(), ScrollTo(), and UpdateScroll().

int CBrowseTreeCtrl::m_nSelected [protected]
 

Definition at line 47 of file CtrlBrowseTree.h.

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

int CBrowseTreeCtrl::m_nTotal [protected]
 

Definition at line 43 of file CtrlBrowseTree.h.

Referenced by CleanItems(), Clear(), Expand(), OnTreePacket(), and UpdateScroll().

int CBrowseTreeCtrl::m_nVisible [protected]
 

Definition at line 44 of file CtrlBrowseTree.h.

Referenced by OnSize(), OnVScroll(), and UpdateScroll().

CBrowseTreeItem* CBrowseTreeCtrl::m_pFocus [protected]
 

Definition at line 50 of file CtrlBrowseTree.h.

Referenced by CleanItems(), Clear(), Highlight(), OnKeyDown(), OnLButtonDblClk(), and OnLButtonDown().

CBrowseTreeItem* CBrowseTreeCtrl::m_pRoot [protected]
 

Definition at line 42 of file CtrlBrowseTree.h.

Referenced by Clear(), CollapseRecursive(), DeselectAll(), GetRect(), Highlight(), HitTest(), OnKeyDown(), OnPaint(), OnTreePacket(), and ~CBrowseTreeCtrl().

CBrowseTreeItem* CBrowseTreeCtrl::m_pSelFirst [protected]
 

Definition at line 48 of file CtrlBrowseTree.h.

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

CBrowseTreeItem* CBrowseTreeCtrl::m_pSelLast [protected]
 

Definition at line 49 of file CtrlBrowseTree.h.

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


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