return mImpl->mText[characterIndex];
}
+void LogicalModel::ReplaceText( CharacterIndex characterIndex,
+ Length numberOfCharactersToRemove,
+ const Character* const text,
+ Length numberOfCharactersToInsert )
+{
+}
+
void LogicalModel::SetScripts( const ScriptRun* const scripts,
Length numberOfRuns )
{
return TextAbstraction::UNKNOWN;
}
+void LogicalModel::ReplaceScripts( CharacterIndex characterIndex,
+ Length numberOfCharactersToRemove,
+ const ScriptRun* const scriptRuns,
+ Length numberOfCharactersToInsert )
+{
+}
+
void LogicalModel::SetFonts( const FontRun* const fonts,
Length numberOfRuns )
{
return 0u;
}
+void LogicalModel::ReplaceFonts( CharacterIndex characterIndex,
+ Length numberOfCharactersToRemove,
+ const FontRun* const fontRuns,
+ Length numberOfCharactersToInsert )
+{
+}
+
void LogicalModel::SetLineBreakInfo( const LineBreakInfo* const lineBreakInfo,
Length length )
{
return *( mImpl->mLineBreakInfo.Begin() + characterIndex );
}
+void LogicalModel::ReplaceLineBreakInfo( CharacterIndex characterIndex,
+ Length numberOfItemsToRemove,
+ const LineBreakInfo* const lineBreakInfo,
+ Length numberOfItemsToInsert )
+{
+}
+
void LogicalModel::SetWordBreakInfo( const WordBreakInfo* const wordBreakInfo,
Length length )
{
return *( mImpl->mWordBreakInfo.Begin() + characterIndex );
}
+void LogicalModel::ReplaceWordBreakInfo( CharacterIndex characterIndex,
+ Length numberOfItemsToRemove,
+ const WordBreakInfo* const wordBreakInfo,
+ Length numberOfItemsToInsert )
+{
+}
+
void LogicalModel::SetBidirectionalInfo( const BidirectionalParagraphInfoRun* const bidirectionalInfo,
Length numberOfRuns )
{
memcpy( bidirectionalInfo, modelBidirectionalParagraphInfo.Begin() + bidiCache.firstRun, bidiCache.numberOfRuns * sizeof( BidirectionalParagraphInfoRun ) );
}
+void ReplaceBidirectionalInfo( CharacterIndex characterIndex,
+ Length numberOfCharactersToRemove,
+ const BidirectionalParagraphInfoRun* const bidirectionalInfo,
+ Length numberOfCharactersToInsert )
+{
+}
+
void LogicalModel::GetCharacterDirections( CharacterDirection* directions,
CharacterIndex characterIndex,
Length numberOfCharacters ) const
}
}
+void LogicalModel::ReplaceVisualToLogicalMap( CharacterIndex characterIndex,
+ Length numberOfCharactersToRemove,
+ const BidirectionalLineInfoRun* const bidirectionalInfo,
+ Length numberOfCharactersToInsert )
+{
+}
+
CharacterIndex LogicalModel::GetVisualCharacterIndex( CharacterIndex logicalCharacterIndex ) const
{
if( 0u == mImpl->mLogicalToVisualMap.Count() )
*/
Character GetCharacter( CharacterIndex characterIndex ) const;
+ /**
+ * Replaces characters from the text.
+ *
+ * If the @p numberOfCharactersToRemove is zero, this operation is like an insert.
+ * If the @p numberOfCharactersToInsert is zero, this operation is like a remove.
+ *
+ * @param[in] characterIndex Where to replace the text.
+ * @param[in] numberOfCharactersToRemove The number of characters to be removed.
+ * @param[in] text Pointer to a buffer with the text encoded in utf32.
+ * @param[in] numberOfCharactersToInsert The number of characters in the buffer.
+ */
+ void ReplaceText( CharacterIndex characterIndex,
+ Length numberOfCharactersToRemove,
+ const Character* const text,
+ Length numberOfCharactersToInsert );
+
// Language support interface.
/**
Script GetScript( CharacterIndex characterIndex ) const;
/**
+ * Replaces script runs for the given range of characters.
+ *
+ * If the @p numberOfCharactersToRemove is zero, this operation is like an insert.
+ * If the @p numberOfCharactersToInsert is zero, this operation is like a remove.
+ *
+ * @param[in] characterIndex Index of the first character where to replace the scripts.
+ * @param[in] numberOfCharactersToRemove The number of characters to be the script removed.
+ * @param[in] scriptRuns Pointer to a buffer with the script runs.
+ * @param[in] numberOfCharactersToInsert The number of characters to be the script inserted.
+ */
+ void ReplaceScripts( CharacterIndex characterIndex,
+ Length numberOfCharactersToRemove,
+ const ScriptRun* const scriptRuns,
+ Length numberOfCharactersToInsert );
+
+ /**
* Sets the font runs.
*
* Replaces any fonts previously set.
*/
FontId GetFont( CharacterIndex characterIndex ) const;
+ /**
+ * Replaces font runs for the given range of characters.
+ *
+ * If the @p numberOfCharactersToRemove is zero, this operation is like an insert.
+ * If the @p numberOfCharactersToInsert is zero, this operation is like a remove.
+ *
+ * @param[in] characterIndex Index of the first character where to replace the fonts.
+ * @param[in] numberOfCharactersToRemove The number of characters to be the font removed.
+ * @param[in] fontRuns Pointer to a buffer with the font runs.
+ * @param[in] numberOfCharactersToInsert The number of characters to be the font inserted.
+ */
+ void ReplaceFonts( CharacterIndex characterIndex,
+ Length numberOfCharactersToRemove,
+ const FontRun* const fontRuns,
+ Length numberOfCharactersToInsert );
+
// Break info interface.
/**
LineBreakInfo GetLineBreakInfo( CharacterIndex characterIndex ) const;
/**
+ * Replaces line break info.
+ *
+ * See GetLineBreakInfo() to get how the line break info is encoded.
+ *
+ * If the @p numberOfItemsToRemove is zero, this operation is like an insert.
+ * If the @p numberOfItemsToInsert is zero, this operation is like a remove.
+ *
+ * @param[in] characterIndex Where to replace the line break info.
+ * @param[in] numberOfItemsToRemove The number of items to be removed.
+ * @param[in] lineBreakInfo Pointer to a buffer with the line break info.
+ * @param[in] numberOfItemsToInsert The number of items in the buffer.
+ */
+ void ReplaceLineBreakInfo( CharacterIndex characterIndex,
+ Length numberOfItemsToRemove,
+ const LineBreakInfo* const lineBreakInfo,
+ Length numberOfItemsToInsert );
+
+ /**
* Sets the word break info.
*
* See GetWordBreakInfo() to get how the word break info is encoded.
*/
WordBreakInfo GetWordBreakInfo( CharacterIndex characterIndex ) const;
+ /**
+ * Replaces word break info.
+ *
+ * See GetWordBreakInfo() to get how the word break info is encoded.
+ *
+ * If the @p numberOfItemsToRemove is zero, this operation is like an insert.
+ * If the @p numberOfItemsToInsert is zero, this operation is like a remove.
+ *
+ * @param[in] characterIndex Where to replace the word break info.
+ * @param[in] numberOfItemsToRemove The number of items to be removed.
+ * @param[in] wordBreakInfo Pointer to a buffer with the word break info.
+ * @param[in] numberOfItemsToInsert The number of items in the buffer.
+ */
+ void ReplaceWordBreakInfo( CharacterIndex characterIndex,
+ Length numberOfItemsToRemove,
+ const WordBreakInfo* const wordBreakInfo,
+ Length numberOfItemsToInsert );
+
// Bidirectional support interface.
/**
Length numberOfCharacters ) const;
/**
+ * Replaces bidirectional info runs for the given range of characters.
+ *
+ * If the @p numberOfCharactersToRemove is zero, this operation is like an insert.
+ * If the @p numberOfCharactersToInsert is zero, this operation is like a remove.
+ *
+ * @param[in] characterIndex Index of the first character where to replace the bidirectional info.
+ * @param[in] numberOfCharactersToRemove The number of characters to be the bidirectional info removed.
+ * @param[in] bidirectionalInfo Pointer to a buffer with the bidirectional info runs.
+ * @param[in] numberOfCharactersToInsert The number of characters to be the bidirectional info inserted.
+ */
+ void ReplaceBidirectionalInfo( CharacterIndex characterIndex,
+ Length numberOfCharactersToRemove,
+ const BidirectionalParagraphInfoRun* const bidirectionalInfo,
+ Length numberOfCharactersToInsert );
+
+ /**
* Retrieves the direction of the characters.
*
* It sets @c true for right to left characters and @c false for left to right.
Length numberOfRuns );
/**
+ * Replaces the visual to logical and logical to visual map tables for the given range of characters.
+ *
+ * If the @p numberOfCharactersToRemove is zero, this operation is like an insert.
+ * If the @p numberOfCharactersToInsert is zero, this operation is like a remove.
+ *
+ * @param[in] characterIndex Index of the first character where to replace the map tables.
+ * @param[in] numberOfCharactersToRemove The number of characters to be removed.
+ * @param[in] bidirectionalInfo Pointer to a buffer with the bidirectional info runs.
+ * @param[in] numberOfCharactersToInsert The number of characters to be inserted.
+ */
+ void ReplaceVisualToLogicalMap( CharacterIndex characterIndex,
+ Length numberOfCharactersToRemove,
+ const BidirectionalLineInfoRun* const bidirectionalInfo,
+ Length numberOfCharactersToInsert );
+
+ /**
* Retrieves the visual character index for the given logical character index.
*
* @param[in] logicalCharacterIndex The logical character index.
return mImpl->mGlyphs[glyphIndex];
}
+void VisualModel::ReplaceGlyphs( GlyphIndex glyphIndex,
+ Length numberOfGlyphsToRemove,
+ const GlyphInfo* const glyphs,
+ const Length* const numberOfCharacters,
+ Length numberOfGlyphsToInsert )
+{
+}
+
CharacterIndex VisualModel::GetCharacterIndex( GlyphIndex glyphIndex ) const
{
return mImpl->mGlyphsToCharacters[glyphIndex];
return *( mImpl->mGlyphPositions.Begin() + glyphIndex );
}
+void VisualModel::ReplaceGlyphPositions( GlyphIndex glyphIndex,
+ Length numberOfGlyphsToRemove,
+ const Vector2* const positions,
+ Length numberOfGlyphsToInsert )
+{
+}
+
void VisualModel::SetLines( const LineRun* const lines,
Length numberOfLines )
{
memcpy( lines, modelLines.Begin() + lineCache.firstLine, lineCache.numberOfLines * sizeof( LineRun ) );
}
+void VisualModel::ReplaceLines( GlyphIndex glyphIndex,
+ Length numberOfGlyphsToRemove,
+ const LineRun* const lines,
+ Length numberOfGlyphsToInsert )
+{
+}
+
void VisualModel::SetNaturalSize( const Vector2& size )
{
mImpl->mNaturalSize = size;
*/
const GlyphInfo& GetGlyphInfo( GlyphIndex glyphIndex ) const;
+ /**
+ * Replaces glyphs.
+ *
+ * If the @p numberOfGlyphsToRemove is zero, this operation is like an insert.
+ * If the @p numberOfGlyphsToInsert is zero, this operation is like a remove.
+ *
+ * @param[in] glyphIndex Where to replace the glyphs.
+ * @param[in] numberOfGlyphsToRemove The number of glyphs to be removed.
+ * @param[in] glyphs Pointer to a buffer with the new glyphs.
+ * @param[in] numberOfCharacters Pointer to a buffer with the number of characters per glyph.
+ * @param[in] numberOfGlyphsToInsert The number of new glyphs in the buffer.
+ */
+ void ReplaceGlyphs( GlyphIndex glyphIndex,
+ Length numberOfGlyphsToRemove,
+ const GlyphInfo* const glyphs,
+ const Length* const numberOfCharacters,
+ Length numberOfGlyphsToInsert );
+
// Character <--> Glyph conversion
/**
*/
const Vector2& GetGlyphPosition( GlyphIndex glyphIndex ) const;
+ /**
+ * Replaces glyph's positions.
+ *
+ * If the @p numberOfGlyphsToRemove is zero, this operation is like an insert.
+ * If the @p numberOfGlyphsToInsert is zero, this operation is like a remove.
+ *
+ * @param[in] glyphIndex Where to replace the glyph's positions.
+ * @param[in] numberOfGlyphsToRemove The number of glyph's positions to be removed.
+ * @param[in] positions Pointer to a buffer with the new glyph's positions.
+ * @param[in] numberOfGlyphsToInsert The number of new glyph's positions in the buffer.
+ */
+ void ReplaceGlyphPositions( GlyphIndex glyphIndex,
+ Length numberOfGlyphsToRemove,
+ const Vector2* const positions,
+ Length numberOfGlyphsToInsert );
+
// Line interface.
/**
GlyphIndex glyphIndex,
Length numberOfGlyphs ) const;
+ /**
+ * Replaces lines for the given range of glyphs.
+ *
+ * If the @p numberOfGlyphsToRemove is zero, this operation is like an insert.
+ * If the @p numberOfGlyphsToInsert is zero, this operation is like a remove.
+ *
+ * @param[in] glyphIndex Index of the first glyph where to replace the line info.
+ * @param[in] numberOfGlyphsToRemove The number of glyphs to be the line info removed.
+ * @param[in] lines Pointer to a buffer with the lines.
+ * @param[in] numberOfGlyphsToInsert The number of characters to be the line info inserted.
+ */
+ void ReplaceLines( GlyphIndex glyphIndex,
+ Length numberOfGlyphsToRemove,
+ const LineRun* const lines,
+ Length numberOfGlyphsToInsert );
+
// Size interface
/**