LEInsertionList.h revision 3171
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A ********************************************************************** 3171N/A * Copyright (C) 1998-2008, International Business Machines 0N/A * Corporation and others. All Rights Reserved. 0N/A ********************************************************************** 0N/A * This class encapsulates the callback used by <code>LEInsertionList</code> 0N/A * to apply an insertion from the insertion list. 0N/A * This method will be called by <code>LEInsertionList::applyInsertions</code> for each 0N/A * entry on the insertion list. 0N/A * @param atPosition the position of the insertion 0N/A * @param count the number of glyphs to insert 0N/A * @param newGlyphs the address of the glyphs to insert 0N/A * @return <code>TRUE</code> if <code>LEInsertions::applyInsertions</code> should 0N/A * stop after applying this insertion. 0N/A * This class is used to keep track of insertions to an array of 0N/A * <code>LEGlyphIDs</code>. The insertions are kept on a linked 0N/A * list of <code>InsertionRecords</code> so that the glyph array 0N/A * doesn't have to be grown for each insertion. The insertions are 0N/A * stored on the list from leftmost to rightmost to make it easier 0N/A * to do the insertions. 0N/A * The insertions are applied to the array by calling the 0N/A * <code>applyInsertions</code> method, which calls a client 0N/A * supplied <code>LEInsertionCallback</code> object to actually 0N/A * apply the individual insertions. 0N/A * Construct an empty insertion list. 0N/A * @param rightToLeft <code>TRUE</code> if the glyphs are stored 0N/A * in the array in right to left order. 0N/A * Add an entry to the insertion list. 0N/A * @param position the glyph at this position in the array will be 0N/A * replaced by the new glyphs. 0N/A * @param count the number of new glyphs 3171N/A * @param success set to an error code if the auxillary data cannot be retrieved. 0N/A * @return the address of an array in which to store the new glyphs. This will 0N/A * <em>not</em> be in the glyph array. 0N/A * Return the number of new glyphs that have been inserted. 0N/A * @return the number of new glyphs which have been inserted 0N/A * Call the <code>LEInsertionCallback</code> once for each 0N/A * entry on the insertion list. 0N/A * @param callback the <code>LEInsertionCallback</code> to call for each insertion. 0N/A * @return <code>TRUE</code> if <code>callback</code> returned <code>TRUE</code> to 0N/A * terminate the insertion list processing. 0N/A * Empty the insertion list and free all associated 1693N/A * ICU "poor man's RTTI", returns a UClassID for the actual class. 1693N/A * ICU "poor man's RTTI", returns a UClassID for this class. 0N/A * The head of the insertion list. 0N/A * The tail of the insertion list. 0N/A * The total number of new glyphs on the insertion list. 0N/A * Set to <code>TRUE</code> if the glyphs are in right 0N/A * to left order. Since we want the rightmost insertion 0N/A * to be first on the list, we need to append the 0N/A * insertions in this case. Otherwise they're prepended.