• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

fp_MathRun.h

Go to the documentation of this file.
00001 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
00002 
00003 /* AbiWord
00004  * Copyright (C) 1998,1999 AbiSource, Inc.
00005  * Copyright (c) 2004 Martin Sevior
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00020  * 02110-1301 USA.
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,pf_Frag_Object* 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     UT_sint32               getUID(void) const
00051     { return m_iMathUID;}
00052 protected:
00053     virtual void            _lookupProperties(const PP_AttrProp * pSpanAP,
00054                                               const PP_AttrProp * pBlockAP,
00055                                               const PP_AttrProp * pSectionAP,
00056                                               GR_Graphics * pG = NULL);
00057 
00058     void                    _lookupLocalProperties();
00059 
00060     virtual void            _draw(dg_DrawArgs*);
00061     virtual void            _clearScreen(bool bFullLineHeightRect);
00062     virtual bool            _letPointPass(void) const;
00063     void                    _drawResizeBox(UT_Rect box);
00064     UT_sint32               _getLayoutPropFromObject(const char * szProp);
00065     bool                    _updatePropValuesIfNeeded(void);
00066     virtual bool            _recalcWidth(void);
00067     UT_sint32               m_iPointHeight;
00068     const PP_AttrProp *     m_pSpanAP;
00069     UT_uint32               m_iGraphicTick;
00070     const gchar *        m_pszDataID;
00071     UT_UTF8String           m_sMathML;
00072     GR_EmbedManager *       m_pMathManager;
00073     UT_sint32               m_iMathUID;
00074     PT_AttrPropIndex        m_iIndexAP;
00075     FL_DocLayout *          m_pDocLayout;
00076     bool                    m_bNeedsSnapshot;
00077     pf_Frag_Object*         m_OH;
00078 };
00079 
00080 #endif /* FP_MATHRUN_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1