// MainFrm.h : interface of the CMainFrame class
//

#pragma once

#include "ObjectInfoDialogBar.h"
//#include "GLinkedList.h"
#include "MouseTracker.h"
#include "SideBar.h"
#include "TreeBar.h"
class CINKSDoc;
class CINKSView;

class CommonObject;
class CMainFrame : public CMDIFrameWnd
{
	DECLARE_DYNAMIC(CMainFrame)
public:
	CMainFrame();
	virtual ~CMainFrame();
	
	void UpdateMousePos(CPoint p1, CPoint p2, CPoint p3);

	BOOL SetCursor(int iHandle);
	void UpdateCreateBar(CMouseTracker::Mode m, CMouseTracker::CreateMode cm);
	void UpdateTreeBar(CString strSelectedView); // updates treebar by highlighting selected document/view
	
private:
	
	BOOL GetToolText(UINT nID, CString& strTipText );
	bool LoadCursors();

public:
	//CInnerDialog m_ColorsDialogBar;
	//CObjectInfoDialogBar m_ObjectInfoDialogBar;
	CSideBar m_SideBar;
	CTreeBar m_TreeBar;
	//CSideBar *m_pSideBar;

	CStatusBar m_wndStatusBar;
	CToolBar m_wndToolBar;
	CToolBar m_wndDrawToolBar;
	
	CToolBar m_wndPushToolBar;
	CImageList m_PushToolImageList;
	CImageList m_PushToolImageListDisabled;

	CToolBar m_wndZoomBar;
	CImageList m_ZoomToolImageList;
	CImageList m_ZoomToolImageListDisabled;

	CMouseTracker::Mode m_nMouseTrackerMode;
	CMouseTracker::CreateMode m_nMouseTrackerCreate;

private:
	static HCURSOR g_hCursor[10];

	CStatic* m_staticIns;
	int m_nIns;
	CStatic* m_staticOuts;
	int m_nOuts;
	CFont *m_pFont;


// overrides:
public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	BOOL OnToolTipText(UINT nID, NMHDR *pNMHDR, LRESULT *pResult);

#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

// Generated message map functions
protected:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	DECLARE_MESSAGE_MAP()

public:


public:
	afx_msg void OnBnClickedSidebutton1();
public:
	afx_msg void OnBnClickedSidebutton2();
public:
	afx_msg void OnDeltaposSiderotspin1(NMHDR *pNMHDR, LRESULT *pResult);
public:
	afx_msg void OnDeltaposSiderotspin2(NMHDR *pNMHDR, LRESULT *pResult);
public:
	afx_msg void OnEnKillfocusSiderotedit1();
public:
	afx_msg void OnEnKillfocusSiderotedit2();
public:
	afx_msg void OnViewToolbar();
public:
	afx_msg void OnUpdateViewToolbar(CCmdUI *pCmdUI);
public:
	afx_msg void OnViewZoombar();
public:
	afx_msg void OnUpdateViewZoombar(CCmdUI *pCmdUI);
public:
	afx_msg void OnViewPushbar();
public:
	afx_msg void OnUpdateViewPushbar(CCmdUI *pCmdUI);
public:
	afx_msg void OnViewStatusbar();
public:
	afx_msg void OnUpdateViewStatusbar(CCmdUI *pCmdUI);
public:
//	afx_msg void OnClose();
	afx_msg void OnUpdateAddScheme(CCmdUI *pCmdUI);
	afx_msg void DisableItem(CCmdUI *pCmdUI);
};




static UINT Mindicators[] =
{
	ID_XYMOUSEPOS,
	ID_SEPARATOR,
	ID_XYMOUSEPOSSNAPPED
};

static UINT indicators[] =
{
	ID_SEPARATOR,           // status line indicator
	ID_INDICATOR_CAPS,
	ID_INDICATOR_NUM,
	ID_INDICATOR_SCRL,
};

static UINT nButtonIDs[]={
	ID_SELECT,
	ID_DRAWGATE,
	ID_DRAWBLOCK,
	ID_DRAWWIRE,
	ID_DRAWTAG
};
static UINT nZoomButtons[]={
	ID_ZOOM_IN,
	ID_ZOOM_OUT,
	ID_ZOOM_TO_FIT,
	ID_ZOOM_HAND
};

static UINT nPushBarButtons[]={
	ID_PUSHIN,
	ID_PUSHOUT,
	ID_ADDSCHEME
};