#ifndef __ObjGroup_h
#define __ObjGroup_h

/**********************************************************
 *                 _xZkqqHx_iBhJiDgOiDjDiDeLiDiKiBfLiLeMjGeAiBhK_xHqqkZx_
 *      a               _xZkqqHx_jEhKjHpB_xHqqkZx_(Array)
 *      b               _xZkqqHx_jIfPjHjNiMfO_xHqqkZx_(Bool)
 *      by              unsigned char(BYte)
 *      c               char(Char)
 *      cb              _xZkqqHx_jFlGiOjKjAjE_xHqqkZx_(Count of Byte)
 *      cr              _xZkqqHx_jAeG_xHqqkZx_(Color Reference value)
 *      cx,cy   short_xZkqqHx_iMfO_xHqqkZx_[_xZkqqHx_iNmAjFfH_xHqqkZx_(x,y)_xZkqqHx_iCmMiDeKiDeFiDjDiDfO_xHqqkZx_](Count of X,Y)
 *      dw              unsigned long_xZkqqHx_iMfO_xHqqkZx_(Double Word)
 *      fn              _xZkqqHx_iKnGjAjE_xHqqkZx_(FuNction)
 *      h               _xZkqqHx_iDgOiDjDiDgIiDiL_xHqqkZx_(Handle)
 *      i               int(Integer)
 *      l               long(Long)
 *      m               _xZkqqHx_iDeOiDiJiDfIiDiBiDjDiDgP_xHqqkZx_(data Member of a class)
 *      n               short_xZkqqHx_iIlNiCkCiCmN_xHqqkZx_int
 *      p               _xZkqqHx_iDhMiDeDiDjDiDfOiMfO_xHqqkZx_(Pointer)
 *      s               _xZkqqHx_jFlGiOjKjHpB_xHqqkZx_(String)
 *      sz              0_xZkqqHx_iCmFiPeJiCoNiCoJjFlGiOjKjHpB_xHqqkZx_(String terminated with Zero)
 *      tm              _xZkqqHx_iDgFiDeMiDfIiDgHjAkBjGeA_xHqqkZx_(Text Metric)
 *      w               unsigned short(Word)
 *      x,y             short_xZkqqHx_iMfOiNmAjFfHjCgM_xHqqkZx_
 ********************************************************/

#include "LinkManager.h"	// For FCLinkRec.
#include "ObjDynabase.h"		// Superclass.

//;----- <EXPORT TO SDK> -----;

#ifdef SUPER_CLASS
#undef SUPER_CLASS
#endif
#define SUPER_CLASS FCObjDynabase

//;------ </EXPORT TO SDK> -----;

class FCUndoArchive;
class FCPictArrow;	// For friend.
struct FCGpLinkRec;
class FCHiCommandTable;
class FCSearchParser;

/*************************************************************************
 * <_xZkqqHx_iDeOiDiJiDfI_xHqqkZx_>	FCObjGroup
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDePiDiLiBfLiDhGjFjEjFgJiBeCjFjEjFgJiPfHiNiHiCpAiKmHjHjNiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.04.30 Fukushiro M. _xZkqqHx_iDfCiDiBiDjDiDgHiNoMjAkM_xHqqkZx_
 *************************************************************************/
class FCObjGroup : public SUPER_CLASS
{
protected:
typedef SUPER_CLASS BASE_CLASS;

public:
	//----- _xZkqqHx_jBfDiCmEiCmM_xHqqkZx_Subclass_xZkqqHx_iCkKiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkC_xHqqkZx_ -----
	FCObjGroup ();
	virtual BOOL	IsKindOf (FTObjectType nType) const;

	//----- _xZkqqHx_iOmAjBmMiJlLiJmCjEfMiCmIiDeOiDiJiDfIiCkKiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkC_xHqqkZx_ -----
	virtual FTObjectType	Type () const;

	//----- Subclass_xZkqqHx_iCmMiCkCiClIiCoKiCkJiCkKiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkC_xHqqkZx_ -----
	virtual void	OnDraw (CDC* pDC, BOOL bIsMono);
	virtual DBLRect	GetOuterFrame () const;
	virtual DBLRect	GetResizeFrame () const;

	//----- _xZkqqHx_jBkOjAkLiCpAiOjNiCmCjBfDiCmEiCmM_xHqqkZx_Subclass_xZkqqHx_iCkKiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkC_xHqqkZx_ -----
	virtual BOOL	IsEqual (const FCObjDynabase* objp) const;
// 06.06.23 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//	virtual void	OutStream (FCUndoArchive& ar);
	virtual void	OutStream (FCUndoArchive& ar, BOOL bIsOutBezier);
	virtual void	InStream (FCUndoArchive& ar);
	virtual void	CreatePropertyPage (CPropertyPageVector& vPropPage,
										const ObjDynabaseVector& vSelect);

	//----- _xZkqqHx_iKePiMgAiCpAiOjNiCmCjBfDiCmEiCmM_xHqqkZx_Subclass_xZkqqHx_iCkKiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkC_xHqqkZx_ -----
	virtual void	NewObjPolygonForResize (DBLPointVector& vmmptPoly,
											mmetol mmElemLen,
											const DBLRect mmrtaClip[],
											int iClipSize) const;

	//----- _xZkqqHx_iDhJiBfLiDfIiDgHiOjOiCmJjFmPiKlHiClDiCoKiCoJjBkOjAkLiCpAiOjNiCmC_xHqqkZx_Subclass_xZkqqHx_iCkKiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkC_xHqqkZx_ -----
	virtual void	ConvertEnvProp (FCConvEnv* pConv);

//----- 06.03.21 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	virtual mmetol		GetMolipWeight (long lMolipId) const;
//----- 06.03.21 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

	//----- _xZkqqHx_jFeLjHhGiCmJiJjOiClGiCmEiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClHiCoKiCmOjHmHiCkC_xHqqkZx_ -----
	virtual BOOL	CanRotate () const;
// 06.03.01 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	virtual BOOL	IsIntersect (const DBLPoint& mmpt) const;

//----- 06.03.01 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	virtual FCObjDynabase*	GetIntersect (	BOOL& bIsHitEditText,
											long& lHitCharIndex,
											BOOL& bIsHitCharFront,
// 06.04.09 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//											BOOL bIsCheckText,
											const DBLPoint& mmptMargin,
											const DBLPoint& mmpt,
											BOOL bAsFillPaint) const;
//----- 06.03.01 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

// 06.02.28 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	virtual BOOL	IsTextIntersect (const DBLPoint& mmpt) const;
//----- 06.02.28 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
//----- 06.03.01 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	virtual FCObjDynabase*	GetIntersectText (	long& lHitCharIndex,
//												BOOL& bIsHitCharFront,
//												const DBLPoint& mmptMargin,
//												const DBLPoint& mmpt) const;
//----- 06.03.01 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
//----- 06.02.28 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
	virtual void	GetMembers (ObjDynabaseVector& vObj) const;
	virtual FCObjDynabase** GetMemberArray () const;
	virtual long	GetMemberSize () const;

// 05.06.23 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	virtual void	CalcResizeFrame ();
// 05.06.23 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//	virtual void	CalcResizeFrameSelf ();
	virtual	~FCObjGroup ();

	//----- _xZkqqHx_jCmKiPoNiCmNiDeDiDjDiDhGiDiKiDiBiDjDiDgHiCmMjFeLjHhGiCmNjGlDiCkC_xHqqkZx_ -----
	virtual void	RegisterObjID ();
	virtual void	RegisterObjForceID ();
	virtual void	UnregisterObjID ();
// 02.09.15 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ (Molip_xZkqqHx_iCpA_xHqqkZx_OLE_xZkqqHx_iCmGiClFiCmEiDhJiBfLiDfIiDgHiClFiClNjAoGiCmMiDeBiDhGiDiKiCkJiCoHiBeB_xHqqkZx_Molip_xZkqqHx_iNmEjFnCiPfHiCkKiCmFiCkLiCmIiCkNiCmIiCmBiCmEiClFiCnMiCkEiBeC_xHqqkZx_)
//	virtual void	Terminate ();

// 06.11.21 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
	virtual void	PasteOverAs (const FCObjFigure& objFig, DWORD dwPasteAttr);

	//----- _xZkqqHx_iDeBiDgHiDiKiDhCiDiFiBfLiDgHiCmMiOoGjDlOiKnGjAjE_xHqqkZx_ -----
//----- 05.05.03 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
//	virtual WORD		GetMemberResizeHorzByText (const FCObjDynabase* pObj) const;
//	virtual WORD		GetMemberResizeVertByText (const FCObjDynabase* pObj) const;
//----- 05.05.03 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
	virtual WORD		GetMemberFixResizeByText (const FCObjDynabase* pObj) const;
//----- 05.05.03 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----
	virtual BOOL		GetIsMemberShortenByText (const FCObjDynabase* pObj) const;

	virtual void		AdjustObjectSize (	FCObjDynabase* pTextObj,
											double dRatioHorz,
											double dRatioVert,
											const DBLPoint& mmptFixPoint);
public:
	//----- ObjGroup_xZkqqHx_iCmM_xHqqkZx_Subclass_xZkqqHx_iCmFjFeLjHhGiCmJiJjOiClGiCmEiDeDiDjDiDhGiDiKiDiBiDjDiDgH_xHqqkZx_ -----
	virtual void		SetGroup (const ObjDynabaseVector& vObj);

	virtual void		SetLink (const DWORDVector& vLinkId);
	virtual void		GetLink (FCLinkRecVector& vLinkRec) const;

	virtual void		ClearGroup ();
	virtual FCObjDynabase*	GetEditableTextObj (const DBLPoint& mmpt) const;
// 06.12.07 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
	virtual FCObjDynabase*	GetFrontEditableTextObj () const;
	virtual void		GetCanBeTextObject (ObjDynabaseVector& vObj) const;
	virtual void		GetObjToIndexTable (map<const FCObjDynabase*, long>& mpObjToIndex) const;

//----- 05.06.24 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
////----- 05.06.22 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
//	virtual FCObjDynabase*	FindNextMemberText (FCSearchParser& sp, FCObjDynabase* pCurrentObj = NULL);
//	virtual FCObjDynabase*	FindPrevMemberText (FCSearchParser& sp, FCObjDynabase* pCurrentObj = NULL);
////----- 05.06.22 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
//----- 05.06.24 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

friend class FCPictArrow;	// For Resize and Rotate.
friend class FCHiCommandTable;
protected:
	//----- _xZkqqHx_jBkOjAkLiCpAiOjNiCmCjBfDiCmEiCmM_xHqqkZx_Subclass_xZkqqHx_iCkKiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkC_xHqqkZx_ -----
	virtual void	Copy (FCObjDynabase* pObj) const;
	virtual void	CopySelf (FCObjDynabase* pObj) const;

	//----- _xZkqqHx_jFeLjHhGiCmJiJjOiClGiCmEiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClHiCoKiCmOjHmHiCkC_xHqqkZx_ -----
	virtual void	Move (mmetol mmDX, mmetol mmDY);
	virtual void	Resize (BOOL bXPosi, BOOL bYPosi, const DBLRect& mmrtNew, const DBLRect& mmrtOld);
// 05.03.02 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//	virtual void	Rotate (double dR, mmetol mmCX, mmetol mmCY);
	virtual void	Rotate (double dR, const DBLPoint& mmptCenter);
//----- 05.06.27 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	virtual void	OutSizeStream (BYTEVector& vBuff, BOOL bXPosi, BOOL bYPosi) const;
	virtual void	InSizeStream (const BYTE*& pBuff);
//----- 05.06.27 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

// 05.06.23 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
	virtual void	OnChildFrameResized ();

	virtual void	InsertGroup (const longVector& vInsertIndex, const ObjDynabaseVector& vInsertMember);
	virtual void	AddGroup (longVector& vAddIndex, const ObjDynabaseVector& vAddMember);
	virtual void	EraseGroup (const longSet& stMemberIndex);
//----- 05.02.16 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	virtual long		AddGroup (FCObjDynabase* pObj);
//	virtual FCObjDynabase*	EraseGroup (long lIndex);
//----- 05.02.16 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

protected:
	DBLRect			m_mmrtResize;	// _xZkqqHx_iDiKiDfEiDeDiDfJiDhEiDiMiBfLiDiAiBeC_xHqqkZx_
	long			m_lObjListSz;	// _xZkqqHx_iDiBiDjDiDgPiBfLjFjEjFgJiDfEiDeDiDfJiBeC_xHqqkZx_
	FCObjDynabase**	m_pObjList;		// _xZkqqHx_iDiBiDjDiDgPiBfLjFjEjFgJiBeC_xHqqkZx_
	long			m_lLinkListSz;	// _xZkqqHx_iDiKiDjDiDeOiDfEiDeDiDfJiBeC_xHqqkZx_
	FCGpLinkRec*	m_pLinkList;	// _xZkqqHx_iDiBiDjDiDgPiBfLjFjEjFgJiKnEiCmMiDiKiDjDiDeOiBeC_xHqqkZx_
}; // class FCObjGroup.

#endif//__ObjGroup_h
