
/*	Copyright (C) G. Jespersen
	See Licence.txt.*/

#if !defined(AFX_DSLAVSPLITTERVIEW_H__AE2E83EF_5696_42DE_8794_078ABC88CA1C__INCLUDED_)
#define AFX_DSLAVSPLITTERVIEW_H__AE2E83EF_5696_42DE_8794_078ABC88CA1C__INCLUDED_

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

#include "DsLavDoc.h"
#include "MySplitterWnd.h"

/////////////////////////////////////////////////////////////////////////////
// CDsLavSplitterView view

class CDsLavSplitterView : public CView
{
protected:
	CDsLavSplitterView();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(CDsLavSplitterView)

// Attributes
public:

	// Added GetDocument() as original DsLavView files replaced with 
	// DsLavSplitter - 
	CDsLavDoc* GetDocument();

//	// The Splitter wnd
//	CSplitterWnd m_wndSplitter;

private:

	// The derived Splitter wnd - provides for switching Views
	// via its ReplaceView() function.
	CMySplitterWnd m_wndSplitter;

	//size of left pane for OnSize()
	int m_leftPaneWidth;


// Operations
public:
	BOOL ReplaceView(CRuntimeClass* pRTClass);
	BOOL LeftPaneIsHidden();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDsLavSplitterView)
	public:
	virtual void OnInitialUpdate();
	protected:
	virtual void OnDraw(CDC* pDC);      // overridden to draw this view
	//}}AFX_VIRTUAL

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

	// Generated message map functions
protected:
	//{{AFX_MSG(CDsLavSplitterView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	//}}AFX_MSG

	afx_msg LRESULT OnHideLeftPane(WPARAM wParam, LPARAM lParam);	// WM_USER_HIDE_LEFT_PANE

	DECLARE_MESSAGE_MAP()

private:
	// Hide show left pane.
	int m_prevLeftPaneWidth;
};

// Added as original DsLavView files replaced with DsLavSplitter
#ifndef _DEBUG  // debug version in DsLaSplitter.cpp
inline CDsLavDoc* CDsLavSplitterView::GetDocument()
   { return (CDsLavDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////

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

#endif // !defined(AFX_DSLAVSPLITTERVIEW_H__AE2E83EF_5696_42DE_8794_078ABC88CA1C__INCLUDED_)
