Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / MS / Internal / PtsHost / DirtyTextRange.cs / 2 / DirtyTextRange.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // // File: DirtyTextRange.cs // // Description: Dirty text range describes change in the TextContainer. // // History: // 06/06/2003 : [....] - created. // //--------------------------------------------------------------------------- using System; using System.Windows.Controls; using System.Windows.Documents; namespace MS.Internal.PtsHost { // --------------------------------------------------------------------- // Dirty text range describes change in the TextContainer. // --------------------------------------------------------------------- internal struct DirtyTextRange { // ------------------------------------------------------------------ // Constructor // // startIndex - Index of the starting position of the change. // positionsAdded - Number of characters added. // positionsRemoved - Number of characters removed. // ----------------------------------------------------------------- internal DirtyTextRange(int startIndex, int positionsAdded, int positionsRemoved) : this(startIndex, positionsAdded, positionsRemoved, false /* affectsRenderOnly */) { } // ------------------------------------------------------------------ // Constructor // // startIndex - Index of the starting position of the change. // positionsAdded - Number of characters added. // positionsRemoved - Number of characters removed. // affectsRenderOnly - true if change does not affect measure (highlight change) // ------------------------------------------------------------------ internal DirtyTextRange(int startIndex, int positionsAdded, int positionsRemoved, bool affectsRenderOnly) { StartIndex = startIndex; PositionsAdded = positionsAdded; PositionsRemoved = positionsRemoved; AffectsRenderOnly = affectsRenderOnly; } // ----------------------------------------------------------------- // Constructor // // change - TextContainer change data. // ------------------------------------------------------------------ internal DirtyTextRange(TextContainerChangeEventArgs change) { StartIndex = change.ITextPosition.Offset; PositionsAdded = 0; PositionsRemoved = 0; switch (change.TextChange) { case TextChangeType.ContentAdded: PositionsAdded = change.Count; break; case TextChangeType.ContentRemoved: PositionsRemoved = change.Count; break; case TextChangeType.PropertyModified: PositionsAdded = change.Count; PositionsRemoved = change.Count; break; } AffectsRenderOnly = false; } // ----------------------------------------------------------------- // Index of the starting position of the change. // ----------------------------------------------------------------- internal int StartIndex; // ----------------------------------------------------------------- // Number of characters added. // ------------------------------------------------------------------ internal int PositionsAdded; // ----------------------------------------------------------------- // Number of characters removed. // ------------------------------------------------------------------ internal int PositionsRemoved; // ------------------------------------------------------------------ // true if the change affects render only (ie, a highlight change). // ----------------------------------------------------------------- internal bool AffectsRenderOnly; } } // 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
- DesignerSerializationVisibilityAttribute.cs
- DynamicResourceExtensionConverter.cs
- Point.cs
- OdbcDataReader.cs
- DiscoveryMessageSequenceCD1.cs
- LinkLabel.cs
- PenContexts.cs
- ToolboxItemLoader.cs
- basevalidator.cs
- OutputCacheModule.cs
- RectangleHotSpot.cs
- SHA1.cs
- ChangeTracker.cs
- RadioButtonStandardAdapter.cs
- SchemaImporterExtension.cs
- PngBitmapDecoder.cs
- Imaging.cs
- CalendarDataBindingHandler.cs
- AutoGeneratedField.cs
- OdbcEnvironmentHandle.cs
- Identity.cs
- TypeListConverter.cs
- CompositeDataBoundControl.cs
- TranslateTransform.cs
- TemplatedMailWebEventProvider.cs
- InvokeMethodDesigner.xaml.cs
- UniformGrid.cs
- OperationAbortedException.cs
- XmlReaderSettings.cs
- SqlEnums.cs
- ShaderEffect.cs
- RemotingClientProxy.cs
- SettingsBase.cs
- LogArchiveSnapshot.cs
- ChangePassword.cs
- QuaternionKeyFrameCollection.cs
- COM2TypeInfoProcessor.cs
- AccessViolationException.cs
- _NestedSingleAsyncResult.cs
- MeshGeometry3D.cs
- AssemblyAssociatedContentFileAttribute.cs
- WebPartManager.cs
- Perspective.cs
- TypeConverterMarkupExtension.cs
- ListControl.cs
- DataSourceCache.cs
- DefaultShape.cs
- TextEndOfParagraph.cs
- MachineSettingsSection.cs
- PropertyEntry.cs
- TableCellCollection.cs
- MenuBindingsEditorForm.cs
- Function.cs
- ComponentCommands.cs
- SortQueryOperator.cs
- DeflateInput.cs
- TextTreeTextNode.cs
- cookieexception.cs
- EnumBuilder.cs
- WebPartRestoreVerb.cs
- WebCodeGenerator.cs
- CryptoConfig.cs
- TransformValueSerializer.cs
- DataBindingExpressionBuilder.cs
- ListViewContainer.cs
- ToolStripLabel.cs
- DrawingAttributes.cs
- TimeManager.cs
- ScrollPatternIdentifiers.cs
- XamlReaderHelper.cs
- MatrixAnimationUsingPath.cs
- GeometryModel3D.cs
- Membership.cs
- DBCommand.cs
- CookielessHelper.cs
- SqlBinder.cs
- ListViewCancelEventArgs.cs
- TraceEventCache.cs
- TransformGroup.cs
- PersonalizationStateInfo.cs
- EventBuilder.cs
- SecurityIdentifierConverter.cs
- XhtmlBasicCalendarAdapter.cs
- XmlSchemaFacet.cs
- FontUnit.cs
- C14NUtil.cs
- _ShellExpression.cs
- _CommandStream.cs
- OracleNumber.cs
- XsltFunctions.cs
- ColumnHeader.cs
- BufferBuilder.cs
- RequiredFieldValidator.cs
- InternalBufferOverflowException.cs
- ProfileSettingsCollection.cs
- XmlSchemaAttribute.cs
- RadioButtonBaseAdapter.cs
- Stylesheet.cs
- BatchParser.cs
- ComContractElement.cs