// TolBrChipDuty.cpp : _xZkqqHx_iDeDiDjDiDhGiDiKiDiBiDjDiDgFiBfLiDfGiDiHiDjD_xHqqkZx_ _xZkqqHx_iDhEiDeAiDeDiDiLiBeC_xHqqkZx_
//

#include "stdafx.h"
#include "DynamicDraw.h"
#include "DynamicDrawView.h"// For g_pView.
#include "ChipEditorDoc.h"	// For FFChipEditorDoc();
#include "RegData.h"		// For GetRegFontStatic.
#include "UtilWin.h"		// For FFHorznizeToolBar.
#include "HiCommandTable.h"	// For FD_CMD_XXXX.
#include "TolBrChipDuty.h"	// This header.

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

// _xZkqqHx_iDhLiDgCiDeOiDfIiCmMjFjNiBeC_xHqqkZx_
static const int s_nBoxWidth = 100;
// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMjFjNiBeC_xHqqkZx_
static const int s_nDroppedWidth = 100;
// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMiNiCiClDiBeC_xHqqkZx_
static const int s_nDroppedHeight = 500;

/////////////////////////////////////////////////////////////////////////////
// CFCTolBrChipDuty

CFCTolBrChipDuty::CFCTolBrChipDuty ()
{
} // CFCTolBrChipDuty::CFCTolBrChipDuty.

CFCTolBrChipDuty::~CFCTolBrChipDuty ()
{
} // CFCTolBrChipDuty::~CFCTolBrChipDuty.

BEGIN_MESSAGE_MAP(CFCTolBrChipDuty, BASE_CLASS)
	//{{AFX_MSG_MAP(CFCTolBrChipDuty)
	//}}AFX_MSG_MAP
	ON_CBN_SELCHANGE(ID_CHIPEDIT_CMB_MOLIP_DUTY_ID, OnSelchangeChipeditCmbMolipDutyId)
	ON_CBN_SELCHANGE(ID_CHIPEDIT_CMB_TEXT_DUTY_ID, OnSelchangeChipeditCmbTextDutyId)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CFCTolBrChipDuty _xZkqqHx_iDiGiBfLiDfFiKnGjAjEiBeC_xHqqkZx_

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrChipDuty::Initialize
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iPiJiKpKiJlLiPiIjHjNiCpAiNhDiCkEiBeCiDgDiBfLiDiLiDgPiBfLiCmJjBgHiCnNiNjOiCnMiCoKiClNiDfCiDjDiDhLiDhLiDgCiDeOiDfIiCpA_xHqqkZx_
 *			_xZkqqHx_iPiJiKpKiJlLiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAlDiPoNiPeJjHlJiCmMiPoKiNiHiCmN_xHqqkZx_ TRUE_xZkqqHx_iBeBiDeHiDiJiBfLiCmMiPoKiNiHiCmN_xHqqkZx_ FALSE _xZkqqHx_iCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.10.22 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL CFCTolBrChipDuty::Initialize ()
{
	// Baseclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
	if (!BASE_CLASS::Initialize()) return FALSE;

	m_bUpdateDutyTable = FALSE;

//----- 05.06.29 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMiNiCiClDiBeC_xHqqkZx_
//	const int nDropHeight = 500;
//	// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCpAiNoMjAkMiClHiCoJiBeC_xHqqkZx_
//	SetButtonInfo(CommandToIndex(ID_CHIPEDIT_CMB_MOLIP_DUTY_ID), ID_CHIPEDIT_CMB_MOLIP_DUTY_ID, TBBS_SEPARATOR, 100);
//	SetButtonInfo(CommandToIndex(ID_CHIPEDIT_CMB_TEXT_DUTY_ID), ID_CHIPEDIT_CMB_TEXT_DUTY_ID, TBBS_SEPARATOR, 100);
//	//----- _xZkqqHx_jGpAiKiEjFfMiOkGiDfCiDjDiDhLiDhLiDgCiDeOiDfIiCpAiNoMjAkM_xHqqkZx_ -----
//	// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMiDfEiDeDiDfJiCpAiMhGiOfKiClHiCoJiBeC_xHqqkZx_
//	CRect rect;
//	GetItemRect(CommandToIndex(ID_CHIPEDIT_CMB_MOLIP_DUTY_ID), &rect);
//	const int iHeight = rect.Height();
//	rect.top = 0;
//	rect.bottom = rect.top + nDropHeight;
//	if (!m_cmbLinkDutyId.Create(CBS_DROPDOWNLIST|WS_VISIBLE|WS_TABSTOP,
//								rect, this, ID_CHIPEDIT_CMB_MOLIP_DUTY_ID))
//	{
//		TRACE(_T("Failed to create combo-box\n"));
//		return FALSE;
//	}
//	// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmJiDhEiDeIiDjDiDgHiCpAjAnNjCoIiBeC_xHqqkZx_
//	m_cmbLinkDutyId.SetFont(g_pReg->GetRegFontStatic(FDFT_TOOLBAR));
//	m_cmbLinkDutyId.SetItemHeight(-1, iHeight - 6);
//	// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMiPiJiKpKjBeJjBpAiCmGiClFiCmEiBhF_xHqqkZx_-1_xZkqqHx_iBhGiCpAjAnNjCoIiBeC_xHqqkZx_
//	m_cmbLinkDutyId.SetCurSel(-1);
//
//	//----- _xZkqqHx_jGpAiKiE_xHqqkZx_ID_xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCpAiNoMjAkM_xHqqkZx_ -----
//	// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMiDfEiDeDiDfJiCpAiMhGiOfKiClHiCoJiBeC_xHqqkZx_
//	GetItemRect(CommandToIndex(ID_CHIPEDIT_CMB_TEXT_DUTY_ID), &rect);
//	rect.top = 0;
//	rect.bottom = rect.top + nDropHeight;
//	if (!m_cmbTextDutyId.Create(CBS_DROPDOWNLIST|WS_VSCROLL|WS_VISIBLE|WS_TABSTOP,
//								rect, this, ID_CHIPEDIT_CMB_TEXT_DUTY_ID))
//	{
//		TRACE(_T("Failed to create combo-box\n"));
//		return FALSE;
//	}
//	// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmJiDhEiDeIiDjDiDgHiCpAjAnNjCoIiBeC_xHqqkZx_
//	m_cmbTextDutyId.SetFont(g_pReg->GetRegFontStatic(FDFT_TOOLBAR));
//	m_cmbTextDutyId.SetItemHeight(-1, iHeight - 6);
//	// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMiPiJiKpKjBeJjBpAiCmGiClFiCmEiBhF_xHqqkZx_-1_xZkqqHx_iBhGiCpAjAnNjCoIiBeC_xHqqkZx_
//	m_cmbTextDutyId.SetCurSel(-1);
//----- 05.06.29 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
	// _xZkqqHx_jAlDiPoNiPeJjHlJiBeC_xHqqkZx_
	return TRUE;
} // CFCTolBrChipDuty::Initialize.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrChipDuty::ObjSelectNotify
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiCmMjBeJjBpAiCkKjFmPiNfIiClDiCoKiClNiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	View->Frame->this_xZkqqHx_iCmMiPiHiCmFiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.10.24 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCTolBrChipDuty::ObjSelectNotify ()
{
	// _xZkqqHx_iClBiCmMiDeFiDeCiDjDiDgIiDeFiCkKjBlGiNnNiClFiCmIiCkCiCmIiCoHiCmOiPiIjHjNiClFiCmIiCkCiBeC_xHqqkZx_
	if (!::IsWindow(m_hWnd)) return;
	int iLinkID = -1;
	int iTextID = -1;
	// _xZkqqHx_jBeJjBpAjCiGiCmMjFjEjFgJjAjEiCkKiCfAiCmMiPoKiNiHiCmMiCnNiBeBjGpAiKiEjFfMiOkGiBeC_xHqqkZx_
	if (g_pView->SelectObjVector().size() == 1)
	{
		FFChipEditorDoc()->FindChipDutyID(iLinkID, FDCA_LINK,
									g_pView->SelectObjVector().front());
		FFChipEditorDoc()->FindChipDutyID(iTextID, FDCA_TEXT,
									g_pView->SelectObjVector().front());
	}
	// _xZkqqHx_jGpAiKiE_xHqqkZx_Id_xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjCgMiCpAjFmPiNfIiBeCiBeC_xHqqkZx_
	m_cmbLinkDutyId.SetCurSel(iLinkID);
	m_cmbTextDutyId.SetCurSel(iTextID);
} // CFCTolBrChipDuty::ObjSelectNotify.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrChipDuty::DutyTblUpdateNotify
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jGpAiKiEiDgFiBfLiDhFiDiLiCmMiNfIjAfGiOjOiCmJiDhEiDiMiBfLiDiAiCkJiCoHiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.11.08 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCTolBrChipDuty::DutyTblUpdateNotify ()
{
	// _xZkqqHx_jGpAiKiEiDiKiDfIiDgHiCmMiDfEiDeDiDfJiCpAiOoGjDlOiBeC_xHqqkZx_
	int iLinkMax = FFChipEditorDoc()->GetChipDutyObjects(FDCA_LINK).size();
	int iTextMax = FFChipEditorDoc()->GetChipDutyObjects(FDCA_TEXT).size();
	// _xZkqqHx_jGpAiKiE_xHqqkZx_Id_xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCpAiDiKiDfKiDgCiDgHiBeC_xHqqkZx_
	m_cmbLinkDutyId.ResetContent();
	m_cmbTextDutyId.ResetContent();
	//----- _xZkqqHx_jGpAiKiE_xHqqkZx_Id_xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCpAjAnNjCoIiClHiCoJ_xHqqkZx_ -----
	WString str;
	int iC;
	for (iC = 0; iC < iLinkMax; iC++)
	{
		str.Format(L"MolipID=%d", iC);
		FFAddString(&m_cmbLinkDutyId ,str);
	}
	for (iC = 0; iC < iTextMax; iC++)
	{
		str.Format(L"TextID=%d", iC);
		FFAddString(&m_cmbTextDutyId ,str);
	}
	// _xZkqqHx_jGpAiKiE_xHqqkZx_Id_xZkqqHx_iCmMiMlLiNnNjCgMiCpAjAnNjCoIiBeC_xHqqkZx_
	m_cmbLinkDutyId.SetCurSel(-1);
	m_cmbTextDutyId.SetCurSel(-1);
} // CFCTolBrChipDuty::DutyTblUpdateNotify.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrChipDuty::EnableSelect
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCpAjBeJjBpAiJmCjEfMiCkJiCmHiCkEiCkJjAnNjCoIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	bEnable	:_xZkqqHx_jBeJjBpAiJmCjEfMiCmMiPoKiNiHiCmN_xHqqkZx_ TRUE_xZkqqHx_iBeBjFhDiJmCjEfMiCmMiPoKiNiHiCmN_xHqqkZx_ FALSE_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.10.24 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCTolBrChipDuty::EnableSelect (BOOL bEnable)
{
	m_cmbLinkDutyId.EnableWindow(bEnable);
	m_cmbTextDutyId.EnableWindow(bEnable);
} // CFCTolBrChipDuty::EnableSelect.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrChipDuty::GetCmbButtonInfo
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiDhLiDfOiDjDiCmMiPoOjFpBiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	lIndex	:_xZkqqHx_iPoOjFpBiCmMiDeDiDjDiDgGiDgCiDeOiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiDhLiDfOiDjDiCmMiPoOjFpBiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iClBiCoKiImIiPoDiDhLiDfOiDjDiCmMiPoOjFpBiCkKjGlDiCkCiPoKiNiHiCmNiBeB_xHqqkZx_FCCmbButtonInfo::pCmb = NULL
 *			_xZkqqHx_iCmMiPoOjFpBiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.06.29 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
const CFCTolBrBase::FCCmbButtonInfo& CFCTolBrChipDuty::GetCmbButtonInfo (long lIndex)
{
	static FCCmbButtonInfo s_info[] =
	{
		{	&m_cmbLinkDutyId,					// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIjFmPjAjEiBeC_xHqqkZx_
			ID_CHIPEDIT_CMB_MOLIP_DUTY_ID,		// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmM_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
			CBS_DROPDOWNLIST,					// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjCmHiJmBiDfIiDfOiDeDiDiLiBeC_xHqqkZx_WS_VISIBLE|WS_VSCROLL|WS_TABSTOP _xZkqqHx_iCmNjFfHiPiAiBeC_xHqqkZx_
			s_nBoxWidth,						// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjFjNiBeC_xHqqkZx_
			s_nDroppedWidth,					// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMjFjNiBeC_xHqqkZx_
			s_nDroppedHeight },					// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMiNiCiClDiBeC_xHqqkZx_

		{	&m_cmbTextDutyId,					// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIjFmPjAjEiBeC_xHqqkZx_
			ID_CHIPEDIT_CMB_TEXT_DUTY_ID,		// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmM_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
			CBS_DROPDOWNLIST,					// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjCmHiJmBiDfIiDfOiDeDiDiLiBeC_xHqqkZx_WS_VISIBLE|WS_VSCROLL|WS_TABSTOP _xZkqqHx_iCmNjFfHiPiAiBeC_xHqqkZx_
			s_nBoxWidth,						// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjFjNiBeC_xHqqkZx_
			s_nDroppedWidth,					// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMjFjNiBeC_xHqqkZx_
			s_nDroppedHeight },					// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMiNiCiClDiBeC_xHqqkZx_

		{	NULL,								// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIjFmPjAjEiBeC_xHqqkZx_
			0,									// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmM_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
			0,									// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjCmHiJmBiDfIiDfOiDeDiDiLiBeC_xHqqkZx_WS_VISIBLE|WS_VSCROLL|WS_TABSTOP _xZkqqHx_iCmNjFfHiPiAiBeC_xHqqkZx_
			0,									// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjFjNiBeC_xHqqkZx_
			0,									// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMjFjNiBeC_xHqqkZx_
			0 },								// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMiNiCiClDiBeC_xHqqkZx_
	};
	return s_info[lIndex];
} // CFCTolBrChipDuty::GetCmbButtonInfo.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrChipDuty::OnCmdSessionEnded
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	CommandGate_xZkqqHx_iCmMiDfKiDgCiDfGiDiHiDjDiPeJjHlJiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.07.02 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCTolBrChipDuty::OnCmdSessionEnded ()
{
	// Baseclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::OnCmdSessionEnded();
	if (m_bUpdateDutyTable)
	{
		DutyTblUpdateNotify();
		m_bUpdateDutyTable = FALSE;
	}
} // CFCTolBrChipDuty::OnCmdSessionEnded.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrChipDuty::OnCommandCalled
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	CommandGate_xZkqqHx_iCmFiDfCiDhNiDjDiDgIiCkKiPiIjHjNiClDiCoKiClNiCmGiCkLiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	gateCmd	:_xZkqqHx_iDfCiDhNiDjDiDgIiCmMiOoNjHnOiCpAiOhHjCoIiBeC_xHqqkZx_
 *			lParam	:_xZkqqHx_iDfCiDhNiDjDiDgIiCmMiIpIjAjEiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.07.02 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCTolBrChipDuty::OnCommandCalled (FTGateCmd gateCmd, LPARAM lParam)
{
	// Baseclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::OnCommandCalled(gateCmd, lParam);
	switch (gateCmd)
	{
	case FD_CMD_INSERT1_OBJ_LINK_DUTY_TBL:
	case FD_CMD_DELETE1_OBJ_LINK_DUTY_TBL:
	case FD_CMD_INSERT1_OBJ_TEXT_DUTY_TBL:
	case FD_CMD_DELETE1_OBJ_TEXT_DUTY_TBL:
		m_bUpdateDutyTable = TRUE;
		break;
	}
} // CFCTolBrChipDuty::OnCommandCalled.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrChipDuty::OnInitContents
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgIiDeMiDiFiDiBiDjDiDgHiCmM_xHqqkZx_DeleteContents_xZkqqHx_iBeB_xHqqkZx_InitContents_xZkqqHx_iCkJiCoHiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.07.02 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCTolBrChipDuty::OnInitContents ()
{
	// Baseclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::OnInitContents();
	DutyTblUpdateNotify();
} // CFCTolBrChipDuty::OnInitContents.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrChipDuty::OnObjSelectChanged
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiCmMjBeJjBpAiCkKjFmPiNfIiClDiCoKiClNiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.07.02 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCTolBrChipDuty::OnObjSelectChanged ()
{
	// Baseclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::OnObjSelectChanged();
	ObjSelectNotify();
} // CFCTolBrChipDuty::OnObjSelectChanged.

/////////////////////////////////////////////////////////////////////////////
// CFCTolBrChipDuty _xZkqqHx_iDiBiDgCiDfKiBfLiDfH_xHqqkZx_ _xZkqqHx_iDgOiDjDiDgIiDiJiBeC_xHqqkZx_

//----- 05.06.29 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrChipDuty::CalcFixedLayout
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iMmFjCoIiDfEiDeDiDfJiCmMiMhGiOfKiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeCiOoFiCmJiDgIiDgCiDeOiClDiCoKiCoJiCmGiCkLiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.01.04 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//CSize CFCTolBrChipDuty::CalcFixedLayout (BOOL bStretch, BOOL bHorz)
//{
//	if (bHorz)
//	//----- _xZkqqHx_jAiFjFlNjFpLiMpMiCmMiDgIiDgCiDeOiOjO_xHqqkZx_ ------
//	{
//		// _xZkqqHx_jGhLjHiIiBeBiClBiCmMiPiIjHjNiCmNjFhDjHhGiCmIiCmMiClOiCkKiBeBiPgDjFpLiMpMiCmJjAeMiCmOiClFiClNiDhEiDiNiBfLiDgHiDgDiBfLiDiLiDgPiBfL_xHqqkZx_
//		// _xZkqqHx_iCpAiDgIiDgCiDeOiClFiCoGiCkEiCmGiClHiCoJiCmGiBeBjFjEjFgJiCkKiCkEiCnMiCkN_xHqqkZx_SEPARATOR_xZkqqHx_iImKjChFiCmJiInKjDkOiClFiCmIiCkCiClNiCnPiBeC_xHqqkZx_
//		FCWndAndId wid[] =
//		{
//			{ &m_cmbLinkDutyId, ID_CHIPEDIT_CMB_MOLIP_DUTY_ID },
//			{ &m_cmbTextDutyId, ID_CHIPEDIT_CMB_TEXT_DUTY_ID },
//		};
//		::FFHorznizeToolBar(this, wid, sizeof(wid) / sizeof(wid[0]));
//	}
//	return BASE_CLASS::CalcFixedLayout(bStretch, bHorz);
//} // CFCTolBrChipDuty::CalcFixedLayout.
//----- 05.06.29 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrChipDuty::OnSelchangeChipeditCmbMolipDutyId
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgDiBfLiDiLiDgPiBfLiCmMiBeBjGpAiKiEiDfCiDjDiDhLiDhLiDgCiDeOiDfIiCkKjFmPiNfIiClDiCoKiClNiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.10.24 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCTolBrChipDuty::OnSelchangeChipeditCmbMolipDutyId ()
{
	// _xZkqqHx_jFmPiNfIiClDiCoKiClNiMoDiCmJjGpAiKiE_xHqqkZx_Id_xZkqqHx_iCpAiOoGjDlOiBeC_xHqqkZx_
	const int iDutyId = m_cmbLinkDutyId.GetCurSel();
	// _xZkqqHx_iMlLiNnNiCmMjBeJjBpAjFjEjFgJiCmMjBeJjBpAiCpAiJpAiPjMiBeC_xHqqkZx_
	g_pView->ClearSelectObj(TRUE);
	if (0 <= iDutyId)
	{
		// _xZkqqHx_jAfGiClFiCkCjFjEjFgJiCpAjBeJjBpAiPpDjBnEiCmJiBeCiBeC_xHqqkZx_
		FCObjDynabase* pObj = g_pDoc->ObjID2Object(FFChipEditorDoc()->GetChipDutyObjects(FDCA_LINK)[iDutyId]);
		g_pView->AppendSelectObj(pObj, TRUE);
	}
} // CFCTolBrChipDuty::OnSelchangeChipeditCmbMolipDutyId.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrChipDuty::OnSelchangeChipeditCmbTextDutyId
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgDiBfLiDiLiDgPiBfLiCmMiBeBjGpAiKiE_xHqqkZx_Id_xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCkKjFmPiNfIiClDiCoKiClNiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.10.24 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCTolBrChipDuty::OnSelchangeChipeditCmbTextDutyId ()
{
	// _xZkqqHx_jFmPiNfIiClDiCoKiClNiMoDiCmJjGpAiKiE_xHqqkZx_Id_xZkqqHx_iCpAiOoGjDlOiBeC_xHqqkZx_
	const int iDutyId = m_cmbTextDutyId.GetCurSel();
	// _xZkqqHx_iMlLiNnNiCmMjBeJjBpAjFjEjFgJiCmMjBeJjBpAiCpAiJpAiPjMiBeC_xHqqkZx_
	g_pView->ClearSelectObj(TRUE);
	if (0 <= iDutyId)
	{
		// _xZkqqHx_jAfGiClFiCkCjFjEjFgJiCpAjBeJjBpAiPpDjBnEiCmJiBeCiBeC_xHqqkZx_
		FCObjDynabase* pObj = g_pDoc->ObjID2Object(FFChipEditorDoc()->GetChipDutyObjects(FDCA_TEXT)[iDutyId]);
		g_pView->AppendSelectObj(pObj, TRUE);
	}
} // CFCTolBrChipDuty::OnSelchangeChipeditCmbTextDutyId.

