#if !defined(AFX_HISTDRAWDOC_H__FFDB8F94_E57F_11D2_ACC4_00C0F6B0E2D0__INCLUDED_)
#define AFX_HISTDRAWDOC_H__FFDB8F94_E57F_11D2_ACC4_00C0F6B0E2D0__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// HistDrawDoc.h : _xZkqqHx_iDhHiDgCiDfPiBfL_xHqqkZx_ _xZkqqHx_iDhEiDeAiDeDiDiL_xHqqkZx_
//

#include "DbLock.h"				// For FCLockVar.
#include "CommonDrawDoc.h"		// Superclass.
#include "HistDocumentTmpl.h"	// For FCHistManager.
#include "HiTerminateTable.h"	// For FCHiTerminateTable.

#ifdef SUPER_CLASS
#undef SUPER_CLASS
#endif
#define SUPER_CLASS CFCHistDocumentTmpl<CFCCommonDrawDoc>

// 03.10.07 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//#include "HiProject.h"		// For HPCAutoLock.

class CFCHistDrawFrame;
// 03.09.19 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//class FCRecentHistList;
class FCHiProject;

/////////////////////////////////////////////////////////////////////////////
// CFCHistDrawDoc _xZkqqHx_iDgIiDeMiDiFiDiBiDjDiDgH_xHqqkZx_

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

protected:
	CFCHistDrawDoc();           // _xZkqqHx_jDkOjDeJjAlGjAkMiCmJiOgHjHhAiClDiCoKiCoJiDhGiDiNiDgFiDeOiDgH_xHqqkZx_ _xZkqqHx_iDfCiDjDiDfIiDgHiDiJiDeOiDfOiBeC_xHqqkZx_
	DECLARE_DYNCREATE(CFCHistDrawDoc)

// _xZkqqHx_iDiGiBfLiDfFiKnGjAjEiBeC_xHqqkZx_
public:
	//----- _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiKnGjIeBiKnGjAjE_xHqqkZx_ -----

	//----- Undo_xZkqqHx_iKnGjIeB_xHqqkZx_ -----
	virtual void	SessionBegin ();
	virtual void	SessionEnd ();
// 04.11.16 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	virtual void	OnUndo ();
	virtual BOOL	CanUndo () const;
// 04.11.16 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	virtual void	OnRedo ();
	virtual BOOL	CanRedo () const;
	virtual void	OnFrameTimer (UINT nIDEvent);

//----- 04.08.09 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	//----- _xZkqqHx_iDiJiDhIiDiLiKnGjIeB_xHqqkZx_ -----
//	virtual void	SaveLabelCreateIndex (DWORD dwObjId, const wchar_t* wcpLabelText);
//	virtual void	SaveLabelDeleteIndex (DWORD dwObjId, const wchar_t* wcpLabelText);
//----- 04.08.09 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

	//----- _xZkqqHx_iClLiCmMjBlM_xHqqkZx_ -----
	virtual void	OnActivateDocument (BOOL bActive);

//----- 05.08.16 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	//----- _xZkqqHx_iDhEiDeAiDeDiDiLiPeDjFjMiKnGjIeBiKnGjAjE_xHqqkZx_ -----
//	virtual void	OnRepairDocument ();
//----- 05.08.16 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

	//----- _xZkqqHx_iDfCiDhNiDjDiDgIiDeJiBfLiDgPiBfLiDiJiDeDiDgI_xHqqkZx_ -----
//----- 06.02.14 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	virtual	void	CmdCreate1Obj (FCObjDynabase* objp, const FCLayerZOrder& lzorder);
//	virtual	void	CmdDelete1Obj (FCObjDynabase* objp);
//----- 06.02.14 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
// 05.11.06 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	virtual void	CmdDeleteObjs (SheetID stid, const ObjDynabaseVector& vObj);
	virtual void	BeforeCmdModifyAbcRichText (FCObjFigure* pObj);
	virtual void	CmdModifyAbcRichText (FCObjFigure* pObj, long lQueueSz, const BYTE* bypQueue);
	virtual void	CmdCreate1RichText (FCObjFigure* pFig, FCRichText* pText);
	virtual void	CmdDelete1RichText (FCObjFigure* objp);

protected:
	//----- _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiKnGjIeBiKnGjAjE_xHqqkZx_ -----
	virtual BOOL	ExecDocRequest () const;

	//----- Undo_xZkqqHx_iKnGjIeB_xHqqkZx_ -----

//----- 05.11.19 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	// _xZkqqHx_jFnLjBlGiClFiCmEiDeBiDhGiDiKiDfAiBfLiDfGiDiHiDjDiCpAiPeJjHlJiBeC_xHqqkZx_
	virtual	FTDocReqResult	OnReqSaveAndExit (FCReqBase& ret, FCReqLock& reqLock);
//----- 05.11.19 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
	// _xZkqqHx_jFnLjBlGiClFiCmEiDhGiDiNiDfHiDeGiDeOiDgHiCpAjFmCiClGiCoJiBeC_xHqqkZx_
	virtual	FTDocReqResult	OnReqSaveAndCloseProject (FCReqBase& ret, FCReqLock& reqLock);

//----- 05.08.16 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	// _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiCpAiKeKiCkNiBeC_xHqqkZx_
	virtual	FTDocReqResult	OnReqOpenProject (FCReqBase& ret, FCReqLock& reqLock);
//----- 06.02.01 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	 // _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiCpAjFmCiClGiCoJiBeC_xHqqkZx_
//	virtual	FTDocReqResult	OnReqCloseProject (FCReqBase& ret, FCReqLock& reqLock);
//----- 06.02.01 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
//----- 05.08.16 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

	// _xZkqqHx_jHjKjHpAjFlGiPjBiCpAiKeKiCkNiBeC_xHqqkZx_
	virtual FTDocReqResult	OnReqOpenHidocument (FCReqBase& ret, FCReqLock& reqLock);
	// _xZkqqHx_jHjKjHpAjFlGiPjBiCpAjFmCiClGiCoJiBeC_xHqqkZx_
	virtual	FTDocReqResult	OnReqCloseHidocument (FCReqBase& ret, FCReqLock& reqLock);
	// _xZkqqHx_jAfGiLeLiDhGiDiNiDfHiDeGiDeOiDgHiCmJjGlMjBePiCpAjFhEiCkPiCmEjFnLjBlGiClHiCoJiBeC_xHqqkZx_
	virtual	FTDocReqResult	OnReqDlgSaveUnknownProjectAs (FCReqBase& ret, FCReqLock& reqLock);
	// _xZkqqHx_jAfGiLeLiDhGiDiNiDfHiDeGiDeOiDgHiCmJjGlMjBePiCpAjFhEiCkPiCmEjFnLjBlGiCmMiDfPiDeDiDeBiDiNiDePiCpAjFfMiOkGiClHiCoJiBeC_xHqqkZx_
	virtual	FTDocReqResult	OnReqSaveUnknownProjectAs (FCReqBase& ret, FCReqLock& reqLock);
	// _xZkqqHx_jHjKjHpAjFlGiPjBiCpAjFnLjBlGiClHiCoJiBeC_xHqqkZx_
	virtual	FTDocReqResult	OnReqSaveHidocument (FCReqBase& ret, FCReqLock& reqLock);
//----- 06.04.06 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	// _xZkqqHx_jHjKjHpAjFlGiPjBiCmMiDhGiDiNiDhAiDgFiDeCiCpAjFmPiNfIiClHiCoJiBeC_xHqqkZx_
	virtual	FTDocReqResult	OnReqReplaceHidocumentProperty (FCReqBase& ret, FCReqLock& reqLock);
//----- 06.04.06 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
	// _xZkqqHx_jHjKjHpAiImKjChFiCpAiMoDjFpLiCnGiCfAiCmCiInKjDkOiClHiCoJiBeC_xHqqkZx_
	virtual	FTDocReqResult	OnReqMoveHistoryBackward (FCReqBase& ret, FCReqLock& reqLock);
	// _xZkqqHx_jHjKjHpAiImKjChFiCpAjBePjFpLiCnGiCfAiCmCiInKjDkOiClHiCoJiBeC_xHqqkZx_
	virtual	FTDocReqResult	OnReqMoveHistoryForward	(FCReqBase&	ret, FCReqLock& reqLock);
	// _xZkqqHx_iDfIiDhMiDgCiDgHiDgFiBfLiDhFiDiLiCpAjFnLjBlGiClHiCoJiBeC_xHqqkZx_
	virtual	FTDocReqResult	OnReqSaveSpotFile (FCReqBase& ret, FCReqLock& reqLock);
	// _xZkqqHx_jHjKjHpAiCpAiOhHjCoIiCmMiDfKiDgCiDfGiDiHiDjDiCnMiCmFiInKjDkOiClHiCoJiBeC_xHqqkZx_
	virtual	FTDocReqResult	OnReqMoveHistoryUntilSession (FCReqBase& ret, FCReqLock& reqLock);
//----- 06.04.07 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	// _xZkqqHx_iOhHjCoIiCmMiDiJiDhIiDiLiCkKjCiGjAfDiNmAjFfHiCmJiCkNiCoJiCoGiCkEiCmJiDfIiDeOiDiNiBfLiDiLiClHiCoJiBeC_xHqqkZx_
	virtual	FTDocReqResult	OnReqScrollToLabel (FCReqBase& ret, FCReqLock& reqLock);
	// _xZkqqHx_iOhHjCoIiCmMiOjOiKnEiDiJiDhIiDiLiCkKjCiGjAfDiNmAjFfHiCmJiCkNiCoJiCoGiCkEiCmJiDfIiDeOiDiNiBfLiDiLiClHiCoJiBeC_xHqqkZx_
	virtual	FTDocReqResult	OnReqScrollToTimeLabel (FCReqBase& ret, FCReqLock& reqLock);
//----- 06.04.07 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
	// _xZkqqHx_jBiAiNoMiImKjChFiCnGiDfIiDeOiDiNiBfLiDiLiClHiCoJiBeC_xHqqkZx_
	virtual	FTDocReqResult	OnReqScrollToSpot (FCReqBase& ret, FCReqLock& reqLock);
	// _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiCpAiNoNiPjMiClHiCoJ_xHqqkZx_
	virtual FTDocReqResult	OnReqDeleteUnknownProject (FCReqBase& ret, FCReqLock& reqLock);

	//----- _xZkqqHx_iDiJiDhIiDiLjFjEjFgJjFlGiOjKjHpBiKmHjHjN_xHqqkZx_ -----
	virtual	void	RegisterLabelObj (DWORD dwObjId,
									const wchar_t* wcpLabelA,
									const wchar_t* wcpLabelB);

// _xZkqqHx_iDiGiBfLiDfFjFmPjAjEiBeC_xHqqkZx_
protected:
	//----- _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiKnGjIeB_xHqqkZx_ -----
	FCDbLockBank	m_KeepLockForDocument;	// _xZkqqHx_jHjKjHpAjFlGiPjBiCpAiKeKiCkCiCmEiCkCiCoJiKnEiCmMiDiNiDgCiDeOiBeC_xHqqkZx_

	//----- _xZkqqHx_iDfOiDeDiDhNiBfLiCmJiCoGiCoJiDhEiDiJiDgCiDfGiDiFiKmHjHjN_xHqqkZx_ -----
	BOOL			m_bIsOnFrameTimerCFCHistDrawDoc;	// _xZkqqHx_iDfOiDeDiDhNiBfLiPiIjHjNjCiGiCkJiBeI_xHqqkZx_ _xZkqqHx_jDpMiCoKiOhBiCpAjGgIiCkOiBeC_xHqqkZx_

	//----- _xZkqqHx_jHjKjHpAjFlGiPjBiKnGjIeB_xHqqkZx_ -----
// 06.04.06 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
	BOOL			m_bIsLogCommandUserId;	// _xZkqqHx_jHjKjHpAjFlGiPjBiCmMiDfKiDgCiDfGiDiHiDjDiCmJiDiGiBfLiDfFiBfL_xHqqkZx_ID_xZkqqHx_iCpAiLeMjIfOiClHiCoJiCkJiBeI_xHqqkZx_

	//----- _xZkqqHx_iDiJiDhIiDiLjFjEjFgJjFlGiOjKjHpBiKmHjHjN_xHqqkZx_ -----
	struct FCModifyLabelKind
	{
		WCharAuto	atpLabelDelete;
		WCharAuto	atpLabelCreate;
	}; // struct FCModifyLabelKind.
	map<DWORD, FCModifyLabelKind>	m_mpObjIdToKind;	// _xZkqqHx_iDiJiDhIiDiLjFjEjFgJ_xHqqkZx_ID -> _xZkqqHx_jFjEjFgJiPiIjHjN_xHqqkZx_(_xZkqqHx_iNoMjAkMiBeBiNoNiPjMiBeBjFmPiNfI_xHqqkZx_)_xZkqqHx_iDgFiBfLiDhFiDiLiBeC_xHqqkZx_
	WString			m_wstrLabelBefore;	// _xZkqqHx_iDiJiDhIiDiLjFjEjFgJiCmMiDgFiDeMiDfIiDgHjFmPiNfIiOjOiCmJiBeBjFmPiNfIjBePiCmMiDgFiDeMiDfIiDgHiCpAiKgPiCkGiCmEiCkIiCkNiBeC_xHqqkZx_

// _xZkqqHx_iDeBiDgHiDiKiDhCiDiFiBfLiDgH_xHqqkZx_
public:

// _xZkqqHx_iDeJiDhJiDiMiBfLiDfGiDiHiDjD_xHqqkZx_
public:

// _xZkqqHx_iDeJiBfLiDgPiBfLiDiJiDeDiDgI_xHqqkZx_
public:
// 05.08.16 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	virtual void	SetModifiedFlag (BOOL bModified = TRUE);

// _xZkqqHx_iDeJiBfLiDgPiBfLiDiJiDeDiDgI_xHqqkZx_
	// ClassWizard _xZkqqHx_iCmNiJlMjBhKiKnGjAjEiCmMiDeJiBfLiDgPiBfLiDiJiDeDiDgIiCpAjAlGjAkMiClFiCnMiClHiBeC_xHqqkZx_
	//{{AFX_VIRTUAL(CFCHistDrawDoc)
	public:
	virtual void DeleteContents();
	virtual void OnCloseDocument();
	protected:
	virtual BOOL SaveModified();
	//}}AFX_VIRTUAL

// _xZkqqHx_iDeDiDjDiDhGiDiKiDiBiDjDiDgFiBfLiDfGiDiHiDjD_xHqqkZx_
public:
	virtual ~CFCHistDrawDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// _xZkqqHx_iDiBiDgCiDfKiBfLiDfH_xHqqkZx_ _xZkqqHx_iDhNiDgCiDhGiKnGjAjEiCmMjAlGjAkM_xHqqkZx_
protected:
	//{{AFX_MSG(CFCHistDrawDoc)
	afx_msg void OnFileExecHistviewerTarget();
	afx_msg void OnUpdateFileExecHistviewerTarget(CCmdUI* pCmdUI);
	afx_msg void OnFileSaveHidocument();
	afx_msg void OnUpdateFileSaveHidocument(CCmdUI* pCmdUI);
	afx_msg void OnOptionUserRegistration();
	afx_msg void OnUpdateOptionUserRegistration(CCmdUI* pCmdUI);
	afx_msg void OnTestTestTest1();
	afx_msg void OnTestTestTest2();
	afx_msg void OnTestTestTest3();
	afx_msg void OnTestTestTest4();
	afx_msg void OnTestTestTest5();
	afx_msg void OnTestTestTest6();
	afx_msg void OnTestTestTest7();
	afx_msg void OnTestTestTest8();
	afx_msg void OnTestTestTest9();
	afx_msg void OnFileProjectClose();
	afx_msg void OnUpdateFileProjectClose(CCmdUI* pCmdUI);
	//}}AFX_MSG
// 04.10.08 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	afx_msg void OnFileRecent(UINT nCmdID);
//----- 03.09.24 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	afx_msg void OnFileSaveAsMolipdraw();
//	afx_msg void OnUpdateFileSaveAsMolipdraw(CCmdUI* pCmdUI);
//----- 03.09.24 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
//----- 05.10.25 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	afx_msg void OnFileJoinProject();
//	afx_msg void OnUpdateFileJoinProject(CCmdUI* pCmdUI);
//----- 05.10.25 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
	DECLARE_MESSAGE_MAP()
}; // class CFCHistDrawDoc.

// HistDraw_xZkqqHx_iDgIiDeMiDiFiDiBiDjDiDgHjFmPjAjEiBeC_xHqqkZx_
inline CFCHistDrawDoc* FFHistDrawDoc ()
{
	if (g_pDoc->IsKindOf(RUNTIME_CLASS(CFCHistDrawDoc)))
		return (CFCHistDrawDoc*)g_pDoc;
	else
		return NULL;
} // FFHistDrawDoc.

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ _xZkqqHx_iCmNjBePiNhDiCmMjClMjBePiCmJjCmHiJmBiCmMjAoJiMlOiCpAjBhNjDpMiClFiCnMiClHiBeC_xHqqkZx_

#endif // !defined(AFX_HISTDRAWDOC_H__FFDB8F94_E57F_11D2_ACC4_00C0F6B0E2D0__INCLUDED_)
