-
/*
- *
- * (C) Copyright IBM Corp. 1998-2007 - All Rights Reserved
- *
+ * (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved
*/
#ifndef __LAYOUTENGINE_H
* @stable ICU 2.8
*/
class U_LAYOUT_API LayoutEngine : public UObject {
+public:
+#ifndef U_HIDE_INTERNAL_API
+ /** @internal Flag to request kerning. */
+ static const le_int32 kTypoFlagKern;
+ /** @internal Flag to request ligatures. */
+ static const le_int32 kTypoFlagLiga;
+#endif /* U_HIDE_INTERNAL_API */
+
protected:
/**
* The object which holds the glyph storage
*/
le_bool fFilterZeroWidth;
+#ifndef U_HIDE_INTERNAL_API
/**
* This constructs an instance for a given font, script and language. Subclass constructors
* must call this constructor.
* @param fontInstance - the font for the text
* @param scriptCode - the script for the text
* @param languageCode - the language for the text
- * @param typoFlags - the typographic control flags for the text. Set bit 1 if kerning
- * is desired, set bit 2 if ligature formation is desired. Others are reserved.
+ * @param typoFlags - the typographic control flags for the text (a bitfield). Use kTypoFlagKern
+ * if kerning is desired, kTypoFlagLiga if ligature formation is desired. Others are reserved.
+ * @param success - set to an error code if the operation fails
*
* @see LEFontInstance
* @see ScriptAndLanguageTags.h
*
* @internal
*/
- LayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags);
-
+ LayoutEngine(const LEFontInstance *fontInstance,
+ le_int32 scriptCode,
+ le_int32 languageCode,
+ le_int32 typoFlags,
+ LEErrorCode &success);
+#endif /* U_HIDE_INTERNAL_API */
+
+ // Do not enclose the protected default constructor with #ifndef U_HIDE_INTERNAL_API
+ // or else the compiler will create a public default constructor.
/**
* This overrides the default no argument constructor to make it
* difficult for clients to call it. Clients are expected to call
*/
virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool mirror, LEGlyphStorage &glyphStorage, LEErrorCode &success);
+#ifndef U_HIDE_INTERNAL_API
/**
* This is a convenience method that forces the advance width of mark
* glyphs to be zero, which is required for proper selection and highlighting.
* @internal
*/
static void adjustMarkGlyphs(const LEUnicode chars[], le_int32 charCount, le_bool reverse, LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter, LEErrorCode &success);
-
+#endif /* U_HIDE_INTERNAL_API */
public:
/**
U_NAMESPACE_END
#endif
-