fp_BookmarkRun Class Reference

#include <fp_Run.h>

Inheritance diagram for fp_BookmarkRun:

fp_Run fp_ContainerObject

List of all members.

Public Member Functions

 fp_BookmarkRun (fl_BlockLayout *pBL, UT_uint32 iOffsetFirst, UT_uint32 iLen)
bool isStartOfBookmark () const
const gchar * getName () const
bool isComrade (fp_BookmarkRun *pBR) const
virtual bool canBreakAfter (void) const
virtual bool canBreakBefore (void) const
virtual void mapXYToPosition (UT_sint32 x, UT_sint32 y, PT_DocPosition &pos, bool &bBOL, bool &bEOL, bool &isTOC)
virtual void findPointCoords (UT_uint32 iOffset, UT_sint32 &x, UT_sint32 &y, UT_sint32 &x2, UT_sint32 &y2, UT_sint32 &height, bool &bDirection)
virtual bool hasLayoutProperties (void) const
virtual bool doesContainNonBlankData (void) const
UT_uint32 getBookmarkedDocPosition (bool bAfter) const

Private Member Functions

virtual void _lookupProperties (const PP_AttrProp *pSpanAP, const PP_AttrProp *pBlockAP, const PP_AttrProp *pSectionAP, GR_Graphics *pG=NULL)
virtual void _clearScreen (bool)
virtual void _draw (dg_DrawArgs *)
virtual bool _letPointPass (void) const
virtual bool _canContainPoint (void) const
virtual bool _deleteFollowingIfAtInsPoint () const

Private Attributes

bool m_bIsStart
gchar m_pName [BOOKMARK_NAME_SIZE+1]
po_Bookmarkm_pBookmark


Constructor & Destructor Documentation

fp_BookmarkRun::fp_BookmarkRun ( fl_BlockLayout pBL,
UT_uint32  iOffsetFirst,
UT_uint32  iLen 
)


Member Function Documentation

bool fp_BookmarkRun::isStartOfBookmark (  )  const [inline]

const gchar* fp_BookmarkRun::getName ( void   )  const [inline]

bool fp_BookmarkRun::isComrade ( fp_BookmarkRun pBR  )  const

References m_pName, and UT_ASSERT.

bool fp_BookmarkRun::canBreakAfter ( void   )  const [virtual]

Implements fp_Run.

bool fp_BookmarkRun::canBreakBefore ( void   )  const [virtual]

Implements fp_Run.

void fp_BookmarkRun::mapXYToPosition ( UT_sint32  x,
UT_sint32  y,
PT_DocPosition pos,
bool &  bBOL,
bool &  bEOL,
bool &  isTOC 
) [virtual]

void fp_BookmarkRun::findPointCoords ( UT_uint32  iOffset,
UT_sint32 x,
UT_sint32 y,
UT_sint32 x2,
UT_sint32 y2,
UT_sint32 height,
bool &  bDirection 
) [virtual]

virtual bool fp_BookmarkRun::hasLayoutProperties ( void   )  const [inline, virtual]

Reimplemented from fp_Run.

virtual bool fp_BookmarkRun::doesContainNonBlankData ( void   )  const [inline, virtual]

Reimplemented from fp_Run.

UT_uint32 fp_BookmarkRun::getBookmarkedDocPosition ( bool  bAfter  )  const

When working with bookmarks, the run block offset does not always adequately represent the location of the bookmark. For example, if the user bookmarks the same place in the doc with several bookmarks, the run offsets for each associated run will be different, but most of the time we are interested in the offset to the left or right of all stacked up bookmarks. Similarly, a bookmark that is immediately after a start of block needs to be treated in certain situations as if the block strux was also sellected. This function implements the necessary logic.

In general, when we jump to bookmarks, we go to the range in between the two bookmark object. However, for purposes of TOCs, we are interested in the range that is just outside the two objects.

bAfter: indicates if we want offset to the right (true) or left (false) of the bookmark

Returns:
: the return value is document offset of the bookmarked position

References FPRUN_BOOKMARK, FPRUN_FMTMARK, fp_Run::getBlock(), fp_Run::getBlockOffset(), fp_Run::getLength(), fp_Run::getNextRun(), fl_BlockLayout::getPosition(), fp_Run::getPrevRun(), fp_Run::getType(), and UT_ASSERT_HARMLESS.

Referenced by fl_TOCLayout::addBlock(), FL_DocLayout::fillTOC(), and FV_View::gotoTarget().

void fp_BookmarkRun::_lookupProperties ( const PP_AttrProp pSpanAP,
const PP_AttrProp pBlockAP,
const PP_AttrProp pSectionAP,
GR_Graphics pG = NULL 
) [private, virtual]

Implements fp_Run.

void fp_BookmarkRun::_clearScreen ( bool   )  [private, virtual]

void fp_BookmarkRun::_draw ( dg_DrawArgs pDA  )  [private, virtual]

bool fp_BookmarkRun::_letPointPass ( void   )  const [private, virtual]

Reimplemented from fp_Run.

bool fp_BookmarkRun::_canContainPoint ( void   )  const [private, virtual]

Reimplemented from fp_Run.

bool fp_BookmarkRun::_deleteFollowingIfAtInsPoint (  )  const [private, virtual]

Reimplemented from fp_Run.


Member Data Documentation

Referenced by _clearScreen(), _draw(), and fp_BookmarkRun().

gchar fp_BookmarkRun::m_pName[BOOKMARK_NAME_SIZE+1] [private]

Referenced by fp_BookmarkRun(), and isComrade().

Referenced by fp_BookmarkRun().


The documentation for this class was generated from the following files:

Generated on Mon Sep 8 00:06:54 2008 for AbiWord by  doxygen 1.5.5