Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- UpWmlPageAdapter.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- HScrollBar.cs
- Console.cs
- OpCellTreeNode.cs
- SchemaSetCompiler.cs
- CompiledAction.cs
- SmtpLoginAuthenticationModule.cs
- HttpServerProtocol.cs
- Stroke.cs
- BitmapEffect.cs
- HybridObjectCache.cs
- TextTreeFixupNode.cs
- StreamGeometryContext.cs
- LinearGradientBrush.cs
- LinqDataSourceSelectEventArgs.cs
- WebRequest.cs
- SkinBuilder.cs
- ProgressBarRenderer.cs
- CompilerError.cs
- CompiledRegexRunnerFactory.cs
- WebConfigurationFileMap.cs
- _HeaderInfoTable.cs
- SelectorItemAutomationPeer.cs
- TraceHandlerErrorFormatter.cs
- ReflectionUtil.cs
- WindowsHyperlink.cs
- TrackingServices.cs
- Roles.cs
- MailSettingsSection.cs
- ExtenderProviderService.cs
- XamlBrushSerializer.cs
- BrowserCapabilitiesFactory.cs
- Brush.cs
- Tokenizer.cs
- TCPListener.cs
- Vector3DConverter.cs
- ControlsConfig.cs
- TrackBar.cs
- DoubleAnimationUsingPath.cs
- InstanceContext.cs
- SqlDataSourceStatusEventArgs.cs
- IntAverageAggregationOperator.cs
- DataContext.cs
- ProfileParameter.cs
- KeyTimeConverter.cs
- objectresult_tresulttype.cs
- MenuItemBinding.cs
- followingquery.cs
- HelpProvider.cs
- TimerEventSubscription.cs
- RightsManagementInformation.cs
- HtmlElementEventArgs.cs
- EntitySetBase.cs
- WebPartManagerInternals.cs
- SqlDependencyListener.cs
- wgx_sdk_version.cs
- LeaseManager.cs
- IpcClientManager.cs
- AdapterUtil.cs
- DataGridViewCellPaintingEventArgs.cs
- FixedSOMPageConstructor.cs
- XmlSchemaSubstitutionGroup.cs
- RefreshEventArgs.cs
- DecimalConstantAttribute.cs
- ProgressBarRenderer.cs
- AssemblyName.cs
- ViewCellRelation.cs
- SystemSounds.cs
- ScrollEvent.cs
- SortQuery.cs
- FlowPosition.cs
- DataChangedEventManager.cs
- ellipse.cs
- SerializerProvider.cs
- ConsoleCancelEventArgs.cs
- CanonicalXml.cs
- TypeCodeDomSerializer.cs
- PageParser.cs
- MetadataPropertyCollection.cs
- BaseDataListDesigner.cs
- ToolStripPanelRenderEventArgs.cs
- ReadOnlyHierarchicalDataSource.cs
- LassoSelectionBehavior.cs
- LineSegment.cs
- SecurityElement.cs
- RuntimeConfigLKG.cs
- RectangleGeometry.cs
- TargetException.cs
- InputScopeManager.cs
- DbConnectionPoolIdentity.cs
- sqlstateclientmanager.cs
- X509ThumbprintKeyIdentifierClause.cs
- UIElementCollection.cs
- ListCollectionView.cs
- TextDecorationCollection.cs
- PublisherIdentityPermission.cs
- Root.cs
- ReflectEventDescriptor.cs
- BitmapFrameEncode.cs