#if !defined(AFX_OBJLISTVIEW_H__A6108347_28DD_4F1F_A834_EECD8641581B__INCLUDED_)
#define AFX_OBJLISTVIEW_H__A6108347_28DD_4F1F_A834_EECD8641581B__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ObjListView.h : header file
//

#include "ObjManListTarget.h"
#include "ObjManListCtrl.h"
#include "GlobalFlags.h"

class GUIObjectList;
class EdGUIObject;
class CObjTreeView;
class ObjectManager;
class GUIObjectList;

/////////////////////////////////////////////////////////////////////////////
// CObjListView view

class CObjListView : public CView
{
protected:
	CObjListView();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(CObjListView)
	CObjManListCtrl m_List;
	COleDropSource DropSource;
	CObjManListTarget DropTarget;
	EdGUIObject *ObjectAtPoint(CPoint &pnt);
	void ListDropAt(CPoint &pnt);
	bool CanListDropAt(CPoint &pnt);

	// Attributes
public:
	ObjectManager *ObjMan;
	GUIObjectList *MyList;
	CObjTreeView *MyTree;
	void Refresh(GUIObjectList *objman);
	void SetImageList(CImageList *ilist);
	void UpdateSelState(); 
	void DeleteSelected();
	bool AllSelected();
	void AddSelectedToGroup(GUIObjectList *group);

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CObjListView)
	protected:
	virtual void OnDraw(CDC* pDC);      // overridden to draw this view
	virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
	//}}AFX_VIRTUAL

// Implementation
protected:
	void UpdateDataSel();
	virtual ~CObjListView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
protected:
	//{{AFX_MSG(CObjListView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_OBJLISTVIEW_H__A6108347_28DD_4F1F_A834_EECD8641581B__INCLUDED_)
