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
- PersonalizationProviderHelper.cs
- MultipleViewProviderWrapper.cs
- PkcsUtils.cs
- XmlNamespaceMapping.cs
- SqlCrossApplyToCrossJoin.cs
- Win32.cs
- AppLevelCompilationSectionCache.cs
- UiaCoreApi.cs
- RegexWriter.cs
- FormattedTextSymbols.cs
- _HelperAsyncResults.cs
- PeerApplication.cs
- StatusBarDrawItemEvent.cs
- AppSettingsReader.cs
- datacache.cs
- TaskFileService.cs
- OracleConnectionString.cs
- XmlSchemaType.cs
- GPRECTF.cs
- LinqDataSourceContextEventArgs.cs
- WebContext.cs
- PasswordBox.cs
- SchemaManager.cs
- DrawingAttributeSerializer.cs
- DateTimeSerializationSection.cs
- ToolStripPanelRenderEventArgs.cs
- PseudoWebRequest.cs
- HashMembershipCondition.cs
- Renderer.cs
- RecordConverter.cs
- MatchNoneMessageFilter.cs
- DomainUpDown.cs
- NumericUpDownAccelerationCollection.cs
- WebPartEditorApplyVerb.cs
- WinFormsSecurity.cs
- MenuItemAutomationPeer.cs
- WindowsListViewItemCheckBox.cs
- ActivitySurrogateSelector.cs
- InputLanguage.cs
- Oid.cs
- DataGridColumnCollection.cs
- Stack.cs
- SchemaCollectionPreprocessor.cs
- TypeConverterHelper.cs
- StringUtil.cs
- externdll.cs
- Nullable.cs
- GridPatternIdentifiers.cs
- SafeViewOfFileHandle.cs
- AudioLevelUpdatedEventArgs.cs
- DisplayNameAttribute.cs
- PerspectiveCamera.cs
- RemoveStoryboard.cs
- UriTemplateDispatchFormatter.cs
- TaskResultSetter.cs
- SystemTcpConnection.cs
- GeometryDrawing.cs
- SmtpDateTime.cs
- InvalidFilterCriteriaException.cs
- TextSelectionHelper.cs
- StrokeFIndices.cs
- SynthesizerStateChangedEventArgs.cs
- xmlfixedPageInfo.cs
- IERequestCache.cs
- QueryCacheEntry.cs
- TraceContext.cs
- SafeRightsManagementHandle.cs
- EnumType.cs
- SoundPlayer.cs
- ResourceProperty.cs
- FixedMaxHeap.cs
- RadialGradientBrush.cs
- XmlSchemaComplexContentRestriction.cs
- StreamInfo.cs
- RequestCacheEntry.cs
- MeshGeometry3D.cs
- Hex.cs
- BindingList.cs
- ColorTranslator.cs
- GenericWebPart.cs
- WinCategoryAttribute.cs
- Logging.cs
- DirectoryObjectSecurity.cs
- PatternMatchRules.cs
- QilValidationVisitor.cs
- JpegBitmapDecoder.cs
- EventLogPermissionEntry.cs
- URL.cs
- DefaultObjectMappingItemCollection.cs
- TextContainerHelper.cs
- XmlQueryStaticData.cs
- SemanticAnalyzer.cs
- TraceContextRecord.cs
- AsyncOperationContext.cs
- CompModSwitches.cs
- DefaultParameterValueAttribute.cs
- CodeTypeConstructor.cs
- AlternationConverter.cs
- basevalidator.cs
- UnsafeNativeMethods.cs