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
- BindingsCollection.cs
- TransactionScopeDesigner.cs
- HeaderCollection.cs
- BooleanKeyFrameCollection.cs
- EntityStoreSchemaGenerator.cs
- PointAnimationBase.cs
- ApplicationSettingsBase.cs
- SimpleHandlerBuildProvider.cs
- DPTypeDescriptorContext.cs
- SymLanguageType.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- PenLineJoinValidation.cs
- ColorConvertedBitmap.cs
- UserThread.cs
- lengthconverter.cs
- DrawingDrawingContext.cs
- Models.cs
- CqlGenerator.cs
- WebFormsRootDesigner.cs
- DataGridTable.cs
- input.cs
- QueueException.cs
- SafeCertificateContext.cs
- OdbcCommandBuilder.cs
- ConstNode.cs
- CodeAttributeDeclaration.cs
- Attributes.cs
- NonBatchDirectoryCompiler.cs
- ReflectionTypeLoadException.cs
- GeometryHitTestResult.cs
- ComponentSerializationService.cs
- InertiaRotationBehavior.cs
- LazyTextWriterCreator.cs
- QuadraticBezierSegment.cs
- httpserverutility.cs
- CapabilitiesState.cs
- ResizeGrip.cs
- DynamicDataRoute.cs
- AuthStoreRoleProvider.cs
- ClaimTypeElementCollection.cs
- ConfigurationManagerInternal.cs
- Query.cs
- DbBuffer.cs
- TextParagraphProperties.cs
- DataGridBoundColumn.cs
- DataGridViewSelectedCellCollection.cs
- TriggerActionCollection.cs
- Document.cs
- Byte.cs
- ListViewUpdatedEventArgs.cs
- WorkflowMarkupSerializerMapping.cs
- ResourceDictionaryCollection.cs
- SqlDataSourceStatusEventArgs.cs
- IntranetCredentialPolicy.cs
- PrintDialog.cs
- FrameworkObject.cs
- BaseParagraph.cs
- ItemsControlAutomationPeer.cs
- __ConsoleStream.cs
- EntitySetBase.cs
- SchemaElementDecl.cs
- RangeContentEnumerator.cs
- CornerRadiusConverter.cs
- EntityDataSourceChangingEventArgs.cs
- BatchWriter.cs
- LongCountAggregationOperator.cs
- Margins.cs
- PeerPresenceInfo.cs
- RolePrincipal.cs
- DataServiceQueryOfT.cs
- DiscreteKeyFrames.cs
- CompressionTracing.cs
- CompositeScriptReference.cs
- SessionSwitchEventArgs.cs
- PieceDirectory.cs
- DeclarationUpdate.cs
- InternalBufferOverflowException.cs
- TemplateInstanceAttribute.cs
- SqlUDTStorage.cs
- MarginCollapsingState.cs
- ClientUriBehavior.cs
- DiscardableAttribute.cs
- IdnMapping.cs
- MetabaseServerConfig.cs
- XmlSerializerSection.cs
- WindowHelperService.cs
- EventManager.cs
- Nodes.cs
- ComplusEndpointConfigContainer.cs
- OperandQuery.cs
- RemoveStoryboard.cs
- Geometry3D.cs
- AutomationElementIdentifiers.cs
- CallTemplateAction.cs
- HtmlMobileTextWriter.cs
- CodeCatchClauseCollection.cs
- ActivationArguments.cs
- ProgressBarRenderer.cs
- UseLicense.cs
- CustomValidator.cs