#include "stdafx.h"
#include "DynamicDraw.h"
#include "DynamicDrawView.h"	// For g_pView.
#include "FoundDoc.h"			// For g_pDoc.
#include "UtilWin.h"			// For FFPostSendMessage.
#include "ObjGroup.h"			// For FCObjGroup.
#include "ToolRichEdit.h"		// This header.

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


// 02.12.05 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//FCToolRichEdit	g_toolRichEdit;

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolRichEdit::FCToolRichEdit
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDfIiDgHiDiJiDeOiDfOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.07.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
FCToolRichEdit::FCToolRichEdit ()
{
	// Select_xZkqqHx_iKnGjAjEiOmAiNhDjCiGiBeI_xHqqkZx_
	m_bToolSelecting = FALSE;
} // FCToolRichEdit::FCToolRichEdit.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolRichEdit::Select
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iClBiCmMiDgDiBfLiDiLiCkKjBeJjBpAiClDiCoKiClNiCmGiCkLiBeBiDfCiBfLiDiLiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.19 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolRichEdit::Select (CDC* pDC)
{
	// Select_xZkqqHx_iKnGjAjEiOmAiNhDjCiGiBeI_xHqqkZx_
	m_bToolSelecting = TRUE;

	// Superclass_xZkqqHx_iKnGjAjEiCpAiOmAiNhDiBeCjFjEjFgJiCmMjBeJjBpAiCmNiClBiClBiCmFiNhDiCoNiCoKiCoJiBeC_xHqqkZx_
	BASE_CLASS::Select(pDC);

//----- 05.07.05 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	// _xZkqqHx_iMjPiNpFiMiLiJmKiCmMjFmPjAjEiCpAiPiJiKpKiJlLiBeC_xHqqkZx_
//	m_pHitObj = NULL;
//----- 05.07.05 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
	ASSERT(!IsEditingText());

	// _xZkqqHx_jFnCiPfHjBmOiPnLiCmMjFjEjFgJiBeC_xHqqkZx_
	FCObjFigure* pTargetObj = NULL;
	// _xZkqqHx_jAgFjFjEjFgJiBeCiDePiDiLiBfLiDhGjFjEjFgJiBeC_xHqqkZx_
	FCObjDynabase* pTopObj = NULL;

//----- 06.12.05 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
//	//----- _xZkqqHx_iCnMiClIiBeBiNmFiMoDiCmJjBeJjBpAiClDiCoKiClNjFjEjFgJiCpAjClCiCnHiCoJ_xHqqkZx_ -----
//
//	if (g_pView->GetLastSelectObj() != NULL &&
//		CanHandle(g_pView->GetLastSelectObj()))
//	//----- _xZkqqHx_iNmFiMoDiCmJjBeJjBpAiClDiCoKiClNjFjEjFgJiCkKjFnCiPfHjBmOiPnLjFjEjFgJiCmMiPoKiNiH_xHqqkZx_ -----
//	{
//		if ((g_pView->GetLastSelectObj())->IsKindOf(FDOJ_GROUP))
//		//----- _xZkqqHx_iNmFiMoDiCmJjBeJjBpAiClDiCoKiClNjFjEjFgJiCkKiDePiDiLiBfLiDhGjFjEjFgJiCmMiPoKiNiH_xHqqkZx_ -----
//		{
//			// _xZkqqHx_iDePiDiLiBfLiDhGiDiBiDjDiDgPjCiGiCmJjFnCiPfHiJmCjEfMiCmIiDgFiDeMiDfIiDgHiCkKiCkAiCoJiCkJjClCiCnHiCoJiBeC_xHqqkZx_
//			FCObjGroup* pGrp = (FCObjGroup*)g_pView->GetLastSelectObj();
//			// _xZkqqHx_iNmFiMoDiCmJiDeOiDiKiDgCiDeOiClDiCoKiClNiDgFiDeMiDfIiDgHiCmMjFjEjFgJiCpAiDfOiBfLiDfBiDgCiDgHiCmJiBeC_xHqqkZx_
//			pTargetObj = (FCObjFigure*)pGrp->GetEditableTextObj(
//													g_pView->GetLastPoint());
//			if (pTargetObj == NULL)
//			//----- _xZkqqHx_iNmFiMoDiCmJiDeOiDiKiDgCiDeOiClDiCoKiClNiCmMiCkKiDgFiDeMiDfIiDgHiCmFiCmNiCmIiCkCiPoKiNiH_xHqqkZx_ -----
//			{
//				// _xZkqqHx_jFnCiPfHiJmCjEfMiCmIiDgFiDeMiDfIiDgHiCpAjCiKiPgPiClFiBeBiClLiCoKiCkKiIoKiMmCiClOiCkPiCmIiCoHiDfOiBfLiDfBiDgCiDgHiCmJiBeC_xHqqkZx_
//				ObjDynabaseVector vObj;
//				pGrp->GetCanBeTextObject(vObj);
//				// _xZkqqHx_jFnCiPfHiJmCjEfMiCmIiDgFiDeMiDfIiDgHjFjEjFgJiCkKiCkAiCoJiPoKiNiHiBeC_xHqqkZx_
//				if (!vObj.empty())
//					pTargetObj = (FCObjFigure*)vObj.back();
//			}
//			// _xZkqqHx_jAgFjFjEjFgJiCpAjAnNjCoIiBeC_xHqqkZx_
//			if (pTargetObj != NULL) pTopObj = pGrp;
//		} else
//		//----- _xZkqqHx_iNmFiMoDiCmJjBeJjBpAiClDiCoKiClNjFjEjFgJiCkKiDePiDiLiBfLiDhGjFjEjFgJiImIiKePiCmMiPoKiNiH_xHqqkZx_ -----
//		{
//			pTargetObj = (FCObjFigure*)g_pView->GetLastSelectObj();
//		}
//	}
//
//	//----- _xZkqqHx_iOjPiCmJiBeBiMlLiNnNjBeJjBpAjCiGiCmMjFjEjFgJiCpAjBfDiCmEjClCiCnHiCoJ_xHqqkZx_ -----
//
//	if (pTargetObj == NULL)
//	//----- _xZkqqHx_jFnCiPfHiDfOiBfLiDfBiDgCiDgHiCmMjFjEjFgJiCkKjGkCjAnNjCoIiCmMiPoKiNiH_xHqqkZx_ -----
//	{
//		// _xZkqqHx_jBeJjBpAjCiGiCmMjFjEjFgJjCiGiCmFiDgFiDeMiDfIiDgHjFnCiPfHiJmCjEfMiCmIjFjEjFgJiCpAjClCiCnHiCoJiBeC_xHqqkZx_
//		ObjDynabaseVector::const_reverse_iterator rObj;
//		for (rObj = g_pView->SelectObjVector().rbegin();
//			 rObj != g_pView->SelectObjVector().rend(); rObj++)
//		{
//			if (CanHandle(*rObj))
//			//----- _xZkqqHx_jFnCiPfHjBmOiPnLjFjEjFgJiCmMiPoKiNiH_xHqqkZx_ -----
//			{
//				if ((*rObj)->IsKindOf(FDOJ_GROUP))
//				//----- _xZkqqHx_iDePiDiLiBfLiDhGjFjEjFgJiCmMiPoKiNiH_xHqqkZx_ -----
//				{
//					// _xZkqqHx_iDePiDiLiBfLiDhGiDiBiDjDiDgPjCiGiCmJjFnCiPfHiJmCjEfMiCmIiDgFiDeMiDfIiDgHiCkKiCkAiCoJiCkJjClCiCnHiCoJiBeC_xHqqkZx_
//					FCObjGroup* pGrp = (FCObjGroup*)*rObj;
//					ObjDynabaseVector vObj;
//					pGrp->GetCanBeTextObject(vObj);
//					if (!vObj.empty())
//					//----- _xZkqqHx_jFnCiPfHiJmCjEfMiCmIiDgFiDeMiDfIiDgHjFjEjFgJiCkKiCkAiCoJiPoKiNiH_xHqqkZx_ -----
//					{
//						pTargetObj = (FCObjFigure*)vObj.back();
//						// _xZkqqHx_jAgFjFjEjFgJiCpAjAnNjCoIiBeC_xHqqkZx_
//						pTopObj = pGrp;
//						break;
//					}
//				} else
//				{
//					pTargetObj = (FCObjFigure*)*rObj;
//					break;
//				}
//			}
//		}
//	}
//----- 06.12.05 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
	//----- _xZkqqHx_iNmFiMoDiCmJjBeJjBpAiClDiCoKiClNjFjEjFgJiCpAjHeEjAoGiClFiCmEjClCiCnHiCoJiBeC_xHqqkZx_
	//		_xZkqqHx_iDhBiDgCiDgHiClFiCmIiCkJiCmBiClNiPoKiNiHiCmNjBeJjBpAjFjEjFgJiCpAjClCiCnHiCoJ_xHqqkZx_ -----
	ObjDynabaseVector vLastSelObj;
	if (g_pView->GetLastSelectObj() != NULL)
		vLastSelObj.push_back(g_pView->GetLastSelectObj());
	mdef_const_reverse_iterator(ObjDynabaseVector, rObj);
	m2_rfor (rObj, vLastSelObj, g_pView->SelectObjVector())
	{
		if (CanHandle(*rObj))
		//----- _xZkqqHx_jFnCiPfHjBmOiPnLjFjEjFgJiCmMiPoKiNiH_xHqqkZx_ -----
		{
			if ((*rObj)->IsKindOf(FDOJ_GROUP))
			//----- _xZkqqHx_iDePiDiLiBfLiDhGjFjEjFgJiCmMiPoKiNiH_xHqqkZx_ -----
			{
				// _xZkqqHx_iDePiDiLiBfLiDhGiDiBiDjDiDgPjCiGiCmJjFnCiPfHiJmCjEfMiCmIiDgFiDeMiDfIiDgHiCkKiCkAiCoJiCkJjClCiCnHiCoJiBeC_xHqqkZx_
				FCObjGroup* pGrp = (FCObjGroup*)*rObj;
				if (*rObj == g_pView->GetLastSelectObj())
				//----- _xZkqqHx_iDfOiBfLiDfBiDgCiDgHiCkKiNmFiMoDiCmJjBeJjBpAiClDiCoKiClNjFjEjFgJiCmMiPoKiNiH_xHqqkZx_ -----
				{
					// _xZkqqHx_iNmFiMoDiCmJiDeOiDiKiDgCiDeOiClDiCoKiClNiDgFiDeMiDfIiDgHiCmMjFjEjFgJiCpAjHeEjAoGiDfOiBfLiDfBiDgCiDgHiCmJiBeC_xHqqkZx_
					FCObjDynabase* pEditObj = pGrp->GetEditableTextObj(
															g_pView->GetLastPoint());
					if (pEditObj != NULL)
					{
						// _xZkqqHx_iDfOiBfLiDfBiDgCiDgHiCmGiClFiCmEjAnNjCoIiBeC_xHqqkZx_
						pTargetObj = (FCObjFigure*)pEditObj;
						// _xZkqqHx_jAgFjFjEjFgJiCpAjAnNjCoIiBeC_xHqqkZx_
						pTopObj = pGrp;
						break;
					}
				}
				// _xZkqqHx_iDePiDiLiBfLiDhGjCiGiCmMiBeBiDgFiDeMiDfIiDgHjFnCiPfHiJmCjEfMiCmIjFjEjFgJiCpAiOoGjDlOiBeC_xHqqkZx_
				FCObjDynabase* pEditObj = pGrp->GetFrontEditableTextObj();
				if (pEditObj != NULL)
				{
					// _xZkqqHx_iDfOiBfLiDfBiDgCiDgHiCmGiClFiCmEjAnNjCoIiBeC_xHqqkZx_
					pTargetObj = (FCObjFigure*)pEditObj;
					// _xZkqqHx_jAgFjFjEjFgJiCpAjAnNjCoIiBeC_xHqqkZx_
					pTopObj = pGrp;
					break;
				}
			} else
			//----- _xZkqqHx_jCfAjDmGiCmMjFjEjFgJiCmMiPoKiNiH_xHqqkZx_ -----
			{
				if ((*rObj)->CanBeTextObject() &&
					FD_MIN_AREA_FOR_TEXT <= (*rObj)->CalcArea())
				//----- _xZkqqHx_jFjEjFgJiCkKiDgFiDeMiDfIiDgHjFnCiPfHiJmCjEfMiCmMiPoKiNiH_xHqqkZx_ -----
				{
					// _xZkqqHx_iDfOiBfLiDfBiDgCiDgHiCmGiClFiCmEjAnNjCoIiBeC_xHqqkZx_
					pTargetObj = (FCObjFigure*)*rObj;
					break;
				}
			}
		}
	}
//----- 06.12.05 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----
	if (pTargetObj != NULL)
	//----- _xZkqqHx_jFnCiPfHiDfOiBfLiDfBiDgCiDgHiCmMjFjEjFgJiCkKjBlGiNnNiClHiCoJiPoKiNiH_xHqqkZx_ -----
	{
		// _xZkqqHx_jFnCiPfHiKeKiOgOiBeC_xHqqkZx_
		StartToEditText(pTargetObj, pTopObj, &g_pView->GetLastPoint());
	}
	// Select_xZkqqHx_iKnGjAjEiOmAiNhDjCiGiBeI_xHqqkZx_
	m_bToolSelecting = FALSE;
} // FCToolRichEdit::Select.

//----- 00.01.19 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolRichEdit::Unselect
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iClBiCmMiDgDiBfLiDiLiCkKjBeJjBpAiJpAiPjMiClDiCoKiClNiCmGiCkLiBeBiDfCiBfLiDiLiClDiCoKiCoJiBeC_xHqqkZx_
// *
// * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.19 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//void FCToolRichEdit::Unselect (CDC* pDC)
//{
//	// _xZkqqHx_iDgFiDeMiDfIiDgHjFnCiPfHjCiGiCmIiCoHiCmOiPeJjHlJiBeC_xHqqkZx_
//	if (IsEditingText()) StopToEditText();
//	// Superclass_xZkqqHx_iKnGjAjEiCpAiOmAiNhDiBeCjFjEjFgJiCmMjBeJjBpAiCkKiJpAiPjMiClDiCoKiCoJiBeC_xHqqkZx_
//	BASE_CLASS::Unselect(pDC);
//} // FCToolRichEdit::Unselect.
//----- 00.01.19 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

//----- 06.12.05 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolRichEdit::CanHandle
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iOhHjCoIiClDiCoKiClNjFjEjFgJiCkKiClBiCmMiDgDiBfLiDiLiCmFiIlFiCkGiCoJiCkJiCmHiCkEiCkJiCpAjFnEiClHiBeC_xHqqkZx_
// *
// * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pObj	:_xZkqqHx_jFjEjFgJiCpAiOhHjCoIiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iJmCjEfMiCmMiPoKiNiHiCmN_xHqqkZx_ TRUE_xZkqqHx_iBeBjFhDiJmCjEfMiCmMiPoKiNiHiCmN_xHqqkZx_ FALSE _xZkqqHx_iCpAjFnEiClHiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.06.25 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *			99.10.24 Fukushiro M. CanBeMaskObject_xZkqqHx_iOgEjHgMjFmPiNfIiCmJjElKiCkCjFmPiNfIiBeC_xHqqkZx_
// *************************************************************************/
//BOOL FCToolRichEdit::CanHandle (const FCObjDynabase* pObj) const
//{
//	if (!pObj->CanBeTextObject())
//	//----- _xZkqqHx_jFjEjFgJiCkKiDhNiDfIiDeOiCmJiOgHiCkGiCmIiCkCiPoKiNiH_xHqqkZx_ -----
//	{
//		// _xZkqqHx_iDePiDiLiBfLiDhGjFjEjFgJiCmFiCmIiCkCiCmIiCoHiCmOiBeBjFhDiJmCiBeC_xHqqkZx_
//		if (!pObj->IsKindOf(FDOJ_GROUP)) return FALSE;
//		//----- _xZkqqHx_iDePiDiLiBfLiDhGjFjEjFgJiCmMiPoKiNiH_xHqqkZx_ -----
//		FCObjGroup* pGrp = (FCObjGroup*)pObj;
//		ObjDynabaseVector vObj;
//		pGrp->GetCanBeTextObject(vObj);
//		if (vObj.empty()) return FALSE;
//	}
//	// Superclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
//	return BASE_CLASS::CanHandle(pObj);
//} // FCToolRichEdit::CanHandle.
//----- 06.12.05 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

//----- 00.11.24 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolRichEdit::CheckHitObject
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiPoDiCmFiCmMiDhNiDeFiDfIiDhBiDgCiDgHiCpAjClCiCnHiCoJiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDhBiDgCiDgHiClFiClNiPoKiNiHiCmN_xHqqkZx_ TRUE_xZkqqHx_iBeBiClFiCmIiCkCiPoKiNiHiCmN_xHqqkZx_ FALSE _xZkqqHx_iCpAjFnEiClHiBeC_xHqqkZx_
// *
// * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	m_pHitObj _xZkqqHx_iCmJiDhBiDgCiDgHiClFiClNjFjEjFgJiCpAjFnEiClHiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.14 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *			00.01.19 Fukushiro M. ToolSelect_xZkqqHx_iCkJiCoHiDfCiDhDiBfLiBeC_xHqqkZx_
// *************************************************************************/
//BOOL FCToolRichEdit::CheckHitObject ()
//{
//	// _xZkqqHx_iMjPiNpFiMiLiJmKiCmMjFmPjAjEiCpAiPiJiKpKiJlLiBeC_xHqqkZx_
//	m_pHitObj = NULL;
//
//	const CPoint lgptMsc = mm2lg(m_mmptMsc);
//	FCObjDynabase*	pObj;
//	//------ _xZkqqHx_jFjEjFgJiCmMiPoDiCmFiCmMiDeOiDiKiDgCiDeOiCkJiCmHiCkEiCkJjClCiCnHiCoJ_xHqqkZx_ -----
//	if (g_pDoc->GetIntersectObject(pObj, lgptMsc, -1) != -1)
//	{
//		m_pHitObj = pObj;
//		return TRUE;
//	}
//	// _xZkqqHx_iDhBiDgCiDgHiClFiCmIiCkCiBeC_xHqqkZx_
//	return FALSE;
//} // FCToolRichEdit::CheckHitObject.
//----- 00.11.24 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolRichEdit::GetDefaultIdleCursor
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	StateIdle_xZkqqHx_iCmFiDgGiDhEiDeIiDiLiDgHiCmJiOgHiCoNiCoKiCoJiDeKiBfLiDfMiDiLiDgOiDjDiDgIiDiLiCpAjFnEiClHiBeC_xHqqkZx_
 *			_xZkqqHx_jFfHiPiAiCmMiDeKiBfLiDfMiDiLiCmMiPoKiNiHiCmN_xHqqkZx_ NULL_xZkqqHx_iCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.07.19 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
HCURSOR FCToolRichEdit::GetDefaultIdleCursor () const
{
	return FFGetApp()->LoadCursor(IDC_CURSOR_TOOL_RICH_EDIT);
} // FCToolRichEdit::GetDefaultIdleCursor.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolRichEdit::OnAppendSelectObj
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iOhHjCoIiClDiCoKiClNjFjEjFgJiCpAjBeJjBpAiPpDjBnEiCmJiClHiCoJiBeCiDgDiBfLiDiLiCkKjDmGiOkJiCmMiDgFiBfLiDhFiDiLiCmF_xHqqkZx_
 *			_xZkqqHx_jBeJjBpAjFjEjFgJiCpAiKmHjHjNiClFiCmEiCkCiCoJiPoKiNiHiCmNiBeBiClLiClBiCmJjFjEjFgJiCpAjCmHiJmBiClHiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iJoGjGmKjFfMiOkGiCpAjBeJjBpAiPpDjBnEiCmJjFmPiNfIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFfMiOkGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiBeCjFfMiOkGjFmPiNfIiClFiCmIiCkCiPoKiNiHiCmN_xHqqkZx_NULL_xZkqqHx_iBeC_xHqqkZx_
 *			pObj:_xZkqqHx_jBeJjBpAiClHiCoJjFjEjFgJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jCiNiInD_xHqqkZx_>	CFCDynamicDrawView::AppendSelectObj_xZkqqHx_iCkJiCoHiCmMjAoKjHhAiKnGjAjEiBeC_xHqqkZx_
 *			CFCDynamicDrawView_xZkqqHx_iCmMjBeJjBpAiDgFiBfLiDhFiDiLiCmNjFmPiNfIiClFiCmIiCkCiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.07.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolRichEdit::OnAppendSelectObj (CDC* pDC, FCObjDynabase* pObj)
{
	// Baseclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::OnAppendSelectObj(pDC, pObj);

	// _xZkqqHx_iClBiCmMiKnGjAjEiCmNiBeB_xHqqkZx_FCToolBase::Select()_xZkqqHx_iCkJiCoHiCoAiOmAiNhDiClDiCoKiCoJiClNiCnPiBeB_xHqqkZx_
	// m_bToolSelecting_xZkqqHx_jFmPjAjEiCmJiCoGiCmBiCmEiMkJjFkKiCkPiCmEiCkCiCoJiBeC_xHqqkZx_

	if (!m_bToolSelecting && !IsEditingText())
	//----- Select_xZkqqHx_iKnGjAjEiOmAiNhDjCiGiCmFiCmNiCmIiCkNiBeBjFnCiPfHjCiGiCmFiCmNiCmIiCkCiPoKiNiH_xHqqkZx_ -----
	{
		// _xZkqqHx_jFnCiPfHjBmOiPnLiCmMjFjEjFgJiBeC_xHqqkZx_
		FCObjFigure* pTargetObj = NULL;
		// _xZkqqHx_jAgFjFjEjFgJiBeCiDePiDiLiBfLiDhGjFjEjFgJiBeC_xHqqkZx_
		FCObjDynabase* pTopObj = NULL;

		if (CanHandle(pObj))
		//----- _xZkqqHx_jFnCiPfHiJmCjEfMiCmMiPoKiNiH_xHqqkZx_ -----
		{
			if (pObj->IsKindOf(FDOJ_GROUP))
			//----- _xZkqqHx_iDePiDiLiBfLiDhGjFjEjFgJiCmMiPoKiNiH_xHqqkZx_ -----
			{
				// _xZkqqHx_iDePiDiLiBfLiDhGiDiBiDjDiDgPjCiGiCmJjFnCiPfHiJmCjEfMiCmIiDgFiDeMiDfIiDgHiCkKiCkAiCoJiCkJjClCiCnHiCoJiBeC_xHqqkZx_
				pTargetObj = (FCObjFigure*)((FCObjGroup*)pObj)->GetEditableTextObj(g_pView->GetLastPoint());
				// _xZkqqHx_jAgFjFjEjFgJiCpAjAnNjCoIiBeC_xHqqkZx_
				if (pTargetObj != NULL) pTopObj = pObj;
			} else
			{
				// _xZkqqHx_jFnCiPfHiJmCjEfMiCmMiPoKiNiHiCmNjFnCiPfHjBmOiPnLjFjEjFgJiCmJjDgPjIfOiBeC_xHqqkZx_
				pTargetObj = (FCObjFigure*)pObj;
			}
		}
		// _xZkqqHx_jFnCiPfHiKeKiOgOiBeC_xHqqkZx_
		if (pTargetObj != NULL)
			StartToEditText(pTargetObj, pTopObj, &g_pView->GetLastPoint());
	}
} // FCToolRichEdit::OnAppendSelectObj.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolRichEdit::OnRemoveSelectObj
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iOhHjCoIiClDiCoKiClNjFjEjFgJiCpAjEpBjBeJjBpAiPpDjBnEiCmJiClHiCoJiBeCiDgDiBfLiDiLiCkKjDmGiOkJiCmMiDgFiBfLiDhFiDiLiCmF_xHqqkZx_
 *			_xZkqqHx_jBeJjBpAjFjEjFgJiCpAiKmHjHjNiClFiCmEiCkCiCoJiPoKiNiHiCmNiBeBiClLiClBiCkJiCoHjFjEjFgJiCpAiNoNiPjMiClHiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iJoGjGmKjFfMiOkGiCpAjEpBjBeJjBpAiPpDjBnEiCmJjFmPiNfIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFfMiOkGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiBeCjFfMiOkGjFmPiNfIiClFiCmIiCkCiPoKiNiHiCmN_xHqqkZx_NULL_xZkqqHx_iBeC_xHqqkZx_
 *			pObj:_xZkqqHx_jBeJjBpAiClHiCoJjFjEjFgJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jCiNiInD_xHqqkZx_>	CFCDynamicDrawView::RemoveSelectObj_xZkqqHx_iCkJiCoHiCmMjAoKjHhAiKnGjAjEiBeC_xHqqkZx_
 *			CFCDynamicDrawView_xZkqqHx_iCmMjBeJjBpAiDgFiBfLiDhFiDiLiCmNjFmPiNfIiClFiCmIiCkCiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.07.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolRichEdit::OnRemoveSelectObj (CDC* pDC, FCObjDynabase* pObj)
{
	if (IsEditingText())
	//----- _xZkqqHx_jFnCiPfHjCiGiCmMiPoKiNiH_xHqqkZx_ -----
	{
		if (pObj == m_pTextObj || pObj == m_pTopObj)
		//----- _xZkqqHx_jFnCiPfHjCiGiCmMjFjEjFgJiCmMiPoKiNiH_xHqqkZx_ -----
		{
			// _xZkqqHx_jFnCiPfHiPeJjHlJiBeC_xHqqkZx_
			StopToEditText();
		}
	}

	// Baseclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::OnRemoveSelectObj(pDC, pObj);
} // FCToolRichEdit::OnRemoveSelectObj.

//----- 05.07.05 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolRichEdit::TransFDA
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iMiIjCoIjAkLjHeMiMmAiDeJiBfLiDgHiDhNiDgHiDjDiCmMjBeKiInKiCpAjFnEiClHiBeC_xHqqkZx_ToolPoly.mdrw_xZkqqHx_iCpAiOfBiPmGiBeC_xHqqkZx_
// *
// * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	iState	:_xZkqqHx_iMlLiNnNiCmMiPpDjBnEiCpAiOhHjCoIiBeC_xHqqkZx_
// *			iEvent	:_xZkqqHx_iDeDiDhIiDjDiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jBeKiInKiMoDiCmMiPpDjBnEiCpAjFnEiClHiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.19 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//int FCToolRichEdit::TransFDA (int iState, int iEvent)
//{
//	// _xZkqqHx_iInKiNhDjAoGiPpDjBnEiBeC_xHqqkZx_
//	int iNextState = STATE_NONE;	// _xZkqqHx_iPpDjBnEjGlDiClFiBeC_xHqqkZx_
//
//	// FDA_xZkqqHx_iCmMiMlLiNnNiCmMiPpDjBnEiBeC_xHqqkZx_
//	switch (iState)
//	{
//	case STATE_IDLE:				// _xZkqqHx_jBnCiClPiBeC_xHqqkZx_
//		switch (iEvent)
//		{
//		case WM_LBUTTONDOWN:	// _xZkqqHx_iNlGiDhLiDfOiDjDiDfPiDeFiDjDiBeC_xHqqkZx_
//			if (!IsEditingText())
//			{
////----- 05.07.04 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
////				// _xZkqqHx_iDhNiDeFiDfIiNmAjFfHiCmFiCmMiDhBiDgCiDgHiPpDjBnEiCpAjClCiCnHiCoJiBeC_xHqqkZx_
////				if (CheckHitObject(m_pHitObj, FDOZ_ON_EDIT))
////					iNextState = STATE_SELECT_OBJ;	// _xZkqqHx_jFjEjFgJjBeJjBpAiBeC_xHqqkZx_
////----- 05.07.04 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
//				// _xZkqqHx_iDhNiDeFiDfIiNmAjFfHiCmFiCmMiDhBiDgCiDgHiPpDjBnEiCpAjClCiCnHiCoJiBeC_xHqqkZx_
//				m_pHitObj = g_pDoc->GetIntersectObject(m_mmptMsc, NULL, FDOZ_ON_EDIT);
//				if (m_pHitObj != NULL)
//					iNextState = STATE_SELECT_OBJ;	// _xZkqqHx_jFjEjFgJjBeJjBpAiBeC_xHqqkZx_
////----- 05.07.04 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----
//
//
////----- 05.06.06 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
////				else
////					iNextState = STATE_START_ENCLOSE_TEXT_OBJ;	// _xZkqqHx_jFjEjFgJjFoPiImNiKeKiOgOiBeC_xHqqkZx_
////----- 05.06.06 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
//			}
//			break;
//		}
//		break;
//	case STATE_SELECT_OBJ:			// _xZkqqHx_jFjEjFgJjBeJjBpAiBeC_xHqqkZx_
//		iNextState = STATE_START_EDIT_TEXT;		// _xZkqqHx_iDgFiDeMiDfIiDgHjFnCiPfHiKeKiOgOiBeC_xHqqkZx_
//		break;
////----- 05.06.06 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
////	case STATE_START_ENCLOSE_TEXT_OBJ:	// _xZkqqHx_jFjEjFgJjFoPiImNiKeKiOgOiBeC_xHqqkZx_
////		iNextState = STATE_ENCLOSING_TEXT_OBJ;		// _xZkqqHx_jFjEjFgJjFoPiImNjCiGiBeC_xHqqkZx_
////		break;
////	case STATE_ENCLOSING_TEXT_OBJ:		// _xZkqqHx_jFjEjFgJjFoPiImNjCiGiBeC_xHqqkZx_
////		switch (iEvent)
////		{
////		case WM_MOUSEMOVE:	// _xZkqqHx_iDhNiDeFiDfIiInKjDkOiBeC_xHqqkZx_
////			iNextState = STATE_ENCLOSING_TEXT_OBJ;		// _xZkqqHx_jFjEjFgJjFoPiImNjCiGiBeC_xHqqkZx_
////			break;
////		case WM_LBUTTONUP:	// _xZkqqHx_iNlGiDhLiDfOiDjDiDeBiDgCiDhGiBeC_xHqqkZx_
////			iNextState = STATE_STOP_ENCLOSE_TEXT_OBJ;	// _xZkqqHx_jFjEjFgJjFoPiImNiPeJjHlJiBeC_xHqqkZx_
////			break;
////		}
////		break;
////	case STATE_STOP_ENCLOSE_TEXT_OBJ:	// _xZkqqHx_jFjEjFgJjFoPiImNiPeJjHlJiBeC_xHqqkZx_
////		iNextState = STATE_START_EDIT_TEXT;		// _xZkqqHx_iDgFiDeMiDfIiDgHjFnCiPfHiKeKiOgOiBeC_xHqqkZx_
////		break;
////----- 05.06.06 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
//	case STATE_START_EDIT_TEXT:		// _xZkqqHx_iDgFiDeMiDfIiDgHjFnCiPfHiKeKiOgOiBeC_xHqqkZx_
//		iNextState = STATE_IDLE;				// _xZkqqHx_jBnCiClPiBeC_xHqqkZx_
//		break;
//	}
//	// _xZkqqHx_iPpDjBnEjBeKiInKjGlDiClFiCmMiPoKiNiHiCmNiDfIiBfLiDhAiBfLiDeOiDiJiDfIiCmMiPpDjBnEjBeKiInKiCpAiMmEiCnBiPgPiClHiBeC_xHqqkZx_
//	if (iNextState == STATE_NONE)
//		iNextState = BASE_CLASS::TransFDA(iState, iEvent);
//	return iNextState;
//} // FCToolRichEdit::TransFDA.
//
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolRichEdit::StateFDA
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iPpDjBnEiCmJiJjOiClGiClNiPiIjHjNiCpAiOmAiNhDiClHiCoJiBeC_xHqqkZx_
// *
// * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	iState	:_xZkqqHx_iMlLiNnNiCmMiPpDjBnEiCpAiOhHjCoIiBeC_xHqqkZx_
// *			pDC		:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.19 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//void FCToolRichEdit::StateFDA (int iState, CDC* pDC)
//{
//	// FDA_xZkqqHx_iCmMiOjPiCmMiPpDjBnEiBeC_xHqqkZx_
//	switch (iState)
//	{
//	case STATE_SELECT_OBJ:			// _xZkqqHx_jFjEjFgJjBeJjBpAiBeC_xHqqkZx_
//		StateSelectObj(pDC);
//		break;
////----- 05.06.06 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
////	case STATE_START_ENCLOSE_TEXT_OBJ:	// _xZkqqHx_jFjEjFgJjFoPiImNiKeKiOgOiBeC_xHqqkZx_
////		StateStartEncloseTextObj(pDC);
////		break;
////	case STATE_ENCLOSING_TEXT_OBJ:		// _xZkqqHx_jFjEjFgJjFoPiImNjCiGiBeC_xHqqkZx_
////		StateEnclosingTextObj(pDC);
////		break;
////	case STATE_STOP_ENCLOSE_TEXT_OBJ:	// _xZkqqHx_jFjEjFgJjFoPiImNiPeJjHlJiBeC_xHqqkZx_
////		StateStopEncloseTextObj(pDC);
////		break;
////----- 05.06.06 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
//	case STATE_START_EDIT_TEXT:		// _xZkqqHx_iDgFiDeMiDfIiDgHjFnCiPfHiKeKiOgOiBeC_xHqqkZx_
//		StateStartEditText(pDC);
//		break;
//	default:
//		BASE_CLASS::StateFDA(iState, pDC);
//	}
//} // FCToolRichEdit::StateFDA.
//
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolRichEdit::StateSelectObj
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJjBeJjBpAiPiIjHjNiBeC_xHqqkZx_
// *
// * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.19 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//void FCToolRichEdit::StateSelectObj (CDC* pDC)
//{
//	TRACE(_T("StateSelectObj\r\n"));
//	// _xZkqqHx_iNkBiCmMjBeJjBpAjFjEjFgJiCpAiJpAiPjMiClFiBeBjAfGiClNiCmJjBeJjBpAiClFjClMiClHiBeC_xHqqkZx_
//	g_pView->ClearSelectObj(pDC);
//	g_pView->AppendSelectObj(m_pHitObj, pDC);
//	// _xZkqqHx_iCmGiCoIiCkAiCkGiClI_xHqqkZx_NULL_xZkqqHx_iCmFiPiJiKpKiJlLiBeC_xHqqkZx_
//	m_pTargetObj = NULL;
//	// _xZkqqHx_jAgFjFjEjFgJiBeCiDePiDiLiBfLiDhGjFjEjFgJiBeC_xHqqkZx_
//	m_pTopObj = NULL;
//	if (CanHandle(m_pHitObj))
//	//----- _xZkqqHx_jFnCiPfHiJmCjEfMiCmMiPoKiNiH_xHqqkZx_ -----
//	{
//		if (m_pHitObj->IsKindOf(FDOJ_GROUP))
//		//----- _xZkqqHx_iDePiDiLiBfLiDhGjFjEjFgJiCmMiPoKiNiH_xHqqkZx_ -----
//		{
//			// _xZkqqHx_iDePiDiLiBfLiDhGiDiBiDjDiDgPjCiGiCmJjFnCiPfHiJmCjEfMiCmIiDgFiDeMiDfIiDgHiCkKiCkAiCoJiCkJjClCiCnHiCoJiBeC_xHqqkZx_
//			FCObjGroup* pGrp = (FCObjGroup*)m_pHitObj;
//			m_pTargetObj = (FCObjFigure*)pGrp->GetEditableTextObj(m_mmptMsc);
//			// _xZkqqHx_jAgFjFjEjFgJiCpAjAnNjCoIiBeC_xHqqkZx_
//			if (m_pTargetObj != NULL) m_pTopObj = pGrp;
//		} else
//		{
//			// _xZkqqHx_jFnCiPfHiJmCjEfMiCmMiPoKiNiHiCmNjFnCiPfHjBmOiPnLjFjEjFgJiCmJjDgPjIfOiBeC_xHqqkZx_
//			m_pTargetObj = (FCObjFigure*)m_pHitObj;
//		}
//	}
//} // FCToolRichEdit::StateSelectObj.
//----- 05.07.05 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

//----- 05.06.06 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolRichEdit::StateStartEncloseTextObj
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJjFoPiImNiKeKiOgOiPiIjHjNiBeC_xHqqkZx_
// *
// * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.19 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//void FCToolRichEdit::StateStartEncloseTextObj (CDC* pDC)
//{
//	TRACE(_T("StateStartEncloseTextObj\r\n"));
//	// OnLButtonUp_xZkqqHx_iCnMiCmFiClBiCmM_xHqqkZx_Window_xZkqqHx_iCmJiDeDiDhIiDjDiDgHiBeC_xHqqkZx_
//	::FFSetCapture(g_pView->m_hWnd);
//	// _xZkqqHx_jFnCiPfHjBmOiPnLiCmMjFjEjFgJiBeC_xHqqkZx_
//	m_pTargetObj = NULL;
//	// _xZkqqHx_jAgFjFjEjFgJiBeCiDePiDiLiBfLiDhGjFjEjFgJiBeC_xHqqkZx_
//	m_pTopObj = NULL;
//	// _xZkqqHx_iDhEiDeIiBfLiDeKiDfIiDhEiDiMiBfLiDiAjFgAiJoGiKeKiOgOiBeC_xHqqkZx_
//	FocusFrameDrawBegin(pDC, m_mmptMsc);
//} // FCToolRichEdit::StateStartEncloseTextObj.
//
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolRichEdit::StateEnclosingTextObj
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJjFoPiImNjCiGiPiIjHjNiBeC_xHqqkZx_
// *
// * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.19 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//void FCToolRichEdit::StateEnclosingTextObj (CDC* pDC)
//{
//	TRACE(_T("StateEnclosingTextObj\r\n"));
//	// _xZkqqHx_iDhEiDeIiBfLiDeKiDfIiDhEiDiMiBfLiDiAjFgAiJoGiBeC_xHqqkZx_
//	FocusFrameDrawing(pDC, m_mmptMsc);
//} // FCToolRichEdit::StateEnclosingTextObj.
//
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolRichEdit::StateStopEncloseTextObj
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJjFoPiImNiPeJjHlJiPiIjHjNiBeC_xHqqkZx_
// *
// * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.19 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//void FCToolRichEdit::StateStopEncloseTextObj (CDC* pDC)
//{
//	TRACE(_T("StateStopEncloseTextObj\r\n"));
//	FocusFrameDrawEnd(pDC);
//	// _xZkqqHx_iDhEiDiMiBfLiDiAjCiGiCmJiKnMiCnMiCoKiCoJjFjEjFgJiCpAjCiKiPgPiBeC_xHqqkZx_
//	ObjDynabaseVector vObj;
//	g_pDoc->GetRectInObject(vObj, GetFocusFrame(), FDOZ_ON_EDIT);
//	// _xZkqqHx_iNkBiCmMjBeJjBpAjFjEjFgJiCpAiJpAiPjMiClFiBeBjAfGiClNiCmJjBeJjBpAiClFjClMiClHiBeC_xHqqkZx_
//	g_pView->ClearSelectObj(pDC);
//	g_pView->AppendSelectObj(vObj, pDC);
//	// _xZkqqHx_iLoJiMgAjDoAiCmJiCkAiCoJjBfDiCmEiCmMjFjEjFgJiCmJjBmOiClFiCmEiBeBiDfOiBfLiDfBiDgCiDgHjFjEjFgJiCpAiMjPiNpFiClHiCoJiBeC_xHqqkZx_
//	ObjDynabaseVector::reverse_iterator rObj;
//	for (rObj = vObj.rbegin(); rObj != vObj.rend(); rObj++)
//	{
//		// _xZkqqHx_jFnCiPfHiJmCjEfMiCmMiPoKiNiHiCmNjFnCiPfHjBmOiPnLjFjEjFgJiCmJjDgPjIfOiBeC_xHqqkZx_
//		if (CanHandle(*rObj))
//		{
//			if ((*rObj)->IsKindOf(FDOJ_GROUP))
//			//----- _xZkqqHx_iDePiDiLiBfLiDhGjFjEjFgJiCmMiPoKiNiH_xHqqkZx_ -----
//			{
//				// _xZkqqHx_iDePiDiLiBfLiDhGiDiBiDjDiDgPjCiGiCmJjFnCiPfHiJmCjEfMiCmIiDgFiDeMiDfIiDgHiCkKiCkAiCoJiCkJjClCiCnHiCoJiBeC_xHqqkZx_
//				FCObjGroup* pGrp = (FCObjGroup*)*rObj;
//				ObjDynabaseVector vObj;
//				pGrp->GetCanBeTextObject(vObj);
//				if (vObj.size() == 1)
//				//----- _xZkqqHx_jFnCiPfHiJmCjEfMiCmIiDgFiDeMiDfIiDgHjFjEjFgJiCkKiCfAiCmCiClOiCkPiCmMiPoKiNiH_xHqqkZx_ -----
//				{
//					m_pTargetObj = (FCObjFigure*)vObj.front();
//					// _xZkqqHx_jAgFjFjEjFgJiCpAjAnNjCoIiBeC_xHqqkZx_
//					m_pTopObj = pGrp;
//					break;
//				}
//			} else
//			{
//				m_pTargetObj = (FCObjFigure*)*rObj;
//				break;
//			}
//		}
//	}
//	::FFReleaseCapture();	// LButtonDown_xZkqqHx_iCmJiCoGiCmBiCmEiOgOiCnMiCmBiClNiDhNiDeFiDfIiCmM_xHqqkZx_
//							// _xZkqqHx_jFnPiKgMiCpAiJpAiPjMiClFiCnMiClHiBeC_xHqqkZx_
//} // FCToolRichEdit::StateStopEncloseTextObj.
//----- 05.06.06 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

//----- 05.07.05 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolRichEdit::StateStartEditText
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgFiDeMiDfIiDgHjFnCiPfHiKeKiOgOiPiIjHjNiBeC_xHqqkZx_
// *
// * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.19 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//void FCToolRichEdit::StateStartEditText (CDC* pDC)
//{
//	TRACE(_T("StateStartEditText\r\n"));
//	// _xZkqqHx_jFnCiPfHiKeKiOgOiBeCiDfCiDjDiDgHiDiNiBfLiDiLiDeMiBfLiCpAiJjPiClFiCmEiCkCiCoKiCmOjFfHiPiAiPpDjBnEiCmFiDeHiDgGiDeCiDgCiDgHiBeC_xHqqkZx_ 
////----- 01.04.27 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
////	if (m_pTargetObj != NULL)
////		StartToEditText(m_pTargetObj, m_dwFlags & MK_CONTROL);
////----- 01.04.27 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
//	if (m_pTargetObj != NULL)
//		StartToEditText(m_pTargetObj, m_pTopObj);
////----- 01.04.27 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----
//} // FCToolRichEdit::StateStartEditText.
//----- 05.07.05 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolRichEdit::ResetEditHandleList
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFnCiPfHiDgOiDjDiDgIiDiLiDiKiDfIiDgHiCpAiNmEjAnNjCoIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.06.03 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolRichEdit::ResetEditHandleList ()
{
	// _xZkqqHx_jFnCiPfHiDgOiDjDiDgIiDiLiDiKiDfIiDgHiCpAiDeOiDiKiDeBiBeC_xHqqkZx_
	ClearEditHandleList();
	ObjDynabaseVector::const_iterator iObj;
	for (iObj = g_pView->SelectObjVector().begin();
		 iObj != g_pView->SelectObjVector().end(); iObj++)
	{
		// _xZkqqHx_iLoJiMgAiCpAjDgPjIfOiBeC_xHqqkZx_ID=(_xZkqqHx_jFjEjFgJ_xHqqkZx_ID, 0, 0, 0)_xZkqqHx_iBeC_xHqqkZx_
		AddEditHandle(	(*iObj)->GetResizeFrame(),
						FCHandleId(long((*iObj)->GetObjID()), 0, 0, 0));
	}
} // FCToolRichEdit::ResetEditHandleList.

