Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

ThaiLayoutEngine Class Reference

This class implements layout for the Thai script, using the ThaiShapingClass. More...

#include <ThaiLayoutEngine.h>

Inheritance diagram for ThaiLayoutEngine::

LayoutEngine UObject UMemory List of all members.

Public Methods

 ThaiLayoutEngine (const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode)
 This constructs an instance of ThaiLayoutEngine for the given font, script and language. More...

virtual ~ThaiLayoutEngine ()
 The destructor, virtual for correct polymorphic invocation. More...

virtual UClassID getDynamicClassID () const
 ICU "poor man's RTTI", returns a UClassID for the actual class. More...


Static Public Methods

UClassID getStaticClassID ()
 ICU "poor man's RTTI", returns a UClassID for this class. More...


Protected Methods

virtual le_int32 computeGlyphs (const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphID *&glyphs, le_int32 *&charIndices, LEErrorCode &success)
 This method performs Thai layout. More...


Protected Attributes

le_uint8 fGlyphSet
 A small integer indicating which Thai encoding the font uses. More...

LEUnicode fErrorChar
 The character used as a base for vowels and tone marks that are out of sequence. More...


Static Private Attributes

const char fgClassID
 The address of this static class variable serves as this class's ID for ICU "poor man's RTTI". More...


Detailed Description

This class implements layout for the Thai script, using the ThaiShapingClass.

All existing Thai fonts use an encoding which assigns character codes to all the variant forms needed to display accents and tone marks correctly in context. This class can deal with fonts using the Microsoft, Macintosh, and WorldType encodings.

Internal:
For internal use only.

Definition at line 28 of file ThaiLayoutEngine.h.


Constructor & Destructor Documentation

ThaiLayoutEngine::ThaiLayoutEngine const LEFontInstance   fontInstance,
le_int32    scriptCode,
le_int32    languageCode
 

This constructs an instance of ThaiLayoutEngine for the given font, script and language.

It examines the font, using LEFontInstance::canDisplay, to set fGlyphSet and fErrorChar. (see below)

Parameters:
fontInstance  - the font
scriptCode  - the script
languageCode  - the language
See also:
LEFontInstance , ScriptAndLanguageTags.h for script and language codes
Internal:
For internal use only.

virtual ThaiLayoutEngine::~ThaiLayoutEngine   [virtual]
 

The destructor, virtual for correct polymorphic invocation.

Internal:
For internal use only.


Member Function Documentation

virtual le_int32 ThaiLayoutEngine::computeGlyphs const LEUnicode    chars[],
le_int32    offset,
le_int32    count,
le_int32    max,
le_bool    rightToLeft,
LEGlyphID *&    glyphs,
le_int32 *&    charIndices,
LEErrorCode   success
[protected, virtual]
 

This method performs Thai layout.

It calls ThaiShaping::compose to generate the correct contextual character codes, and then calls mapCharsToGlyphs to generate the glyph indices.

Input parameters:

Parameters:
chars  - the input character context
offset  - the index of the first character to process
count  - the number of characters to process
max  - the number of characters in the input context
rightToLeft  - true if the text is in a right to left directional run
Output parameters:
Parameters:
glyphs  - the glyph index array
charIndices  - the character index array
success  - set to an error code if the operation fails
Returns:
the number of glyphs in the glyph index array
See also:
ThaiShaping
Internal:
For internal use only.

Reimplemented from LayoutEngine.

virtual UClassID ThaiLayoutEngine::getDynamicClassID void    const [inline, virtual]
 

ICU "poor man's RTTI", returns a UClassID for the actual class.

Draft:
This API has been introduced in ICU 2.2. It is still in draft state and may be modified in a future release.

Reimplemented from LayoutEngine.

Definition at line 59 of file ThaiLayoutEngine.h.

UClassID ThaiLayoutEngine::getStaticClassID void    [inline, static]
 

ICU "poor man's RTTI", returns a UClassID for this class.

Draft:
This API has been introduced in ICU 2.2. It is still in draft state and may be modified in a future release.

Reimplemented from LayoutEngine.

Definition at line 66 of file ThaiLayoutEngine.h.


Member Data Documentation

LEUnicode ThaiLayoutEngine::fErrorChar [protected]
 

The character used as a base for vowels and tone marks that are out of sequence.

Usually this will be Unicode 0x25CC, if the font can display it.

See also:
ThaiShaping
Internal:
For internal use only.

Definition at line 89 of file ThaiLayoutEngine.h.

le_uint8 ThaiLayoutEngine::fGlyphSet [protected]
 

A small integer indicating which Thai encoding the font uses.

See also:
ThaiShaping
Internal:
For internal use only.

Definition at line 77 of file ThaiLayoutEngine.h.

const char ThaiLayoutEngine::fgClassID [static, private]
 

The address of this static class variable serves as this class's ID for ICU "poor man's RTTI".

Reimplemented from LayoutEngine.

Definition at line 123 of file ThaiLayoutEngine.h.


The documentation for this class was generated from the following file:
Generated on Mon Nov 24 14:36:56 2003 for ICU 2.8 by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001