Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / Documents / FixedLineResult.cs / 1 / FixedLineResult.cs
//---------------------------------------------------------------------------- //// Copyright (C) 2004 by Microsoft Corporation. All rights reserved. // // // Description: // FixedLineResult represents a per-line layout info for a fixe page // // History: // 11/23/2004 - Zhenbin Xu (ZhenbinX) - Created. // //--------------------------------------------------------------------------- namespace System.Windows.Documents { using MS.Internal.Documents; using System; using System.Collections; using System.Diagnostics; using System.Globalization; //===================================================================== ////// FixedLineResult represents a per-line layout info for a fixe page /// internal sealed class FixedLineResult : IComparable { //------------------------------------------------------------------- // // Connstructors // //---------------------------------------------------------------------- #region Constructors internal FixedLineResult(FixedNode[] nodes, Rect layoutBox) { _nodes = nodes; _layoutBox = layoutBox; } #endregion Constructors //------------------------------------------------------------------- // // Public Methods // //---------------------------------------------------------------------- // IComparable Override public int CompareTo(object o) { if (o == null) { throw new ArgumentNullException("o"); } if (o.GetType() != typeof(FixedLineResult)) { throw new ArgumentException(SR.Get(SRID.UnexpectedParameterType, o.GetType(), typeof(FixedLineResult)), "o"); } FixedLineResult lineResult = (FixedLineResult)o; return this.BaseLine.CompareTo(lineResult.BaseLine); } #if DEBUG ////// Create a string representation of this object /// ///string - A string representation of this object public override string ToString() { return String.Format(CultureInfo.InvariantCulture, "FLR[{0}:{1}][{2}][{3}]", Start.ToString(), End.ToString(), BaseLine, _layoutBox); } #endif //-------------------------------------------------------------------- // // Public Properties // //--------------------------------------------------------------------- //-------------------------------------------------------------------- // // Public Events // //--------------------------------------------------------------------- //------------------------------------------------------------------- // // Internal Methods // //--------------------------------------------------------------------- //-------------------------------------------------------------------- // // Internal Properties // //--------------------------------------------------------------------- #region Internal Properties // internal FixedNode Start { get { return _nodes[0]; } } internal FixedNode End { get { return _nodes[_nodes.Length - 1]; } } internal FixedNode[] Nodes { get { return _nodes; } } internal double BaseLine { get { return _layoutBox.Bottom; } } internal Rect LayoutBox { get { return _layoutBox; } } #endregion Internal Properties //-------------------------------------------------------------------- // // Private Methods // //---------------------------------------------------------------------- #region Private Properties #endregion Private Properties //------------------------------------------------------------------- // // Private Fields // //---------------------------------------------------------------------- #region Private Fields private readonly FixedNode[] _nodes; private readonly Rect _layoutBox; // relative to page #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- //// Copyright (C) 2004 by Microsoft Corporation. All rights reserved. // // // Description: // FixedLineResult represents a per-line layout info for a fixe page // // History: // 11/23/2004 - Zhenbin Xu (ZhenbinX) - Created. // //--------------------------------------------------------------------------- namespace System.Windows.Documents { using MS.Internal.Documents; using System; using System.Collections; using System.Diagnostics; using System.Globalization; //===================================================================== ////// FixedLineResult represents a per-line layout info for a fixe page /// internal sealed class FixedLineResult : IComparable { //------------------------------------------------------------------- // // Connstructors // //---------------------------------------------------------------------- #region Constructors internal FixedLineResult(FixedNode[] nodes, Rect layoutBox) { _nodes = nodes; _layoutBox = layoutBox; } #endregion Constructors //------------------------------------------------------------------- // // Public Methods // //---------------------------------------------------------------------- // IComparable Override public int CompareTo(object o) { if (o == null) { throw new ArgumentNullException("o"); } if (o.GetType() != typeof(FixedLineResult)) { throw new ArgumentException(SR.Get(SRID.UnexpectedParameterType, o.GetType(), typeof(FixedLineResult)), "o"); } FixedLineResult lineResult = (FixedLineResult)o; return this.BaseLine.CompareTo(lineResult.BaseLine); } #if DEBUG ////// Create a string representation of this object /// ///string - A string representation of this object public override string ToString() { return String.Format(CultureInfo.InvariantCulture, "FLR[{0}:{1}][{2}][{3}]", Start.ToString(), End.ToString(), BaseLine, _layoutBox); } #endif //-------------------------------------------------------------------- // // Public Properties // //--------------------------------------------------------------------- //-------------------------------------------------------------------- // // Public Events // //--------------------------------------------------------------------- //------------------------------------------------------------------- // // Internal Methods // //--------------------------------------------------------------------- //-------------------------------------------------------------------- // // Internal Properties // //--------------------------------------------------------------------- #region Internal Properties // internal FixedNode Start { get { return _nodes[0]; } } internal FixedNode End { get { return _nodes[_nodes.Length - 1]; } } internal FixedNode[] Nodes { get { return _nodes; } } internal double BaseLine { get { return _layoutBox.Bottom; } } internal Rect LayoutBox { get { return _layoutBox; } } #endregion Internal Properties //-------------------------------------------------------------------- // // Private Methods // //---------------------------------------------------------------------- #region Private Properties #endregion Private Properties //------------------------------------------------------------------- // // Private Fields // //---------------------------------------------------------------------- #region Private Fields private readonly FixedNode[] _nodes; private readonly Rect _layoutBox; // relative to page #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
- ServiceProviders.cs
- DocumentApplication.cs
- DynamicPropertyReader.cs
- MarshalByRefObject.cs
- WebAdminConfigurationHelper.cs
- _RegBlobWebProxyDataBuilder.cs
- Transform3DGroup.cs
- ObjectStateFormatter.cs
- ToolboxItemFilterAttribute.cs
- HttpModuleActionCollection.cs
- Mapping.cs
- ProfileGroupSettingsCollection.cs
- FilterElement.cs
- IMembershipProvider.cs
- DataSourceCache.cs
- SecurityAppliedMessage.cs
- ElementUtil.cs
- SingleTagSectionHandler.cs
- XPathDocumentBuilder.cs
- InkPresenterAutomationPeer.cs
- EditorPartDesigner.cs
- ImageConverter.cs
- ProxyWebPart.cs
- XmlDataCollection.cs
- TablePatternIdentifiers.cs
- Converter.cs
- XamlContextStack.cs
- ConfigXmlText.cs
- XmlValueConverter.cs
- StylusSystemGestureEventArgs.cs
- ServiceMoniker.cs
- GetUserPreferenceRequest.cs
- OpenTypeCommon.cs
- RectAnimationBase.cs
- DebugViewWriter.cs
- RecordBuilder.cs
- CacheAxisQuery.cs
- RangeContentEnumerator.cs
- ConstraintConverter.cs
- Expression.cs
- GeometryDrawing.cs
- EndpointAddressElementBase.cs
- InputReport.cs
- PolicyStatement.cs
- UnsafeNativeMethods.cs
- SmtpTransport.cs
- documentsequencetextcontainer.cs
- BindableTemplateBuilder.cs
- ComponentConverter.cs
- SmtpNtlmAuthenticationModule.cs
- GroupByQueryOperator.cs
- RankException.cs
- DataGridPageChangedEventArgs.cs
- DataSourceUtil.cs
- PhysicalOps.cs
- MetafileHeader.cs
- QueryCacheManager.cs
- OleTxTransaction.cs
- InfoCardTrace.cs
- FontUnitConverter.cs
- FixedDocumentSequencePaginator.cs
- SimpleType.cs
- EqualityComparer.cs
- xdrvalidator.cs
- DataGridViewCellCancelEventArgs.cs
- StructuredTypeInfo.cs
- Section.cs
- XmlLanguage.cs
- XmlSchemaGroupRef.cs
- BaseEntityWrapper.cs
- ParserContext.cs
- HttpClientCertificate.cs
- PolicyReader.cs
- KeyedCollection.cs
- NavigationProgressEventArgs.cs
- NativeMethods.cs
- PageHandlerFactory.cs
- IntegerValidator.cs
- IndentTextWriter.cs
- CheckBox.cs
- XmlWriter.cs
- InternalConfirm.cs
- ImageInfo.cs
- RoutedEventHandlerInfo.cs
- InsufficientMemoryException.cs
- TdsParserSessionPool.cs
- TraceLog.cs
- EntityTypeEmitter.cs
- DbBuffer.cs
- ObjectReferenceStack.cs
- RightsManagementEncryptionTransform.cs
- ViewGenResults.cs
- TabControlAutomationPeer.cs
- SqlRecordBuffer.cs
- CacheOutputQuery.cs
- ToolboxComponentsCreatedEventArgs.cs
- FunctionImportElement.cs
- ParameterBinding.cs
- DependentList.cs
- FontDifferentiator.cs