Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / Documents / StaticTextPointer.cs / 1 / StaticTextPointer.cs
//---------------------------------------------------------------------------- // // File: StaticTextPointer.cs // // Copyright (C) Microsoft Corporation. All rights reserved. // // Description: // //--------------------------------------------------------------------------- namespace System.Windows.Documents { using System; using MS.Internal; using System.Threading; using System.Windows; using System.Collections; internal struct StaticTextPointer { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors internal StaticTextPointer(ITextContainer textContainer, object handle0) : this(textContainer, handle0, 0) { } internal StaticTextPointer(ITextContainer textContainer, object handle0, int handle1) { _textContainer = textContainer; _handle0 = handle0; _handle1 = handle1; } #endregion Constructors //------------------------------------------------------ // // Internal Methods // //----------------------------------------------------- #region Internal Methods internal ITextPointer CreateDynamicTextPointer(LogicalDirection direction) { return _textContainer.CreateDynamicTextPointer(this, direction); } internal TextPointerContext GetPointerContext(LogicalDirection direction) { return _textContainer.GetPointerContext(this, direction); } internal int GetOffsetToPosition(StaticTextPointer position) { return _textContainer.GetOffsetToPosition(this, position); } internal int GetTextInRun(LogicalDirection direction, char[] textBuffer, int startIndex, int count) { return _textContainer.GetTextInRun(this, direction, textBuffer, startIndex, count); } internal object GetAdjacentElement(LogicalDirection direction) { return _textContainer.GetAdjacentElement(this, direction); } internal StaticTextPointer CreatePointer(int offset) { return _textContainer.CreatePointer(this, offset); } internal StaticTextPointer GetNextContextPosition(LogicalDirection direction) { return _textContainer.GetNextContextPosition(this, direction); } internal int CompareTo(StaticTextPointer position) { return _textContainer.CompareTo(this, position); } internal int CompareTo(ITextPointer position) { return _textContainer.CompareTo(this, position); } internal object GetValue(DependencyProperty formattingProperty) { return _textContainer.GetValue(this, formattingProperty); } internal static StaticTextPointer Min(StaticTextPointer position1, StaticTextPointer position2) { return position1.CompareTo(position2) <= 0 ? position1 : position2; } internal static StaticTextPointer Max(StaticTextPointer position1, StaticTextPointer position2) { return position1.CompareTo(position2) >= 0 ? position1 : position2; } #endregion Internal Methods //------------------------------------------------------ // // Internal Properties // //------------------------------------------------------ #region Internal Properties internal ITextContainer TextContainer { get { return _textContainer; } } internal DependencyObject Parent { get { return _textContainer.GetParent(this); } } internal bool IsNull { get { return (_textContainer == null); } } internal object Handle0 { get { return _handle0; } } internal int Handle1 { get { return _handle1; } } #endregion Internal Properties //----------------------------------------------------- // // Internal Fields // //------------------------------------------------------ #region Internal Fields internal static StaticTextPointer Null = new StaticTextPointer(null, null, 0); #endregion Internal Fields //----------------------------------------------------- // // Private Fields // //----------------------------------------------------- #region Private Fields private readonly ITextContainer _textContainer; private readonly object _handle0; private readonly int _handle1; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // File: StaticTextPointer.cs // // Copyright (C) Microsoft Corporation. All rights reserved. // // Description: // //--------------------------------------------------------------------------- namespace System.Windows.Documents { using System; using MS.Internal; using System.Threading; using System.Windows; using System.Collections; internal struct StaticTextPointer { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors internal StaticTextPointer(ITextContainer textContainer, object handle0) : this(textContainer, handle0, 0) { } internal StaticTextPointer(ITextContainer textContainer, object handle0, int handle1) { _textContainer = textContainer; _handle0 = handle0; _handle1 = handle1; } #endregion Constructors //------------------------------------------------------ // // Internal Methods // //----------------------------------------------------- #region Internal Methods internal ITextPointer CreateDynamicTextPointer(LogicalDirection direction) { return _textContainer.CreateDynamicTextPointer(this, direction); } internal TextPointerContext GetPointerContext(LogicalDirection direction) { return _textContainer.GetPointerContext(this, direction); } internal int GetOffsetToPosition(StaticTextPointer position) { return _textContainer.GetOffsetToPosition(this, position); } internal int GetTextInRun(LogicalDirection direction, char[] textBuffer, int startIndex, int count) { return _textContainer.GetTextInRun(this, direction, textBuffer, startIndex, count); } internal object GetAdjacentElement(LogicalDirection direction) { return _textContainer.GetAdjacentElement(this, direction); } internal StaticTextPointer CreatePointer(int offset) { return _textContainer.CreatePointer(this, offset); } internal StaticTextPointer GetNextContextPosition(LogicalDirection direction) { return _textContainer.GetNextContextPosition(this, direction); } internal int CompareTo(StaticTextPointer position) { return _textContainer.CompareTo(this, position); } internal int CompareTo(ITextPointer position) { return _textContainer.CompareTo(this, position); } internal object GetValue(DependencyProperty formattingProperty) { return _textContainer.GetValue(this, formattingProperty); } internal static StaticTextPointer Min(StaticTextPointer position1, StaticTextPointer position2) { return position1.CompareTo(position2) <= 0 ? position1 : position2; } internal static StaticTextPointer Max(StaticTextPointer position1, StaticTextPointer position2) { return position1.CompareTo(position2) >= 0 ? position1 : position2; } #endregion Internal Methods //------------------------------------------------------ // // Internal Properties // //------------------------------------------------------ #region Internal Properties internal ITextContainer TextContainer { get { return _textContainer; } } internal DependencyObject Parent { get { return _textContainer.GetParent(this); } } internal bool IsNull { get { return (_textContainer == null); } } internal object Handle0 { get { return _handle0; } } internal int Handle1 { get { return _handle1; } } #endregion Internal Properties //----------------------------------------------------- // // Internal Fields // //------------------------------------------------------ #region Internal Fields internal static StaticTextPointer Null = new StaticTextPointer(null, null, 0); #endregion Internal Fields //----------------------------------------------------- // // Private Fields // //----------------------------------------------------- #region Private Fields private readonly ITextContainer _textContainer; private readonly object _handle0; private readonly int _handle1; #endregion Private Fields } } // 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
- WorkflowQueue.cs
- DbDataSourceEnumerator.cs
- CodeDefaultValueExpression.cs
- AdapterUtil.cs
- DataGridViewColumnStateChangedEventArgs.cs
- CustomAttributeSerializer.cs
- Currency.cs
- DbParameterHelper.cs
- ResourceSet.cs
- DataGridViewRowCollection.cs
- ServerValidateEventArgs.cs
- GeometryHitTestResult.cs
- TextRange.cs
- WorkflowDebuggerSteppingAttribute.cs
- CompilerTypeWithParams.cs
- DeleteWorkflowOwnerCommand.cs
- TextServicesCompartment.cs
- DocumentViewerHelper.cs
- CryptoStream.cs
- xmlsaver.cs
- CodeExporter.cs
- SqlDelegatedTransaction.cs
- PrePostDescendentsWalker.cs
- FileDetails.cs
- WindowsToolbar.cs
- ErrorHandler.cs
- UriExt.cs
- AssemblyHash.cs
- ObjectSecurity.cs
- Pen.cs
- SingleObjectCollection.cs
- HtmlInputRadioButton.cs
- ContextStack.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- BitmapScalingModeValidation.cs
- FilterEventArgs.cs
- RequestQueue.cs
- CapabilitiesAssignment.cs
- ThreadExceptionEvent.cs
- ObjectCloneHelper.cs
- DayRenderEvent.cs
- XmlSerializerAssemblyAttribute.cs
- FileRecordSequenceHelper.cs
- SqlRetyper.cs
- WmiInstallComponent.cs
- Int32AnimationBase.cs
- ContextProperty.cs
- _emptywebproxy.cs
- StyleSelector.cs
- SymbolEqualComparer.cs
- KeySpline.cs
- SqlMethodCallConverter.cs
- TextTreeTextBlock.cs
- AutomationProperty.cs
- AttachedPropertyDescriptor.cs
- NullRuntimeConfig.cs
- DocumentReference.cs
- InheritanceUI.cs
- WebCategoryAttribute.cs
- TableItemStyle.cs
- XmlSchemaObject.cs
- FixedHighlight.cs
- DBSchemaTable.cs
- SizeAnimationClockResource.cs
- QuaternionConverter.cs
- DataBoundControlActionList.cs
- NamespaceList.cs
- LambdaCompiler.Generated.cs
- ControllableStoryboardAction.cs
- PenThreadWorker.cs
- ConstructorBuilder.cs
- linebase.cs
- ObjectQueryExecutionPlan.cs
- TreeNode.cs
- FolderBrowserDialog.cs
- TableCell.cs
- EventKeyword.cs
- SafeLocalMemHandle.cs
- FileUtil.cs
- XmlSchemaAny.cs
- HotSpot.cs
- XmlSchemaDocumentation.cs
- InputQueueChannelAcceptor.cs
- CryptoStream.cs
- Pool.cs
- ColumnHeader.cs
- WebPartTransformerAttribute.cs
- Process.cs
- DbMetaDataColumnNames.cs
- TabletDeviceInfo.cs
- CellParaClient.cs
- SecurityPolicyVersion.cs
- QueueException.cs
- ListSortDescriptionCollection.cs
- QueryResponse.cs
- SoapElementAttribute.cs
- Positioning.cs
- RawAppCommandInputReport.cs
- ExpressionTextBoxAutomationPeer.cs
- FileDataSourceCache.cs