#ifndef __3RichText_h
#define __3RichText_h

//----- CMC3WndRichEdit::m_byVertAlign_xZkqqHx_iBeB_xHqqkZx_MC3RichText::m_dwVertAlign_xZkqqHx_iLkEjCmK_xHqqkZx_ -----
#define FDRC_AL_TOP			0x01
#define FDRC_AL_V_CENTER	0x02
#define FDRC_AL_BOTTOM		0x03

//----- FCEditLine::m_byLineType_xZkqqHx_iBeB_xHqqkZx_MC3StatLine::m_byLineType_xZkqqHx_iLkEjCmK_xHqqkZx_ -----
#define FDRC_LT_HEAD		0x00
#define FDRC_LT_CONTINUE	0x01

//----- FCTextLineInfo::m_byAlignment_xZkqqHx_iBeB_xHqqkZx_
//		FCEditLine::m_byAlignment_xZkqqHx_iBeB_xHqqkZx_FCStatLine::m_byAlignment_xZkqqHx_iLkEjCmK_xHqqkZx_ -----
#define FDRC_AL_NONE		0x00	// _xZkqqHx_jGlDiMpIiBeC_xHqqkZx_
#define FDRC_AL_LEFT		0x01	// _xZkqqHx_iNlGjEhKjChFiBeC_xHqqkZx_
#define FDRC_AL_CENTER		0x02	// _xZkqqHx_jCiGiJjLjEhKjChFiBeC_xHqqkZx_
#define FDRC_AL_RIGHT		0x03	// _xZkqqHx_iJeFjEhKjChFiBeC_xHqqkZx_
#define FDRC_AL_LEFTRIGHT	0x04	// _xZkqqHx_jHlMjCfLjBlFiCkGiBeC_xHqqkZx_

/*************************************************************************
 * _xZkqqHx_iDeOiDiJiDfI_xHqqkZx_>	MC3StatChar
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	MC3RichText_xZkqqHx_jCiGiCmMiCfAjFlGiOjKiCpAjFfMiClHiDeOiDiJiDfIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.17 Fukushiro M. _xZkqqHx_iDfCiDiBiDjDiDgHiNoMjAkM_xHqqkZx_
 *************************************************************************/
class MC3StatChar
{
public:
	MC3StatChar ();
	void OutStream (MCARCHIVE& ar) const;
	void InStream (MCARCHIVE& ar);

public:
	WORD	m_wChar;	// _xZkqqHx_jFlGiOjKiDfCiBfLiDgI_xHqqkZx_.
	union
	{
		DWORD			m_dwForStream;	// _xZkqqHx_jDpMiPgPjHmNjHhAiBeC_xHqqkZx_
		fmmetol			m_mmfWidth;		// _xZkqqHx_jFlGiOjKiCmMjFjN_xHqqkZx_.
		struct {
			SFontID		m_foidFont;		// _xZkqqHx_jFlGiOjKiCmMiDhEiDeIiDjDiDgH_xHqqkZx_ID.
			WORD		m_wOffset;		// Baseline_xZkqqHx_iCkJiCoHiCmM_xHqqkZx_Offset_xZkqqHx_iBeC_xHqqkZx_0,MAXSHORT,MINSHORT_xZkqqHx_iCmM_xHqqkZx_3_xZkqqHx_jCgMiBeC_xHqqkZx_
		};
		fmmetol			m_mmfPreSpace;	// _xZkqqHx_jFlGiOjKiCmMjBePiCmMjHfNjEjC_xHqqkZx_.
		COLORREF		m_crColor;		// _xZkqqHx_jFlGiOjKiCmMjAeG_xHqqkZx_.
		short			m_nAfterSpace;	// _xZkqqHx_jFlGiOjKiCmMiMoDiCoLiCmMiLpDjEjCiBeC_xHqqkZx_TWIPS_xZkqqHx_iBeC_xHqqkZx_
		struct {
			BYTE		m_byUnderline;	// _xZkqqHx_iJlKjApMiBeC_xHqqkZx_
			BYTE		m_byStrikeOut;	// _xZkqqHx_iOoGiPmBiClFjApMiBeC_xHqqkZx_
			BYTE		m_byCrossStat;	// _xZkqqHx_jFlGiOjKiIoMiCoKiPpDjBnEiBeC_xHqqkZx_
			BYTE		m_byDummy;
		};
	};
	fmmetol	m_mmfAbcA;	// ABC_xZkqqHx_iNfMjBkCjBmMiCmM_xHqqkZx_abcA_xZkqqHx_iCmMjCgMiBeC_xHqqkZx_
	fmmetol	m_mmfAbcC;	// ABC_xZkqqHx_iNfMjBkCjBmMiCmM_xHqqkZx_abcC_xZkqqHx_iCmMjCgMiBeC_xHqqkZx_
}; // class MC3StatChar.

typedef vector<MC3StatChar> MC3StatCharVector;

/*************************************************************************
 * <_xZkqqHx_iDeOiDiJiDfI_xHqqkZx_>	MC3StatLine
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	MC3RichText_xZkqqHx_jCiGiCmMiCfAiNhDiCpAjFfMiClHiDeOiDiJiDfIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.17 Fukushiro M. _xZkqqHx_iDfCiDiBiDjDiDgHiNoMjAkM_xHqqkZx_
 *************************************************************************/
class MC3StatLine
{
public:
	MC3StatLine ();
	void	OutStream (MCARCHIVE& ar) const;
	void	InStream (MCARCHIVE& ar);

public:
	//----- _xZkqqHx_jAoGjDkKiNhDiBeBiMhAjBlBiNhDiCmFjDkPiClGjCgMiCpAiOjNiCmCiDiBiDjDiDgPjFmPjAjE_xHqqkZx_ -----
	mmetol			m_mmStartIndent;	// _xZkqqHx_jAoGjDkKiNhDiCmMiNlGiDeDiDjDiDgGiDjDiDgH_xHqqkZx_.
	mmetol			m_mmRightIndent;	// _xZkqqHx_jAoGjDkKiBeFiMhAjBlBiNhDiCmMiJeFiDeDiDjDiDgGiDjDiDgH_xHqqkZx_.
	mmetol			m_mmOffset;			// _xZkqqHx_iMhAjBlBiNhDiCmMiDeDiDjDiDgGiDjDiDgHiBgJjAoGjDkKiNhDiCmJ_xHqqkZx_
										// _xZkqqHx_jBmOiClHiCoJiDeJiDhEiDfKiDgCiDgHjCgMiBgK_xHqqkZx_.
	mmetolVector	m_mmvTabs;			// _xZkqqHx_iDfOiDhFiCmMiImKjChFiCmMjHpB_xHqqkZx_.
	BYTE			m_byAlignment;		// _xZkqqHx_iDeBiDiJiDeDiDjDiDiBiDjDiDgH_xHqqkZx_.
	//----- _xZkqqHx_jAoGjDkKiNhDiBeBiMhAjBlBiNhDiCmFiInJiCmIiCoJjCgMiCpAiOjNiCmCiDiBiDjDiDgPjFmPjAjE_xHqqkZx_ -----
	BYTE			m_byLineType;		// _xZkqqHx_iNhDiCmMiDfOiDeDiDhG_xHqqkZx_(_xZkqqHx_jAoGjDkK_xHqqkZx_/_xZkqqHx_iMhAjBlB_xHqqkZx_)
	//----- _xZkqqHx_iNhDiKnEiKhFiCpAiOhHjCoIiClHiCoJiDiBiDjDiDgPjFmPjAjE_xHqqkZx_ -----
	short			m_nTwipLineAfter;	// _xZkqqHx_iNhDiKnEiBgJiNhDiCmMiJlKiBgKiCmM_xHqqkZx_TWIPS_xZkqqHx_jAjEiBeC_xHqqkZx_
	//----- _xZkqqHx_iNhDiCmMjFlGiOjKiPoOjFpBiCpAiOpLiCnPiCoJiDiBiDjDiDgPjFmPjAjE_xHqqkZx_ -----
	MC3StatCharVector	m_vStatChar;	// _xZkqqHx_jFlGiOjKjHpBiBeC_xHqqkZx_
	//----- _xZkqqHx_iNhDiCmMiNmEiMhGiOfKiCmFjCgMiCkKiOfKiPgPiJmCjEfMiCmIiDiBiDjDiDgPjFmPjAjE_xHqqkZx_ -----
	mmetol			m_mmY;				// _xZkqqHx_iNhDiCmMiPoDiCmMiNmAjFfH_xHqqkZx_.
	fmmetol			m_mmfTMHeight;		// _xZkqqHx_jFlGiOjKiCmMiNiCiClD_xHqqkZx_.
	fmmetol			m_mmfTMAscent;		// _xZkqqHx_iDhIiBfLiDfIiDiJiDeDiDjDiCkJiCoHiNhDiCmMiPoDiCnMiCmFiCmMiNiCiClD_xHqqkZx_.
	fmmetol			m_mmfTMExternalLeading;	// _xZkqqHx_jFlGiOjKiCmMiJlKiCmMiMiEiKnE_xHqqkZx_.
}; // class MC3StatLine.

/*************************************************************************
 * <_xZkqqHx_iDeOiDiJiDfI_xHqqkZx_>	class MC3StatLineVector
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	MC3RichText_xZkqqHx_iCmMiNhDiCpAjFfMiClHiDeOiDiJiDfIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.17 Fukushiro M. _xZkqqHx_iDfCiDiBiDjDiDgHiNoMjAkM_xHqqkZx_
 *************************************************************************/
class MC3StatLineVector : public vector<MC3StatLine>
{
public:
	void	OutStream (MCARCHIVE& ar) const;
	void	InStream (MCARCHIVE& ar);
}; // class MC3StatLineVector.

class MC3RichText
{
public:
	//----- _xZkqqHx_jBfDiCmEiCmM_xHqqkZx_Subclass_xZkqqHx_iCkKiDeDiDjDiDhGiDiKiDiBiDjDiDgHiClFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkC_xHqqkZx_ -----
	MC3RichText ();
	virtual void	OutStream (MCARCHIVE& ar);
	virtual void	InStream (MCARCHIVE& ar);
	virtual	~MC3RichText ();

protected:	// _xZkqqHx_iDiBiDjDiDgPjFmPjAjE_xHqqkZx_.
	mmetol	m_mmMarginL;	// _xZkqqHx_iDgFiDeMiDfIiDgHjHmMiIoGiCmMiNlGiDhNiBfLiDfHiDjD_xHqqkZx_.
	mmetol	m_mmMarginT;	// _xZkqqHx_iDgFiDeMiDfIiDgHjHmMiIoGiCmMiPoDiDhNiBfLiDfHiDjD_xHqqkZx_.
	mmetol	m_mmMarginR;	// _xZkqqHx_iDgFiDeMiDfIiDgHjHmMiIoGiCmMiJeFiDhNiBfLiDfHiDjD_xHqqkZx_.
	mmetol	m_mmMarginB;	// _xZkqqHx_iDgFiDeMiDfIiDgHjHmMiIoGiCmMiJlKiDhNiBfLiDfHiDjD_xHqqkZx_.
	DBLRect	m_mmrtText;		// _xZkqqHx_iDgFiDeMiDfIiDgHiCmMiDhEiDiMiBfLiDiAiBeC_xHqqkZx_
	double	m_dAngle;		// _xZkqqHx_iDgFiDeMiDfIiDgHiCmMiKhAjDhIiBeC_xHqqkZx_
	DWORD	m_dwVertAlign;	// _xZkqqHx_jAiCjClMjFpLiMpMiCmMiDeBiDiJiDeDiDjDiDiBiDjDiDgHiBeC_xHqqkZx_
	MC3StatLineVector*	m_vpLine;	// _xZkqqHx_jFlGiOjKjHpBiPoOjFpBiBeC_xHqqkZx_
}; // class MC3RichText.

#endif//__3RichText_h
