Public Member Functions | Public Attributes | Private Member Functions

GR_RenderInfo Class Reference

encapsulates output of GR_Graphics::shape() which is passed as input to GR_Graphics::renderChars(). More...

#include <gr_RenderInfo.h>

Inheritance diagram for GR_RenderInfo:
GR_PangoRenderInfo GR_Win32USPRenderInfo GR_XPRenderInfo

List of all members.

Public Member Functions

 GR_RenderInfo (GR_ScriptType type)
virtual ~GR_RenderInfo ()
virtual GRRI_Type getType () const =0
virtual bool append (GR_RenderInfo &ri, bool bReverse=false)=0
virtual bool split (GR_RenderInfo *&pri, bool bReverse=false)=0
virtual bool cut (UT_uint32 offset, UT_uint32 len, bool bReverse=false)=0
virtual bool canAppend (GR_RenderInfo &ri) const
virtual bool isJustified () const =0

Public Attributes

UT_sint32 m_iOffset
UT_sint32 m_iLength
GRShapingResult m_eShapingResult
GRShapingResult m_eState
GR_ScriptType m_eScriptType
UT_TextIteratorm_pText
UT_BidiCharType m_iVisDir
UT_sint32 m_xoff
UT_sint32 m_yoff
const GR_Graphicsm_pGraphics
const GR_Fontm_pFont
UT_sint32 m_iJustificationPoints
UT_sint32 m_iJustificationAmount
bool m_bLastOnLine
const GR_Itemm_pItem
bool m_bInvalidateFontCache

Private Member Functions

 GR_RenderInfo ()
 never to be implemented (constructor always has to set m_eScriptType to actual value)

Detailed Description

encapsulates output of GR_Graphics::shape() which is passed as input to GR_Graphics::renderChars().

This is abstract class and suitable functionality is to be provided by platform code.

Notes on append(), split() and cut()

These functions allow our fp_TextRun to merge with next or to split into two without having to know about various platform dependent chaches that speed up shaping and drawing; append() joins all such chaches, while split() splits them into two. Before spliting, split() must allocate appropriate GR_FERenderInfo into pri.

cut() attempts to remove a section of length iLen starting at offset without re-shaping the whole buffer; if it succeeds it returns true; if it fails and the chaches need to be re-calculated it return false (it should not carry out the reshaping per se)

m_iOffset and m_iLength contain offset and length pertinent to the current operation and their state is undefined: the user should always set them if the function to which GR_RenderInfo is passed is going to use them


Constructor & Destructor Documentation

GR_RenderInfo::GR_RenderInfo ( GR_ScriptType  type  )  [inline]
virtual GR_RenderInfo::~GR_RenderInfo (  )  [inline, virtual]
GR_RenderInfo::GR_RenderInfo (  )  [inline, private]

never to be implemented (constructor always has to set m_eScriptType to actual value)


Member Function Documentation

virtual bool GR_RenderInfo::append ( GR_RenderInfo ri,
bool  bReverse = false 
) [pure virtual]
virtual bool GR_RenderInfo::canAppend ( GR_RenderInfo ri  )  const [inline, virtual]

Reimplemented in GR_PangoRenderInfo.

References m_eScriptType.

Referenced by fp_TextRun::canMergeWithNext().

virtual bool GR_RenderInfo::cut ( UT_uint32  offset,
UT_uint32  len,
bool  bReverse = false 
) [pure virtual]
virtual GRRI_Type GR_RenderInfo::getType (  )  const [pure virtual]

Implemented in GR_Win32USPRenderInfo, GR_PangoRenderInfo, and GR_XPRenderInfo.

Referenced by fp_TextRun::_draw(), fp_TextRun::_refreshDrawBuffer(), GR_Win32USPGraphics::adjustCaretPosition(), GR_CairoGraphics::adjustCaretPosition(), GR_Win32USPGraphics::adjustDeletePosition(), GR_CairoGraphics::adjustDeletePosition(), GR_Graphics::appendRenderedCharsToBuff(), GR_Win32USPGraphics::canBreak(), GR_CairoGraphics::canBreak(), GR_Win32USPGraphics::countJustificationPoints(), GR_Graphics::countJustificationPoints(), GR_CairoGraphics::countJustificationPoints(), fp_TextRun::findPointCoords(), GR_Win32USPGraphics::getTextWidth(), GR_Graphics::getTextWidth(), GR_CairoGraphics::getTextWidth(), GR_Win32USPGraphics::justify(), GR_Graphics::justify(), GR_CairoGraphics::justify(), fp_TextRun::mapXYToPosition(), GR_Win32USPGraphics::measureRenderedCharWidths(), GR_Graphics::measureRenderedCharWidths(), GR_CairoGraphics::measureRenderedCharWidths(), GR_Win32USPGraphics::needsSpecialCaretPositioning(), GR_Win32USPGraphics::positionToXY(), GR_Graphics::positionToXY(), GR_CairoGraphics::positionToXY(), GR_Win32USPGraphics::prepareToRenderChars(), GR_Graphics::prepareToRenderChars(), GR_CairoGraphics::prepareToRenderChars(), GR_Win32USPGraphics::renderChars(), GR_Graphics::renderChars(), GR_CairoGraphics::renderChars(), GR_Win32USPGraphics::resetJustification(), GR_Graphics::resetJustification(), GR_CairoGraphics::resetJustification(), GR_Win32USPGraphics::shape(), GR_CairoGraphics::shape(), GR_Win32USPGraphics::XYToPosition(), GR_Graphics::XYToPosition(), and GR_CairoGraphics::XYToPosition().

virtual bool GR_RenderInfo::isJustified (  )  const [pure virtual]
virtual bool GR_RenderInfo::split ( GR_RenderInfo *&  pri,
bool  bReverse = false 
) [pure virtual]

Member Data Documentation


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