API published in: S60 2nd Ed
Link against: avkon.lib eikcore.lib
Required Capabilities
None
#include <aknbiditextutils.h>
truncating and wrapping to be used in code that needs to support text that requires conversion from logical to visual order, e.g. Arabic/Hebrew Logical text is given as input to all methods. Output text is in visual order.
Input text buffers given as parameters must contain extra space for some additional characters as stated in method descriptions.
Public Types |
|
enum | TParagraphDirectionality { EImplicit = 0, ELeftToRight = 1, ERightToLeft = 2 } |
Overall paragraph directionality. More... |
|
Static Public Member Functions |
|
static IMPORT_C TBool | ConvertToVisualAndClipL (TDes &aLogicalText, const CFont &aFont, TInt aMaxWidthInPixels, TInt aMaxClippedWidthInPixels, AknBidiTextUtils::TParagraphDirectionality aDirectionality=EImplicit, TChar aClipChar=KEllipsis) |
Generic text clipping. |
|
static IMPORT_C TBool | ConvertToVisualAndClip (const TDesC &aLogicalText, TDes &aVisualText, const CFont &aFont, TInt aMaxWidthInPixels, TInt aMaxClippedWidthInPixels, AknBidiTextUtils::TParagraphDirectionality aDirectionality=EImplicit, TChar aClipChar=KEllipsis) |
Generic text clipping. |
|
static IMPORT_C TInt | PrepareRunInfoArray (const TDesC &aLogicalText) |
Tests how big run info array the given text requires and tries to increase the size of the array if required (stored in CAknEnv). |
|
static IMPORT_C void | ConvertToVisualAndWrapToArrayL (TDes &aLogicalText, const CArrayFix< TInt > &aLineWidthArray, const CFont &aFont, CArrayFix< TPtrC > &aWrappedArray, TBool aInsertTruncationChar, AknBidiTextUtils::TParagraphDirectionality aDirectionality=EImplicit) |
Converts a string in visual order and wraps it to an array of pointers. |
|
static IMPORT_C HBufC * | ConvertToVisualAndWrapToArrayL (const TDesC &aLogicalText, TInt aLineWidth, const CFont &aFont, CArrayFix< TPtrC > &aWrappedArray, AknBidiTextUtils::TParagraphDirectionality aDirectionality=EImplicit) |
Converts a string in visual order and wraps it to an array of pointers. |
|
static IMPORT_C void | ConvertToVisualAndChopToArrayL (TDes &aLogicalText, const CArrayFix< TInt > &aLineWidthArray, const CFont &aFont, CArrayFix< TPtrC > &aChoppedArray, AknBidiTextUtils::TParagraphDirectionality aDirectionality=EImplicit) |
Converts a string in visual order and chops each line when a line break character is encountered. |
|
static IMPORT_C HBufC * | ConvertToVisualAndChopToArrayL (const TDesC &aLogicalText, TInt aLineWidth, const CFont &aFont, CArrayFix< TPtrC > &aChoppedArray, TParagraphDirectionality aDirectionality=EImplicit) |
Converts a string in visual order and chops each line when a line break character is encountered. |
|
static IMPORT_C void | ConvertToVisualAndWrapToStringL (const TDesC &aLogicalText, const CArrayFix< TInt > &aLineWidthArray, const CFont &aFont, TDes &aWrappedString, TBool aInsertTruncationChar, AknBidiTextUtils::TParagraphDirectionality aDirectionality=EImplicit) |
Converts a string in visual order and wraps it to lines by inserting ' ' after each line in text. |
|
static IMPORT_C HBufC * | ConvertToVisualAndWrapToArrayWholeTextL (const TDesC &aLogicalText, const CArrayFix< TInt > &aLineWidthArray, const CFont &aFont, CArrayFix< TPtrC > &aWrappedArray, AknBidiTextUtils::TParagraphDirectionality aDirectionality=EImplicit) |
Converts a string in visual order and wraps it to an array of pointers. |
|
static IMPORT_C TInt | MeasureTextBoundsWidth (const CFont &aFont, const TDesC &aText, CFont::TMeasureTextInput::TFlags aOrder) |
Measures the full horizontal width in pixels of the passed-in text using a particular font, including in the width any side-bearings
of the glyphs at the ends of the text, and any declared "advance" of the run of glyphs. |
|
Overall paragraph directionality. |
|
Converts a string in visual order and chops each line when a line break character is encountered. Clips at the end of each line if there isn't enough space on that line. When clipping, KEllipsis (shown as 3 dots) is inserted at the end of the line. The pointers in aChoppedArray are set to point to positions inside the returned heap descriptor.
|
|
Converts a string in visual order and chops each line when a line break character is encountered. Clips at the end of each line if there isn't enough space on that line. When clipping, KEllipsis (shown as 3 dots) is inserted at the end of the line. The pointers in aChoppedArray are set to point to positions inside aLogicalText.
|
|
Generic text clipping. This method does not allocate memory and can be used in non-leaving functions. You must give a preallocated visual buffer as a parameter.
|
|
Generic text clipping. This method allocates memory for visual buffer, and can leave in OOM situations.
|
|
Converts a string in visual order and wraps it to an array of pointers. Constant line width is given. The pointers in aWrappedArray are set to point to positions inside the returned heap descriptor.
|
|
Converts a string in visual order and wraps it to an array of pointers. The maximum number of lines and line widths are specified in aLineWidthArray. The pointers in aWrappedArray are set to point to positions inside descriptor given in aLogicalText.
|
|
Converts a string in visual order and wraps it to an array of pointers. Line widths are specified in aLineWidthArray. If all the text does not fit in the amount of lines in aLineWidthArray, the last line width in the array is used for all the remaining lines. The pointers in aWrappedArray are set to point to positions inside the returned heap descriptor.
|
|
Converts a string in visual order and wraps it to lines by inserting ' The result is copied into aWrappedString.
|
|
Measures the full horizontal width in pixels of the passed-in text using a particular font, including in the width any side-bearings of the glyphs at the ends of the text, and any declared "advance" of the run of glyphs. It cannot be used for vertical text measurement. Side-bearings are parts of glyphs that extend left or right from the normal width or "advance" of the glyph. A left side-bearing, for instance, will overlap with a glyph to its left. Another way of thinking about this is that the origin (0,0) of the glyph is not at its bottom left. The advance of a run of glyphs is the sum of the advances - once in visual ordering and shaping has been performed - of all the glyphs. It is defined relative to a drawing origin. Within runs of text, side-bearings do not contribute to the width of the text. However, at the (visual) ends of text, they are likely to need to be counted, depending upon the exact use case. This method returns the width of the horizontal envelope of the text by taking the extreme horizontal extents of the text bounds rectangle (which includes side-bearings on either end) and the extent of the advance. Thus it returns the width of : Min(<left_text_bound>, 0), Max( <right_text_bound>, <advance>) This method should be used when the proposed text is going to be drawn using any horizontal CGraphicsContext::DrawText drawing API. The text can be in visual or logical order.
|
|
Tests how big run info array the given text requires and tries to increase the size of the array if required (stored in CAknEnv). This method is useful with the non-leaving version of ConvertToVisualAndClip(). By calling this method successfully (means KErrNone is returned) at any point during the lifetime of the application it is guaranteed that the text gets correctly converted in visual form even in out-of-memory situation when calling ConvertToVisualAndClip(). Note that there is no use calling this method if you do not handle the return code, because the truncating methods already do that.
|