1 #if !defined(AFX_CONDITIONSVIEW_H__92023B7C_0AE1_4A06_B272_6CF88976DA52__INCLUDED_)
2 #define AFX_CONDITIONSVIEW_H__92023B7C_0AE1_4A06_B272_6CF88976DA52__INCLUDED_
6 #endif // _MSC_VER > 1000
7 // ConditionsView.h : header file
10 #include <afxtempl.h> // CMap
11 #include <afxcview.h> // CTreeView base class
13 #include "Condition.h"
15 typedef CArray
<HTREEITEM
,HTREEITEM
&> HTreeItemArray
;
16 typedef CList
<POSITION
,POSITION
&> TPositionList
;
17 typedef CMap
<HTREEITEM
,HTREEITEM
&,CConditionNode
*, CConditionNode
*&> CMapHTreeItemToPtr
;
21 /////////////////////////////////////////////////////////////////////////////
22 // CConditionsView view
24 class CConditionsView
: public CTreeView
27 CConditionsView(); // protected constructor used by dynamic creation
28 DECLARE_DYNCREATE(CConditionsView
)
32 // map HTREEITEM to the adress of the associated CConditionNode object
33 CMapHTreeItemToPtr m_mapItemToNode
;
35 CCondition
* m_pSelectedCondition
;
36 CCondition
* m_pDragCondition
;
37 CConditionNode
* m_pSelectedNode
;
39 CImageList
* m_pDragImage
;
40 HTREEITEM m_hitemDrag
,m_hitemDrop
;
43 BOOL m_bRDragCanceled
;
48 // expand/collapse the tree ctrl
49 void expand(UINT
= TVE_EXPAND
, HTREEITEM
= NULL
);
51 CImageList
* CreateDragImageEx(HTREEITEM hItem
);
57 // ClassWizard generated virtual function overrides
58 //{{AFX_VIRTUAL(CConditionsView)
60 virtual void OnInitialUpdate();
62 virtual void OnDraw(CDC
* pDC
); // overridden to draw this view
63 virtual void OnUpdate(CView
* pSender
, LPARAM lHint
, CObject
* pHint
);
64 virtual BOOL
PreCreateWindow(CREATESTRUCT
& cs
);
66 afx_msg
void OnMoveAsChild();
67 afx_msg
void OnMoveAsSibling();
68 afx_msg
void OnCopyAsChild();
69 afx_msg
void OnCopyAsSibling();
73 virtual ~CConditionsView();
75 virtual void AssertValid() const;
76 virtual void Dump(CDumpContext
& dc
) const;
79 // Generated message map functions
81 //{{AFX_MSG(CConditionsView)
82 afx_msg
void OnSelchanged(NMHDR
* pNMHDR
, LRESULT
* pResult
);
83 afx_msg
void OnKillFocus(CWnd
* pNewWnd
);
84 afx_msg
void OnBeginrdrag(NMHDR
* pNMHDR
, LRESULT
* pResult
);
85 afx_msg
void OnMouseMove(UINT nFlags
, CPoint point
);
86 afx_msg
void OnRButtonUp(UINT nFlags
, CPoint point
);
91 /////////////////////////////////////////////////////////////////////////////
93 //{{AFX_INSERT_LOCATION}}
94 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
96 #endif // !defined(AFX_CONDITIONSVIEW_H__92023B7C_0AE1_4A06_B272_6CF88976DA52__INCLUDED_)