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

fp_EmbedRun.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_EMBEDRUN_H
00024 #define FP_EMBEDRUN_H
00025 
00026 #include "fp_Run.h"
00027 #include "ev_EditBits.h"
00028 
00029 class fl_BlockLayout;
00030 class GR_EmbedManager;
00031 class FL_DocLayout;
00032 
00033 class ABI_EXPORT fp_EmbedRun : public fp_Run
00034 {
00035 public:
00036     fp_EmbedRun(fl_BlockLayout* pBL, PT_BlockOffset iOffsetFirst,PT_AttrPropIndex indexAP,pf_Frag_Object* oh);
00037     virtual ~ fp_EmbedRun(void);
00038 
00039     virtual void            mapXYToPosition(UT_sint32 xPos, UT_sint32 yPos, PT_DocPosition& pos, bool& bBOL, bool& bEOL, bool &isTOC);
00040     virtual void            findPointCoords(UT_uint32 iOffset, UT_sint32& x, UT_sint32& y, UT_sint32& x2, UT_sint32& y2, UT_sint32& height, bool& bDirection);
00041     virtual bool            canBreakAfter(void) const;
00042     virtual bool            canBreakBefore(void) const;
00043     virtual bool            isSuperscript(void) const ;
00044     virtual bool            isSubscript(void)  const;
00045     virtual bool            hasLayoutProperties(void) const;
00046 
00047     virtual void            updateVerticalMetric();
00048 
00049     GR_EmbedManager *       getEmbedManager(void) const;
00050     bool                    isEdittable(void);
00051     bool                    isResizeable(void);
00052     const char *            getDataID(void) const;
00053     UT_sint32               getUID(void) const
00054     { return m_iEmbedUID;}
00055     void                    update();
00056     EV_EditMouseContext     getContextualMenu(void) const;
00057 
00058 protected:
00059     virtual void            _lookupProperties(const PP_AttrProp * pSpanAP,
00060                                               const PP_AttrProp * pBlockAP,
00061                                               const PP_AttrProp * pSectionAP,
00062                                               GR_Graphics * pG = NULL);
00063 
00064     void                    _lookupLocalProperties();
00065 
00066     virtual void            _draw(dg_DrawArgs*);
00067     virtual void            _clearScreen(bool bFullLineHeightRect);
00068     virtual bool            _letPointPass(void) const;
00069     void                    _drawResizeBox(UT_Rect box);
00070     UT_sint32               _getLayoutPropFromObject(const char * szProp) const;
00071     bool                    _updatePropValuesIfNeeded(void);
00072     virtual bool            _recalcWidth(void);
00073 
00074     UT_sint32               m_iPointHeight;
00075     const PP_AttrProp *     m_pSpanAP;
00076     UT_uint32               m_iGraphicTick;
00077     const gchar *        m_pszDataID;
00078     UT_UTF8String           m_sEmbedML;
00079     GR_EmbedManager *       m_pEmbedManager;
00080     UT_sint32               m_iEmbedUID;
00081     PT_AttrPropIndex        m_iIndexAP;
00082     FL_DocLayout *          m_pDocLayout;
00083     bool                    m_bNeedsSnapshot;
00084     pf_Frag_Object*         m_OH;
00085 };
00086 
00087 #endif /* FP_EMBEDRUN_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1