1 #if !defined(AFX_STATESVIEW_H__9EDCC26C_73CE_4523_AAD5_91F07F9110E7__INCLUDED_)
2 #define AFX_STATESVIEW_H__9EDCC26C_73CE_4523_AAD5_91F07F9110E7__INCLUDED_
6 #endif // _MSC_VER > 1000
7 // StatesView.h : header file
10 #include <afxcview.h> // CTreeView base class
11 #include "Logic_editorDoc.h"
14 typedef CArray
<HTREEITEM
,HTREEITEM
&> HTreeItemArray
;
15 typedef CMap
<HTREEITEM
,HTREEITEM
&,CEvent
*, CEvent
*&> CMapHTreeItemToEvent
;
21 /////////////////////////////////////////////////////////////////////////////
24 class CStatesView
: public CTreeView
27 CStatesView(); // protected constructor used by dynamic creation
28 DECLARE_DYNCREATE(CStatesView
)
32 // map HTREEITEM to the adress of the associated CEvent object
33 CMapHTreeItemToEvent m_mapItemToEvent
;
34 CEvent
* m_pSelectedEvent
;
35 CState
* m_pSelectedState
;
41 // expand/collapse the tree ctrl
42 void expand(UINT
= TVE_EXPAND
, HTREEITEM
= NULL
);
46 // ClassWizard generated virtual function overrides
47 //{{AFX_VIRTUAL(CStatesView)
49 virtual void OnInitialUpdate();
51 virtual void OnDraw(CDC
* pDC
); // overridden to draw this view
52 virtual void OnUpdate(CView
* pSender
, LPARAM lHint
, CObject
* pHint
);
53 virtual BOOL
PreCreateWindow(CREATESTRUCT
& cs
);
58 virtual ~CStatesView();
60 virtual void AssertValid() const;
61 virtual void Dump(CDumpContext
& dc
) const;
64 // Generated message map functions
66 //{{AFX_MSG(CStatesView)
67 afx_msg
void OnKillFocus(CWnd
* pNewWnd
);
68 afx_msg
void OnSelchanged(NMHDR
* pNMHDR
, LRESULT
* pResult
);
73 /////////////////////////////////////////////////////////////////////////////
75 //{{AFX_INSERT_LOCATION}}
76 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
78 #endif // !defined(AFX_STATESVIEW_H__9EDCC26C_73CE_4523_AAD5_91F07F9110E7__INCLUDED_)