nsBidiPresUtils::BidiProcessor Class Reference

Interface for the processor used by ProcessText. More...

#include <nsBidiPresUtils.h>

List of all members.

Public Member Functions

virtual ~BidiProcessor ()
virtual void SetText (const PRUnichar *aText, PRInt32 aLength, nsBidiDirection aDirection)=0
 Sets the current text with the given length and the given direction.
virtual nscoord GetWidth ()=0
 Returns the measured width of the text given in SetText.
virtual void DrawText (nscoord aXOffset, nscoord aWidth)=0
 Draws the text given in SetText to a rendering context.

Detailed Description

Interface for the processor used by ProcessText.

Used by process text to collect information about the width of subruns and to notify where each subrun should be rendered.


Constructor & Destructor Documentation

virtual nsBidiPresUtils::BidiProcessor::~BidiProcessor (  )  [inline, virtual]

Member Function Documentation

virtual void nsBidiPresUtils::BidiProcessor::DrawText ( nscoord  aXOffset,
nscoord  aWidth 
) [pure virtual]

Draws the text given in SetText to a rendering context.

If SetText was not called with valid parameters, the result of this call is undefined. This call is guaranteed to only be called once between SetText calls.

Parameters:
aXOffset The offset of the left side of the substring to be drawn from the beginning of the overall string passed to ProcessText.
aWidth The width returned by GetWidth.
virtual nscoord nsBidiPresUtils::BidiProcessor::GetWidth (  )  [pure virtual]

Returns the measured width of the text given in SetText.

If SetText was not called with valid parameters, the result of this call is undefined. This call is guaranteed to only be called once between SetText calls. Will be invoked before DrawText.

virtual void nsBidiPresUtils::BidiProcessor::SetText ( const PRUnichar aText,
PRInt32  aLength,
nsBidiDirection  aDirection 
) [pure virtual]

Sets the current text with the given length and the given direction.

Remarks:
The reason that the function gives a string instead of an index is that ProcessText copies and modifies the string passed to it, so passing an index would be impossible.
Parameters:
aText The string of text.
aLength The length of the string of text.
aDirection The direction of the text. The string will never have mixed direction.

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

Generated on 3 May 2010 for Mozilla by  doxygen 1.6.1