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

fp_DirectionMarkerRun.h

Go to the documentation of this file.
00001 /* AbiWord
00002  * Copyright (C) 2003 Tomas Frydrych <tomas@frydrych.uklinux.net>
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017  * 02110-1301 USA.
00018  */
00019 
00020 #ifndef FP_DIRMARKERRUN_H
00021 #define FP_DIRMARKERRUN_H
00022 
00023 #include "fp_Run.h"
00024 
00025 #include "ut_types.h"
00026 #include "ut_misc.h"
00027 
00028 class ABI_EXPORT fp_DirectionMarkerRun : public fp_Run
00029 {
00030 public:
00031     fp_DirectionMarkerRun(fl_BlockLayout* pBL,
00032                           UT_uint32 iOffsetFirst,
00033                           UT_UCS4Char cMarker);
00034 
00035     virtual void            mapXYToPosition(UT_sint32 xPos,
00036                                             UT_sint32 yPos,
00037                                             PT_DocPosition& pos,
00038                                             bool& bBOL,
00039                                             bool& bEOL,
00040                                             bool & isTOC);
00041 
00042     virtual void            findPointCoords(UT_uint32 iOffset,
00043                                             UT_sint32& x,
00044                                             UT_sint32& y,
00045                                             UT_sint32& x2,
00046                                             UT_sint32& y2,
00047                                             UT_sint32& height,
00048                                             bool& bDirection);
00049 
00050     virtual bool            canBreakAfter(void) const;
00051     virtual bool            canBreakBefore(void) const;
00052     virtual UT_sint32       getDrawingWidth() const { return static_cast<UT_sint32>(m_iDrawWidth);}
00053 
00054     // for the purposes of linebreaking, direction markers are just whitespace
00055     virtual bool            doesContainNonBlankData(void) const { return false; }
00056 
00057 protected:
00058     virtual void            _lookupProperties(const PP_AttrProp * pSpanAP,
00059                                               const PP_AttrProp * pBlockAP,
00060                                               const PP_AttrProp * pSectionAP,
00061                                               GR_Graphics * pG);
00062 
00063     virtual void            _draw(dg_DrawArgs*);
00064     virtual void            _clearScreen(bool bFullLineHeightRect);
00065     virtual bool            _recalcWidth(void);
00066     virtual bool            _letPointPass(void) const;
00067     virtual bool            _deleteFollowingIfAtInsPoint() const;
00068 
00069 private:
00070     UT_uint32               m_iXoffText;
00071     UT_uint32               m_iYoffText;
00072     UT_uint32               m_iDrawWidth;
00073     UT_UCS4Char             m_iMarker;
00074 };
00075 
00076 #endif

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1