#if !defined(AFX_LAYERLIST_H__1C474BBF_168C_4A56_B71D_C71B3B44E53C__INCLUDED_)
#define AFX_LAYERLIST_H__1C474BBF_168C_4A56_B71D_C71B3B44E53C__INCLUDED_

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

// 03.05.03 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//#include <map>					// For map template.
#include "ListCtrlFDA.h"		// For CFCListCtrlFDA.
#include "ControlFDATmpl.h"		// For CFCControlFDATmpl.
#include "MultiControlTmpl.h"	// Super class.

#ifdef SUPER_CLASS
#undef SUPER_CLASS
#endif
#define SUPER_CLASS CFCMultiControlTmpl< CFCControlFDATmpl<CFCListCtrlFDA> >


/*************************************************************************
 * <_xZkqqHx_iDeOiDiJiDfI_xHqqkZx_>	FCLayerCtrlRec
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDeBiDeDiDgFiDiAiCmGiClFiCmEjAnNjCoIiClHiCoJiDiMiDeDiDiEiBfLiCmMiPoOjFpB_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.12.26 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
class FCLayerCtrlRec
{
public:
	void	SetFlag (WORD wFlag)
				{
					nPrint	= (wFlag & FDOZ_ON_PRINT) ? 1 : 0;
					nDraw	= (wFlag & FDOZ_ON_DRAW) ? 1 : 0;
					nSelect	= (wFlag & FDOZ_ON_SELECT) ? 1 : 0;
					nEdit	= (wFlag & FDOZ_ON_EDIT) ? 1 : 0;
				}

	WORD	GetFlag () const
				{
					WORD wFlag = 0;
					wFlag |= (nPrint == 1) ? FDOZ_ON_PRINT : 0;
					wFlag |= (nDraw == 1) ? FDOZ_ON_DRAW : 0;
					wFlag |= (nSelect == 1) ? FDOZ_ON_SELECT : 0;
					wFlag |= (nEdit == 1) ? FDOZ_ON_EDIT : 0;
					return wFlag;
				}

public:
// 01.03.18 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	DWORD	dwId;		// _xZkqqHx_iDiMiDeDiDiEiBfLiCmM_xHqqkZx_ID_xZkqqHx_iBeCiDeBiDeDiDgFiDiAjDpMiCoKjBnGiCkGiOjOiCmJiMlDiCmMiPiHiPjIiCpAiLeMjIfOiBeC_xHqqkZx_
	WString	strName;	// _xZkqqHx_iDiMiDeDiDiEiBfLjGlMiBeC_xHqqkZx_
// 01.03.18 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	DWORDVector	vMerge;	// _xZkqqHx_iDhNiBfLiDfHiClDiCoKiClNiDiMiDeDiDiEiBfLiCmM_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
	short	nPrint;
	short	nDraw;
	short	nSelect;
	short	nEdit;
}; // class FCLayerCtrlRec.

// 01.03.18 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//typedef vector<FCLayerCtrlRec>	LayerCtrlRecVector;

typedef	auto_ptr<FCLayerCtrlRec>		LayerCtrlRecAuto;
typedef	map<DWORD, LayerCtrlRecAuto>	IdToLayerCtrlRecMap;

/////////////////////////////////////////////////////////////////////////////
// CFCLayerListCtrl _xZkqqHx_iDeFiDeCiDjDiDgIiDeF_xHqqkZx_

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

// _xZkqqHx_iDfCiDjDiDfIiDgHiDiJiDeOiDfGiDiHiDjD_xHqqkZx_
public:
	CFCLayerListCtrl();

// _xZkqqHx_iDiGiBfLiDfFiKnGjAjEiBeC_xHqqkZx_
public:
	virtual void	Initialize ();
	virtual void	ClearContents ();
//----- 01.03.18 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	virtual const FCLayerCtrlRec*	GetItemRec (long lIdx) const;
//	virtual long	InsertItemRec (long lIdx, const FCLayerCtrlRec& itemRec);
//----- 01.03.18 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
	virtual void	UpdateColumnWidth ();
	virtual void	SetCurrentLayerIdx (DWORD dwCurIdx);
	virtual DWORD	GetCurrentLayerIdx () const;
// 01.03.18 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	virtual void	SetNewLayerId (DWORD dwNewId);

	virtual	void	AppendRec (DWORD dwId, const FCLayerCtrlRec& rec);
	virtual	void	SetIdOrder (DWORD dwIdSz, const DWORD dwId[]);
	virtual	void	GetIdOrder (DWORDVector& vdwId) const;
	virtual	const FCLayerCtrlRec*	GetRec (DWORD dwId) const;
	virtual	BOOL	CanDeleteItem () const;
	virtual	BOOL	CanMergeItem () const;

protected:
	virtual FCLayerCtrlRec&	ItemRec (DWORD dwId);
	virtual void	UpdateCheckMark (long lIndex);
	virtual short	GetAccessStat (long lIndex, int iSubItem) const;
	virtual void	SetAccessStat (long lIndex, int iSubItem, short nStat);

	virtual long	GetFrontFixedItemSize () const;
	virtual long	GetBackFixedItemSize () const;
	virtual long	GetSubMenuIndex (long lId) const;
	virtual	BOOL	OnInsertItem (long lIndex, DWORD dwId);
	virtual	BOOL	OnChangeItem (long lIndex, DWORD dwId);
	virtual	BOOL	OnDeleteItem (long lIndex, DWORD dwId);
	virtual BOOL	OnMergeItem (long lIndexFrom, long lIndexUntil);

	//----- _xZkqqHx_iDeDiDhIiDjDiDgHiPiIjHjNiKnGjAjE_xHqqkZx_ -----
	virtual long	TransFDA (long iState, DWORD dwMessage, DWORD dwCommand = 0);
	virtual void	StateFDA (long iState);
	//----- _xZkqqHx_jBeKiInKiPpDjBnEiPiIjHjNiKnGjAjE_xHqqkZx_ -----
	virtual void	StateClickNotNameColumn ();	// _xZkqqHx_iDfGiBfLiDgHjGlMiImIiKePiDeOiDiKiDgCiDeOiBeC_xHqqkZx_

// _xZkqqHx_iDiGiBfLiDfFjCoIiLgAiBeC_xHqqkZx_
protected:
enum
{
	STATE_BEGIN = BASE_CLASS::STATE_END,	// _xZkqqHx_iPpDjBnEiKeKiOgOiBeC_xHqqkZx_
	STATE_CLICK_NOT_NAME_COLUMN,	// _xZkqqHx_iDfGiBfLiDgHjGlMiImIiKePiDeOiDiKiDgCiDeOiBeC_xHqqkZx_
	STATE_END,						// _xZkqqHx_iPpDjBnEiPeJjHlJiBeC_xHqqkZx_
};

// _xZkqqHx_iDiGiBfLiDfFjFmPjAjEiBeC_xHqqkZx_
protected:
	CImageList	m_imageList;		// _xZkqqHx_iDeDiDiBiBfLiDfHiDiKiDfIiDgHiBeC_xHqqkZx_
	CImageList	m_imageHeadList;	// _xZkqqHx_iDhHiDgCiDfPjHhAiDeDiDiBiBfLiDfHiDiKiDfIiDgHiBeC_xHqqkZx_
	long		m_lCurrentLayer;	// _xZkqqHx_iOiLjDfPiBeC_xHqqkZx_
	IdToLayerCtrlRecMap	m_mpIdToRec;
//----- 01.03.18 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	BOOL		m_bIsMoving;		// _xZkqqHx_iInKjDkOjCiGiBeI_xHqqkZx_
//	DWORD		m_dwNewLayerId;		// _xZkqqHx_iDiMiDeDiDiEiBfLiCpAjAfGiLeLiNoMjAkMiClHiCoJiOjOiCmM_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
//	LayerCtrlRecVector	m_vLayerRec;
//----- 01.03.18 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

// _xZkqqHx_iDeBiDgHiDiKiDhCiDiFiBfLiDgH_xHqqkZx_
public:

// _xZkqqHx_iDeJiDhJiDiMiBfLiDfGiDiHiDjD_xHqqkZx_
public:
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDIS);


// _xZkqqHx_iDeJiBfLiDgPiBfLiDiJiDeDiDgI_xHqqkZx_
	// ClassWizard _xZkqqHx_iCmNiJlMjBhKiKnGjAjEiCmMiDeJiBfLiDgPiBfLiDiJiDeDiDgIiCpAjAlGjAkMiClFiCnMiClHiBeC_xHqqkZx_
	//{{AFX_VIRTUAL(CFCLayerListCtrl)
	//}}AFX_VIRTUAL

// _xZkqqHx_iDeDiDjDiDhGiDiKiDiBiDjDiDgFiBfLiDfGiDiHiDjD_xHqqkZx_
public:
	virtual ~CFCLayerListCtrl();

	// _xZkqqHx_jAlGjAkMiClDiCoKiClNiDiBiDgCiDfKiBfLiDfH_xHqqkZx_ _xZkqqHx_iDhNiDgCiDhGiKnGjAjE_xHqqkZx_
protected:
	//{{AFX_MSG(CFCLayerListCtrl)
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()

//----- 01.03.18 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
//	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
//	afx_msg void OnRbtnItemMoveBegin();
//	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
//	afx_msg void OnRbtnItemMoveCancel();
//	afx_msg void OnRbtnItemMovePrev();
//	afx_msg void OnRbtnItemInsertPrev();
//	afx_msg void OnRbtnItemDelete();
//	afx_msg void OnRbtnItemChange();
//	afx_msg void OnRbtnItemMerge();
//----- 01.03.18 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

};

/////////////////////////////////////////////////////////////////////////////

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

#endif // !defined(AFX_LAYERLIST_H__1C474BBF_168C_4A56_B71D_C71B3B44E53C__INCLUDED_)
