00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef FP_MATHRUN_H
00024 #define FP_MATHRUN_H
00025
00026 #include "fp_Run.h"
00027
00028 class fl_BlockLayout;
00029 class GR_EmbedManager;
00030 class FL_DocLayout;
00031
00032 class ABI_EXPORT fp_MathRun : public fp_Run
00033 {
00034 public:
00035 fp_MathRun(fl_BlockLayout* pBL, PT_BlockOffset iOffsetFirst,PT_AttrPropIndex indexAP,PL_ObjectHandle oh);
00036 virtual ~ fp_MathRun(void);
00037
00038 virtual void mapXYToPosition(UT_sint32 xPos, UT_sint32 yPos, PT_DocPosition& pos, bool& bBOL, bool& bEOL, bool &isTOC);
00039 virtual void findPointCoords(UT_uint32 iOffset, UT_sint32& x, UT_sint32& y, UT_sint32& x2, UT_sint32& y2, UT_sint32& height, bool& bDirection);
00040 virtual bool canBreakAfter(void) const;
00041 virtual bool canBreakBefore(void) const;
00042 virtual bool isSuperscript(void) const ;
00043 virtual bool isSubscript(void) const;
00044 virtual bool hasLayoutProperties(void) const;
00045 GR_EmbedManager * getMathManager(void);
00046
00047 virtual void updateVerticalMetric();
00048
00049 const char * getDataID(void) const;
00050 protected:
00051 virtual void _lookupProperties(const PP_AttrProp * pSpanAP,
00052 const PP_AttrProp * pBlockAP,
00053 const PP_AttrProp * pSectionAP,
00054 GR_Graphics * pG = NULL);
00055
00056 void _lookupLocalProperties();
00057
00058 virtual void _draw(dg_DrawArgs*);
00059 virtual void _clearScreen(bool bFullLineHeightRect);
00060 virtual bool _letPointPass(void) const;
00061 void _drawResizeBox(UT_Rect box);
00062 UT_sint32 _getLayoutPropFromObject(const char * szProp);
00063 bool _updatePropValuesIfNeeded(void);
00064 virtual bool _recalcWidth(void);
00065 UT_sint32 m_iPointHeight;
00066 const PP_AttrProp * m_pSpanAP;
00067 UT_uint32 m_iGraphicTick;
00068 const gchar * m_pszDataID;
00069 UT_UTF8String m_sMathML;
00070 GR_EmbedManager * m_pMathManager;
00071 UT_sint32 m_iMathUID;
00072 PT_AttrPropIndex m_iIndexAP;
00073 FL_DocLayout * m_pDocLayout;
00074 bool m_bNeedsSnapshot;
00075 PL_ObjectHandle m_OH;
00076 };
00077
00078 #endif