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
- TileBrush.cs
- SqlDataSource.cs
- TableProviderWrapper.cs
- ApplicationTrust.cs
- ExpressionBuilderCollection.cs
- ComponentDispatcherThread.cs
- ExecutionTracker.cs
- RequestCacheValidator.cs
- ColorMap.cs
- CqlQuery.cs
- AsyncOperationManager.cs
- WindowsFormsLinkLabel.cs
- Translator.cs
- SchemeSettingElementCollection.cs
- FrameworkElementFactoryMarkupObject.cs
- OutOfMemoryException.cs
- Oid.cs
- RoleProviderPrincipal.cs
- AnnouncementEndpoint.cs
- UITypeEditor.cs
- AnonymousIdentificationSection.cs
- OverrideMode.cs
- EncryptedXml.cs
- DbConnectionInternal.cs
- WebReferencesBuildProvider.cs
- QilXmlWriter.cs
- WasAdminWrapper.cs
- ColorAnimationBase.cs
- VarRefManager.cs
- MessageBodyMemberAttribute.cs
- GeometryHitTestResult.cs
- PrintPreviewDialog.cs
- UpDownBase.cs
- SynchronizationLockException.cs
- IODescriptionAttribute.cs
- OpCodes.cs
- SimplePropertyEntry.cs
- EtwTrace.cs
- CacheVirtualItemsEvent.cs
- ConfigurationCollectionAttribute.cs
- HtmlTernaryTree.cs
- WebPageTraceListener.cs
- PermissionSetEnumerator.cs
- MouseButtonEventArgs.cs
- Bits.cs
- TreeNodeCollection.cs
- Image.cs
- Quaternion.cs
- FillBehavior.cs
- UmAlQuraCalendar.cs
- Convert.cs
- Publisher.cs
- XPathMultyIterator.cs
- MediaCommands.cs
- BindUriHelper.cs
- KeyInstance.cs
- AnnouncementService.cs
- WebConfigurationManager.cs
- HelpProvider.cs
- OdbcTransaction.cs
- Soap12ServerProtocol.cs
- ExpressionEditorAttribute.cs
- PropertyManager.cs
- ListViewItem.cs
- KeyValuePairs.cs
- FamilyCollection.cs
- AttributeCollection.cs
- Mutex.cs
- ElementNotEnabledException.cs
- PersistChildrenAttribute.cs
- CancellationTokenSource.cs
- SettingsPropertyCollection.cs
- DrawingImage.cs
- EdmConstants.cs
- EntityExpressionVisitor.cs
- BrowserCapabilitiesFactoryBase.cs
- HostedBindingBehavior.cs
- SelectionListComponentEditor.cs
- PropertyInformation.cs
- XmlSchemaSimpleContentExtension.cs
- TypeAccessException.cs
- EventProviderWriter.cs
- GACMembershipCondition.cs
- SequenceNumber.cs
- GlyphElement.cs
- InstanceData.cs
- DbConnectionFactory.cs
- ToolStripScrollButton.cs
- RegisterResponseInfo.cs
- HexParser.cs
- ExceptionValidationRule.cs
- TextEndOfSegment.cs
- EndpointAddressMessageFilter.cs
- TypeDescriptorFilterService.cs
- SmiEventSink.cs
- AttributeCollection.cs
- BitmapEffectGeneralTransform.cs
- SkewTransform.cs
- BuildProviderCollection.cs
- DataBoundControlActionList.cs