Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / MS / Internal / IO / Packaging / fixedPageContentExtractor.cs / 1305600 / fixedPageContentExtractor.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: // Given a DOM node for a fixed page, enumerates its text content. // // History: // 05/11/2004: JohnLarc: Initial implementation //--------------------------------------------------------------------------- using System; using System.Xml; namespace MS.Internal.IO.Packaging { ////// Implements a sequence of (textContent, precedingDelimiter) pairs for /// a fixed page node. /// internal class FixedPageContentExtractor { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors ////// Initialize a FixedPageContentExtractor from a DOM node. /// internal FixedPageContentExtractor(XmlNode fixedPage) { _fixedPageInfo = new XmlFixedPageInfo(fixedPage); _nextGlyphRun = 0; } #endregion Constructors //------------------------------------------------------ // // Internal Methods // //----------------------------------------------------- #region Internal Methods ////// Return the content of the next glyph run, with a boolean indication /// whether it is separated by a space form the preceding glyph run. /// internal string NextGlyphContent(out bool inline, out uint lcid) { // Right now, we use the simplest possible heuristic for // spacing glyph runs: All pairs of adjacent glyph runs are assumed // to be separated by a word break. inline = false; lcid = 0; // End of page? if (_nextGlyphRun >= _fixedPageInfo.GlyphRunCount) { return null; } // Retrieve inline, lcid and return value from the next glyph run info. GlyphRunInfo glyphRunInfo = _fixedPageInfo.GlyphRunAtPosition(_nextGlyphRun); lcid = glyphRunInfo.LanguageID; // Point to the next glyph run for the next call and return. ++_nextGlyphRun; return glyphRunInfo.UnicodeString; } #endregion Internal Methods //------------------------------------------------------ // // Internal Properties // //------------------------------------------------------ #region Internal Properties ////// Indicates whether no more content can be returned. /// internal bool AtEndOfPage { get { return _nextGlyphRun >= _fixedPageInfo.GlyphRunCount; } } #endregion Internal Properties //----------------------------------------------------- // // Private Fields // //------------------------------------------------------ #region Private Fields private XmlFixedPageInfo _fixedPageInfo; private int _nextGlyphRun; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Style.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- LinearKeyFrames.cs
- InkCanvasInnerCanvas.cs
- SqlDataReaderSmi.cs
- Transform3D.cs
- clipboard.cs
- DotExpr.cs
- CollaborationHelperFunctions.cs
- Monitor.cs
- XPathDescendantIterator.cs
- GridViewDeleteEventArgs.cs
- DecimalAnimationUsingKeyFrames.cs
- _TimerThread.cs
- XamlGridLengthSerializer.cs
- TrimSurroundingWhitespaceAttribute.cs
- ModelTreeEnumerator.cs
- COM2Properties.cs
- ProfileSection.cs
- CurrentTimeZone.cs
- ClientSettings.cs
- WorkflowMarkupSerializationManager.cs
- TextPenaltyModule.cs
- SerializationEventsCache.cs
- updateconfighost.cs
- BypassElementCollection.cs
- ObjectDataSourceMethodEventArgs.cs
- DoneReceivingAsyncResult.cs
- FormViewUpdateEventArgs.cs
- UnconditionalPolicy.cs
- XslException.cs
- DetailsViewAutoFormat.cs
- SupportsPreviewControlAttribute.cs
- DeviceContext.cs
- WebPartsPersonalizationAuthorization.cs
- LinkClickEvent.cs
- RelationshipNavigation.cs
- CollaborationHelperFunctions.cs
- Light.cs
- DateRangeEvent.cs
- RegistrySecurity.cs
- Grant.cs
- TextModifierScope.cs
- MimePart.cs
- TransformPatternIdentifiers.cs
- ChtmlTextWriter.cs
- NavigationHelper.cs
- DbModificationClause.cs
- RuleSetDialog.cs
- DesignerAdRotatorAdapter.cs
- DataGridViewCheckBoxColumn.cs
- StandardCommands.cs
- BitmapEffect.cs
- SortQuery.cs
- unsafeIndexingFilterStream.cs
- DbProviderServices.cs
- ApplicationDirectory.cs
- AlternateViewCollection.cs
- ContentWrapperAttribute.cs
- Decoder.cs
- ListViewItemEventArgs.cs
- EntityDataSourceState.cs
- SystemIPGlobalProperties.cs
- DoubleAverageAggregationOperator.cs
- SystemThemeKey.cs
- Subtree.cs
- DictionaryBase.cs
- MbpInfo.cs
- ArrayList.cs
- ColumnTypeConverter.cs
- DataGridViewRowHeaderCell.cs
- SessionStateItemCollection.cs
- DataGridViewCellFormattingEventArgs.cs
- StrongNameSignatureInformation.cs
- SecurityDocument.cs
- FolderBrowserDialog.cs
- DllNotFoundException.cs
- versioninfo.cs
- SigningProgress.cs
- IdentityReference.cs
- MessageQuerySet.cs
- SymmetricKeyWrap.cs
- CalendarAutoFormat.cs
- XmlLoader.cs
- ColumnPropertiesGroup.cs
- PageVisual.cs
- PrefixQName.cs
- VideoDrawing.cs
- MasterPage.cs
- KoreanLunisolarCalendar.cs
- ReflectionUtil.cs
- ToolStripItemClickedEventArgs.cs
- TrackingDataItem.cs
- EqualityComparer.cs
- ToolboxItem.cs
- SafeNativeMethodsMilCoreApi.cs
- OpenTypeMethods.cs
- DataColumnChangeEvent.cs
- DropDownHolder.cs
- IncrementalHitTester.cs