// NavSpliter.cpp : implementation file
//

#include "stdafx.h"
#include "psm.h"
#include "NavSpliter.h"
#include "NavigatorView.h"
#include "PSMDoc.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CNavSpliter

IMPLEMENT_DYNCREATE(CNavSpliter, CSplitterWnd )

CNavSpliter::CNavSpliter()
{
}

CNavSpliter::~CNavSpliter()
{
}


BEGIN_MESSAGE_MAP(CNavSpliter, CSplitterWnd )
	//{{AFX_MSG_MAP(CNavSpliter)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CNavSpliter drawing


/////////////////////////////////////////////////////////////////////////////
// CNavSpliter diagnostics

#ifdef _DEBUG
void CNavSpliter::AssertValid() const
{
	CSplitterWnd ::AssertValid();
}

void CNavSpliter::Dump(CDumpContext& dc) const
{
	CSplitterWnd ::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CNavSpliter message handlers
void CNavSpliter::DeleteRow( int rowDelete )
{
	if(rowDelete!=0) CSplitterWnd::DeleteRow(rowDelete );
	else
	{
		CNavigatorView *view=(CNavigatorView*) GetPane(0,0);
		CPSMDoc *doc=(CPSMDoc*)view->GetDocument();
		if(doc->m_navigator!=view) CSplitterWnd::DeleteRow(rowDelete );
	}
}
void CNavSpliter::DeleteColumn( int colDelete )
{
	if(colDelete!=0) CSplitterWnd::DeleteColumn(colDelete );
	else
	{
		CNavigatorView *view=(CNavigatorView*) GetPane(0,0);
		CPSMDoc *doc=(CPSMDoc*)view->GetDocument();
		if(doc->m_navigator!=view) CSplitterWnd::DeleteColumn(colDelete );
	}
}

BOOL CNavSpliter::CreateScrollBarCtrl( DWORD dwStyle, UINT nID )
{
	return CSplitterWnd::CreateScrollBarCtrl( dwStyle, nID );

}

