bitmap_tree Class Reference

#include <bitmap_tree.h>

List of all members.

Public Member Functions

 bitmap_tree ()
virtual ~bitmap_tree ()
int SetNormalImages (UINT bitmap, int number, COLORREF mask)
int SetOverlayImages (UINT bitmap, COLORREF mask)
int SetStateImages (UINT bitmap, int number, COLORREF mask)
void SetSortFunction (PFNTVCOMPARE func, LPARAM l)
void SetDocumentSortFunction (int offset)
void SetExpandable (int base)
void SetDraggable (int base)
void SetDropTarget (int base)
void SetMultiSelect (bool b=true)
void SetDrag (TREE_CALLBACK func, UINT bitmap=0, COLORREF mask=0)
void SetSelChange (bool b)
int ItemOffset () const
int GetNormalImageCount ()
bool GetOverlayImageCount ()
int GetStateImageCount ()
bool IsSelected (HTREEITEM h)
bool AreMultiSelected ()
bool IsExpandable (int base)
virtual bool IsDraggable (HTREEITEM, int base)
virtual bool IsDropTarget (HTREEITEM, int base)
void SetExpandImage (HTREEITEM hitem, bool expand)
HTREEITEM GetItemUnderMouse (TV_HITTESTINFO *t=NULL)
void ToggleTree (UINT code, HTREEITEM hitem=NULL)
void SortTree (HTREEITEM hitem=NULL)
bool DoForAllSelected (TREE_CALLBACK func, HTREEITEM hitem, LPARAM l)
bool DoForAll (TREE_CALLBACK func, HTREEITEM hitem, LPARAM l)
void ClearMultiSelect ()
void SelectAnotherItem (HTREEITEM h, bool select)
void SelectRange (HTREEITEM h1, HTREEITEM h2)
int GetOverlayInfo (HTREEITEM hitem)
int GetStateImageInfo (HTREEITEM hitem)
void start_timer ()
void stop_timer ()

Static Public Member Functions

static bool MoveTreeItemCB (bitmap_tree *bt, HTREEITEM h, LPARAM l)
static bool ClearSelection (bitmap_tree *bt, HTREEITEM h, LPARAM l)
static bool PrepareDrag (bitmap_tree *bt, HTREEITEM h, LPARAM l)
static int CALLBACK NodeTypeCompare (LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)

Protected Member Functions

void SetOverlayInfo (HTREEITEM hitem, int image)
void SetStateImageInfo (HTREEITEM hi, int image)
virtual BOOL OnExpanded (NMHDR *pNMHDR, LRESULT *pResult)
virtual BOOL OnSelChanging (NMHDR *pNMHDR, LRESULT *pResult)
virtual BOOL OnClick (NMHDR *pNMHDR, LRESULT *pResult)
virtual BOOL OnKey (NMHDR *pNMHDR, LRESULT *pResult)
virtual BOOL OnDoubleClick (NMHDR *pNMHDR, LRESULT *pResult)
virtual BOOL OnBeginDrag (NMHDR *pNMHDR, LRESULT *pResult)
virtual BOOL OnDelete (NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void OnLButtonUp (UINT nFlags, CPoint point)
afx_msg void OnMouseMove (UINT nFlags, CPoint point)
afx_msg void OnTimer (UINT nIDEvent)


Detailed Description

Definition at line 33 of file bitmap_tree.h.


Constructor & Destructor Documentation

bitmap_tree::bitmap_tree (  ) 

Definition at line 136 of file bitmap_tree.cpp.

bitmap_tree::~bitmap_tree (  )  [virtual]

Definition at line 161 of file bitmap_tree.cpp.


Member Function Documentation

int bitmap_tree::SetNormalImages ( UINT  bitmap,
int  number,
COLORREF  mask 
)

Definition at line 211 of file bitmap_tree.cpp.

References LoadBitmap.

int bitmap_tree::SetOverlayImages ( UINT  bitmap,
COLORREF  mask 
)

Definition at line 244 of file bitmap_tree.cpp.

References common::BAD_INPUT, and LoadBitmap.

int bitmap_tree::SetStateImages ( UINT  bitmap,
int  number,
COLORREF  mask 
)

Definition at line 285 of file bitmap_tree.cpp.

References LoadBitmap.

void bitmap_tree::SetSortFunction ( PFNTVCOMPARE  func,
LPARAM  l 
)

Definition at line 453 of file bitmap_tree.cpp.

Referenced by SetDocumentSortFunction().

void bitmap_tree::SetDocumentSortFunction ( int  offset  ) 

Definition at line 460 of file bitmap_tree.cpp.

References NodeTypeCompare(), and SetSortFunction().

void bitmap_tree::SetExpandable ( int  base  ) 

Definition at line 167 of file bitmap_tree.cpp.

void bitmap_tree::SetDraggable ( int  base  ) 

Definition at line 179 of file bitmap_tree.cpp.

void bitmap_tree::SetDropTarget ( int  base  ) 

Definition at line 191 of file bitmap_tree.cpp.

void bitmap_tree::SetMultiSelect ( bool  b = true  ) 

Definition at line 203 of file bitmap_tree.cpp.

References ClearMultiSelect().

void bitmap_tree::SetDrag ( TREE_CALLBACK  func,
UINT  bitmap = 0,
COLORREF  mask = 0 
)

void bitmap_tree::SetSelChange ( bool  b  )  [inline]

Definition at line 51 of file bitmap_tree.h.

Referenced by DoForAllSelected().

int bitmap_tree::ItemOffset (  )  const [inline]

Definition at line 55 of file bitmap_tree.h.

Referenced by NodeTypeCompare().

int bitmap_tree::GetNormalImageCount (  )  [inline]

Definition at line 57 of file bitmap_tree.h.

Referenced by OnBeginDrag(), and OnExpanded().

bool bitmap_tree::GetOverlayImageCount (  )  [inline]

Definition at line 61 of file bitmap_tree.h.

int bitmap_tree::GetStateImageCount (  )  [inline]

Definition at line 63 of file bitmap_tree.h.

bool bitmap_tree::IsSelected ( HTREEITEM  h  )  [inline]

Definition at line 65 of file bitmap_tree.h.

Referenced by DoForAllSelected(), OnClick(), OnKey(), and SelectAnotherItem().

bool bitmap_tree::AreMultiSelected (  )  [inline]

Definition at line 67 of file bitmap_tree.h.

bool bitmap_tree::IsExpandable ( int  base  ) 

Definition at line 173 of file bitmap_tree.cpp.

Referenced by OnExpanded().

bool bitmap_tree::IsDraggable ( HTREEITEM  ,
int  base 
) [virtual]

Definition at line 185 of file bitmap_tree.cpp.

Referenced by MoveTreeItemCB(), OnBeginDrag(), and PrepareDrag().

bool bitmap_tree::IsDropTarget ( HTREEITEM  ,
int  base 
) [virtual]

Definition at line 197 of file bitmap_tree.cpp.

Referenced by OnMouseMove().

void bitmap_tree::SetExpandImage ( HTREEITEM  hitem,
bool  expand 
)

HTREEITEM bitmap_tree::GetItemUnderMouse ( TV_HITTESTINFO *  t = NULL  ) 

Definition at line 315 of file bitmap_tree.cpp.

Referenced by OnClick(), and OnMouseMove().

void bitmap_tree::ToggleTree ( UINT  code,
HTREEITEM  hitem = NULL 
)

Definition at line 504 of file bitmap_tree.cpp.

References NULL.

void bitmap_tree::SortTree ( HTREEITEM  hitem = NULL  ) 

Definition at line 469 of file bitmap_tree.cpp.

References NULL.

bool bitmap_tree::DoForAllSelected ( TREE_CALLBACK  func,
HTREEITEM  hitem,
LPARAM  l 
)

Definition at line 340 of file bitmap_tree.cpp.

References IsSelected(), NULL, and SetSelChange().

Referenced by ClearMultiSelect(), OnBeginDrag(), and OnLButtonUp().

bool bitmap_tree::DoForAll ( TREE_CALLBACK  func,
HTREEITEM  hitem,
LPARAM  l 
)

void bitmap_tree::ClearMultiSelect (  ) 

Definition at line 385 of file bitmap_tree.cpp.

References ClearSelection(), DoForAllSelected(), and NULL.

Referenced by OnClick(), OnDoubleClick(), OnKey(), OnLButtonUp(), and SetMultiSelect().

void bitmap_tree::SelectAnotherItem ( HTREEITEM  h,
bool  select 
)

Definition at line 435 of file bitmap_tree.cpp.

References IsSelected().

Referenced by ClearSelection(), OnClick(), OnKey(), PrepareDrag(), and SelectRange().

void bitmap_tree::SelectRange ( HTREEITEM  h1,
HTREEITEM  h2 
)

Definition at line 397 of file bitmap_tree.cpp.

References NULL, and SelectAnotherItem().

Referenced by OnClick().

int bitmap_tree::GetOverlayInfo ( HTREEITEM  hitem  )  [inline]

Definition at line 90 of file bitmap_tree.h.

References OVERLAY_MASK_TO_INDEX.

int bitmap_tree::GetStateImageInfo ( HTREEITEM  hitem  )  [inline]

Definition at line 94 of file bitmap_tree.h.

References STATE_IMAGE_MASK_TO_INDEX.

void bitmap_tree::start_timer (  ) 

Definition at line 764 of file bitmap_tree.cpp.

References EVENT_DRAG_SCROLL, and NULL.

Referenced by OnBeginDrag(), and OnTimer().

void bitmap_tree::stop_timer (  ) 

Definition at line 769 of file bitmap_tree.cpp.

References EVENT_DRAG_SCROLL.

Referenced by OnTimer().

static bool bitmap_tree::MoveTreeItemCB ( bitmap_tree bt,
HTREEITEM  h,
LPARAM  l 
) [static]

bool bitmap_tree::ClearSelection ( bitmap_tree bt,
HTREEITEM  h,
LPARAM  l 
) [static]

Definition at line 75 of file bitmap_tree.cpp.

References SelectAnotherItem().

Referenced by ClearMultiSelect().

bool bitmap_tree::PrepareDrag ( bitmap_tree bt,
HTREEITEM  h,
LPARAM  l 
) [static]

Definition at line 84 of file bitmap_tree.cpp.

References IsDraggable(), and SelectAnotherItem().

Referenced by OnBeginDrag().

int CALLBACK bitmap_tree::NodeTypeCompare ( LPARAM  lParam1,
LPARAM  lParam2,
LPARAM  lParamSort 
) [static]

Definition at line 52 of file bitmap_tree.cpp.

References ItemOffset().

Referenced by SetDocumentSortFunction().

void bitmap_tree::SetOverlayInfo ( HTREEITEM  hitem,
int  image 
) [inline, protected]

Definition at line 112 of file bitmap_tree.h.

void bitmap_tree::SetStateImageInfo ( HTREEITEM  hi,
int  image 
) [inline, protected]

Definition at line 114 of file bitmap_tree.h.

BOOL bitmap_tree::OnExpanded ( NMHDR *  pNMHDR,
LRESULT *  pResult 
) [protected, virtual]

Definition at line 525 of file bitmap_tree.cpp.

References GetNormalImageCount(), and IsExpandable().

BOOL bitmap_tree::OnSelChanging ( NMHDR *  pNMHDR,
LRESULT *  pResult 
) [protected, virtual]

Definition at line 555 of file bitmap_tree.cpp.

References KEY_PRESSED.

BOOL bitmap_tree::OnClick ( NMHDR *  pNMHDR,
LRESULT *  pResult 
) [protected, virtual]

Definition at line 615 of file bitmap_tree.cpp.

References ClearMultiSelect(), GetItemUnderMouse(), IsSelected(), KEY_PRESSED, SelectAnotherItem(), and SelectRange().

BOOL bitmap_tree::OnKey ( NMHDR *  pNMHDR,
LRESULT *  pResult 
) [protected, virtual]

Definition at line 569 of file bitmap_tree.cpp.

References ClearMultiSelect(), IsSelected(), KEY_PRESSED, NULL, and SelectAnotherItem().

BOOL bitmap_tree::OnDoubleClick ( NMHDR *  pNMHDR,
LRESULT *  pResult 
) [protected, virtual]

Definition at line 653 of file bitmap_tree.cpp.

References ClearMultiSelect().

BOOL bitmap_tree::OnBeginDrag ( NMHDR *  pNMHDR,
LRESULT *  pResult 
) [protected, virtual]

Definition at line 706 of file bitmap_tree.cpp.

References DoForAllSelected(), GetNormalImageCount(), IsDraggable(), NULL, PrepareDrag(), and start_timer().

BOOL bitmap_tree::OnDelete ( NMHDR *  pNMHDR,
LRESULT *  pResult 
) [protected, virtual]

Definition at line 660 of file bitmap_tree.cpp.

References NULL.

void bitmap_tree::OnLButtonUp ( UINT  nFlags,
CPoint  point 
) [protected]

Definition at line 678 of file bitmap_tree.cpp.

References ClearMultiSelect(), DoForAllSelected(), EVENT_DRAG_SCROLL, and NULL.

void bitmap_tree::OnMouseMove ( UINT  nFlags,
CPoint  point 
) [protected]

Definition at line 828 of file bitmap_tree.cpp.

References GetItemUnderMouse(), IsDropTarget(), and NULL.

void bitmap_tree::OnTimer ( UINT  nIDEvent  )  [protected]

Definition at line 774 of file bitmap_tree.cpp.

References EVENT_DRAG_SCROLL, NULL, start_timer(), and stop_timer().


The documentation for this class was generated from the following files:
Generated on Tue Aug 19 05:12:11 2008 for HOOPLE Libraries by  doxygen 1.5.1