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
- DataSourceGroupCollection.cs
- uribuilder.cs
- DrawListViewSubItemEventArgs.cs
- DataGridViewSelectedColumnCollection.cs
- ApplicationContext.cs
- EventProvider.cs
- HwndSourceKeyboardInputSite.cs
- ProfilePropertyNameValidator.cs
- StringFreezingAttribute.cs
- Span.cs
- Vector3DConverter.cs
- OdbcError.cs
- View.cs
- DataGridViewHitTestInfo.cs
- CustomTypeDescriptor.cs
- DynamicPropertyHolder.cs
- Site.cs
- Tablet.cs
- _ListenerRequestStream.cs
- DateTime.cs
- IIS7WorkerRequest.cs
- SevenBitStream.cs
- TransformerInfoCollection.cs
- Camera.cs
- GeometryModel3D.cs
- QilTernary.cs
- ObfuscationAttribute.cs
- MobileUserControl.cs
- DurableOperationContext.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- OleDbStruct.cs
- DataFormats.cs
- ReflectionTypeLoadException.cs
- WebBrowserEvent.cs
- IResourceProvider.cs
- ClientBuildManagerCallback.cs
- OrthographicCamera.cs
- CounterSample.cs
- ServiceAuthorizationElement.cs
- DataReaderContainer.cs
- DbConnectionPoolGroup.cs
- XmlSchemaAttributeGroup.cs
- SystemColorTracker.cs
- DataBoundControlDesigner.cs
- ComponentEditorForm.cs
- XmlFormatMapping.cs
- ImportContext.cs
- EqualityComparer.cs
- DataBoundControlAdapter.cs
- MimeTextImporter.cs
- MessagingActivityHelper.cs
- WeakReference.cs
- ExpressionReplacer.cs
- XmlNamespaceManager.cs
- SystemBrushes.cs
- SchemaReference.cs
- TextInfo.cs
- BuildResultCache.cs
- Floater.cs
- util.cs
- IsolatedStorageException.cs
- OrthographicCamera.cs
- GroupLabel.cs
- CompilerGeneratedAttribute.cs
- DynamicMetaObject.cs
- FunctionDescription.cs
- StreamInfo.cs
- AddToCollection.cs
- cookie.cs
- BooleanFacetDescriptionElement.cs
- ZipFileInfo.cs
- DataGridCaption.cs
- Rule.cs
- XamlSerializationHelper.cs
- RegistryConfigurationProvider.cs
- LineProperties.cs
- CheckBoxRenderer.cs
- GridViewAutomationPeer.cs
- AssemblyHash.cs
- EdmValidator.cs
- EntitySqlQueryBuilder.cs
- SamlSerializer.cs
- TreeViewItemAutomationPeer.cs
- BitmapEffectDrawingContent.cs
- FlowDocumentView.cs
- SupportsPreviewControlAttribute.cs
- MethodExpr.cs
- SqlTopReducer.cs
- CheckBoxFlatAdapter.cs
- regiisutil.cs
- SamlConditions.cs
- Pair.cs
- DataGridViewAutoSizeModeEventArgs.cs
- StaticSiteMapProvider.cs
- InfiniteIntConverter.cs
- XamlSerializerUtil.cs
- FormViewInsertedEventArgs.cs
- Utility.cs
- FontFamilyIdentifier.cs
- TraceData.cs