home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 03 Pathfinding with Astar / 01 Matthews / ase / NodeView.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-06-30  |  1.5 KB  |  68 lines

  1.  
  2. #ifndef _AFX_NODEVIEW_H_
  3. #define _AFX_LEFTVIEW_H_
  4.  
  5. #if _MSC_VER > 1000
  6. #pragma once
  7. #endif
  8.  
  9. #include "pathfinder.h"
  10.  
  11. class CAseDoc;
  12.  
  13. class CNodeView : public CTreeView
  14. {
  15. protected:
  16.     CNodeView();
  17.     DECLARE_DYNCREATE(CNodeView)
  18.  
  19. public:
  20.     CAseDoc* GetDocument();
  21.  
  22. public:
  23.     //{{AFX_VIRTUAL(CNodeView)
  24.     public:
  25.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  26.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  27.     virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
  28.     protected:
  29.     virtual void OnInitialUpdate(); // called first time after construct
  30.     //}}AFX_VIRTUAL
  31.  
  32. public:
  33.     void DisplayGoalNode();
  34.     void OnPostAStar(_asNode *);
  35.     void OnPreAStar();
  36.     void SortOpen();
  37.     static int OnNotifyChild(_asNode *, _asNode *, int, void *);
  38.     static int OnNotifyList(_asNode *, _asNode *, int, void *);
  39.     virtual ~CNodeView();
  40. #ifdef _DEBUG
  41.     virtual void AssertValid() const;
  42.     virtual void Dump(CDumpContext& dc) const;
  43. #endif
  44.  
  45. protected:
  46.     CFont        m_cTahoma;
  47.     CImageList    m_cImageList;
  48.  
  49.     HTREEITEM    m_hGoalNode;
  50.     
  51.     static TVSORTCB    m_tvSortData;
  52.     static int CALLBACK SortByF(LPARAM, LPARAM, LPARAM);
  53.  
  54.     //{{AFX_MSG(CNodeView)
  55.     afx_msg void OnSelChanged(NMHDR* pNMHDR, LRESULT* pResult);
  56.     //}}AFX_MSG
  57.     DECLARE_MESSAGE_MAP()
  58. };
  59.  
  60. #ifndef _DEBUG  // debug version in LeftView.cpp
  61. inline CAseDoc* CNodeView::GetDocument()
  62.    { return (CAseDoc*)m_pDocument; }
  63. #endif
  64.  
  65. //{{AFX_INSERT_LOCATION}}
  66.  
  67. #endif
  68.