#ifndef __CtlBrVRuler_h
#define __CtlBrVRuler_h

#include "ControlBarBase.h"	// For Baseclass.

#ifdef SUPER_CLASS
#undef SUPER_CLASS
#endif
#define SUPER_CLASS CFCControlBarBase


/////////////////////////////////////////////////////////////////////////////
// CFCCtlBrVRuler

class CFCCtlBrVRuler : public SUPER_CLASS
{
protected:
typedef SUPER_CLASS BASE_CLASS;

	DECLARE_DYNAMIC(CFCCtlBrVRuler)

public:
// 06.04.24 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//	CFCCtlBrVRuler (BOOL bDrawBorder);
	CFCCtlBrVRuler ();
	~CFCCtlBrVRuler ();

// _xZkqqHx_iDiGiBfLiDfFiDfCiBfLiDgIiBeC_xHqqkZx_
public:
	virtual BOOL Create (CWnd* pParentWnd, DWORD dwStyle, UINT nID);

	virtual void	ScrollTo (long lgVal);
	virtual void	SetPitch (double mmPitch0, double mmPitch1, short nZoomFig);
	virtual void	SetTextRange (CWnd* wndpTarget, double vmmBegin, double vmmEnd);
	virtual void	UnSetTextRange ();

	//----- _xZkqqHx_iDiLiBfLiDiJiBfLiDhNiDeFiDfIiDhNiBfLiDeKiBfLiKnGiMfH_xHqqkZx_ -----
	virtual BOOL	IsRulerMMKVisible (short nIndex) const;
								// RulerMMK_xZkqqHx_iCmMjFfMiOkGiBeFjEpBjFfMiOkGiCpAjClCiCnHiCoJiBeC_xHqqkZx_
	virtual void	SetRulerMMKVisible (short nIndex, BOOL bVisible);
								// RulerMMK_xZkqqHx_iCmMjFfMiOkGiBeFjEpBjFfMiOkGiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
	virtual void	MoveRulerMMK (short nIndex, long lgVal);
								// RulerMMK_xZkqqHx_iCpAiInKjDkOiClHiCoJiBeC_xHqqkZx_

protected:
	virtual long	VLG2DV (long lgVal) const;
	virtual long	DV2VLG (long dvVal) const;
	virtual long	VMM2DV (double vmmVal) const;
	virtual double	DV2VMM (long dvVal) const;
	virtual long	TMM2DV (double tmmVal) const;
	virtual double	DV2TMM (long dvVal) const;
	virtual void	DrawTextRange (CDC* pDC);

protected:
	BOOL	m_bDrawBorder;	// _xZkqqHx_iDhLiBfLiDfPiBfLjApMiCpAjFgAiJoGiClHiCoJiCkJiBeI_xHqqkZx_

	double	m_mmPitch0;		// _xZkqqHx_iNnHiCkJiCkCiNiPiCnNiBeCiOmAiNmAjFfHiBeC_xHqqkZx_
	double	m_mmPitch1;		// _xZkqqHx_jBoFiCkLiCkCiNiPiCnNiBeCiOmAiNmAjFfHiBeC_xHqqkZx_
	short	m_nZoomFig;		// Zoom_xZkqqHx_iCmMiMiFiBeC_xHqqkZx_10^m_nZoomFig_xZkqqHx_iBeC_xHqqkZx_

	// _xZkqqHx_iImIiJlKiCmN_xHqqkZx_View_xZkqqHx_iCoC_xHqqkZx_g_->Offset_xZkqqHx_iCkJiCoHiOfKiPgPiJmCjEfMiClOiCkKiBeBiDfIiDeOiDiNiBfLiDiLiNmEjFgAiJoGiOjOiCmJiBeB_xHqqkZx_
	// _xZkqqHx_iDiLiBfLiDiJiBfLiMmFjHeMiCmMiDfIiDeOiDiNiBfLiDiLiImKjChFjDjJiCpAiLeMjIfOiClFiCmEiCkAiCoJjFeLjHhGiCkKiCkAiCoJiClNiCnPiBeC_xHqqkZx_
	long	m_dvOffset;		// _xZkqqHx_iDfIiDeOiDiNiBfLiDiLiImKjChFiBeC_xHqqkZx_0_xZkqqHx_iCkJiCoHiNlGjFpLiMpMiCnGiCmMiDeJiDhEiDfKiDgCiDgHiBeC_xHqqkZx_
	CRect	m_dvrctRuler;	// Ruler_xZkqqHx_jFgAiJoGjHmMiIoGiBeCiDgGiDgPiDeDiDfIiNmAjFfHiBeC_xHqqkZx_

	//----- _xZkqqHx_iDiLiBfLiDiJiBfLiDhNiDeFiDfIiDhNiBfLiDeKiBfLiKnGiMfH_xHqqkZx_ -----
	BOOL	m_baIsRulerMMKVisible[FD_RULER_MMK_MAX];
	long	m_lgaRulerMMK[FD_RULER_MMK_MAX];

//----------<NOT EXPORT TO VIEWER>-----------
	double	m_vmmBegin;		// _xZkqqHx_jFfMiOkGjEmNiImNiCmMiKeKiOgOiNmAjFfHiBeC_xHqqkZx_View_xZkqqHx_iOmAiNmAjFfHiBeC_xHqqkZx_
	double	m_vmmEnd;		// _xZkqqHx_jFfMiOkGjEmNiImNiCmMiPeJjHlJiNmAjFfHiBeC_xHqqkZx_View_xZkqqHx_iOmAiNmAjFfHiBeC_xHqqkZx_
	CWnd*	m_wndpTarget;	// _xZkqqHx_jFfMiOkGjEmNiImNiDiCiBfLiDgIiCpAiOhHiOkGiClFiClNiDeFiDeCiDjDiDgIiDeFiBeC_xHqqkZx_
//----------</NOT EXPORT TO VIEWER>-----------


// Attributes
public:

// Implementation
public:
	virtual void DoPaint(CDC* pDC);
	virtual CSize CalcFixedLayout(BOOL bStretch, BOOL bHorz);
//	virtual CSize CalcDynamicLayout( int nLength, DWORD dwMode);
  
protected:
	virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);

	// Generated message map functions
	//{{AFX_MSG(CFCCtlBrVRuler)
	afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
	afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
	//}}AFX_MSG
	afx_msg LRESULT OnUserUpdateRuler(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnUserPursuerTextNeedInfo(WPARAM wParam, LPARAM lParam = 0);
	DECLARE_MESSAGE_MAP()
}; // class CFCCtlBrVRuler.

#endif//__CtlBrVRuler_h

