Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- DataStreamFromComStream.cs
- NameValuePair.cs
- IPGlobalProperties.cs
- WorkItem.cs
- SqlCommandSet.cs
- GridViewUpdateEventArgs.cs
- HScrollBar.cs
- UInt64Storage.cs
- EdgeProfileValidation.cs
- ItemsPresenter.cs
- UnmanagedMemoryStream.cs
- CngUIPolicy.cs
- ObjectView.cs
- SafeCryptHandles.cs
- TextSearch.cs
- InplaceBitmapMetadataWriter.cs
- SHA384.cs
- UserMapPath.cs
- Emitter.cs
- ProjectionCamera.cs
- DataObjectPastingEventArgs.cs
- BitmapEffectGeneralTransform.cs
- SessionStateModule.cs
- UserControl.cs
- HwndMouseInputProvider.cs
- ForeignKeyFactory.cs
- WebResourceUtil.cs
- LineSegment.cs
- DragStartedEventArgs.cs
- TextComposition.cs
- RelatedView.cs
- CompilerWrapper.cs
- ColorConverter.cs
- RestClientProxyHandler.cs
- UIElement3D.cs
- ConfigurationPermission.cs
- DiscriminatorMap.cs
- XPathSelfQuery.cs
- SynchronizationContext.cs
- Point.cs
- PublishLicense.cs
- PersistenceIOParticipant.cs
- Baml2006ReaderFrame.cs
- FormsAuthentication.cs
- ITreeGenerator.cs
- ProvideValueServiceProvider.cs
- BinaryObjectWriter.cs
- DocumentPageView.cs
- DoubleAnimation.cs
- DataKey.cs
- AutomationPropertyInfo.cs
- HttpFormatExtensions.cs
- DesignTimeParseData.cs
- UmAlQuraCalendar.cs
- AssociatedControlConverter.cs
- StringFreezingAttribute.cs
- DataGridDesigner.cs
- serverconfig.cs
- PreProcessInputEventArgs.cs
- RichTextBox.cs
- FixedPageAutomationPeer.cs
- ContextDataSource.cs
- XPathNavigator.cs
- PinnedBufferMemoryStream.cs
- HttpListenerException.cs
- PerfService.cs
- ToolStripTextBox.cs
- SortFieldComparer.cs
- TraceContextEventArgs.cs
- SqlDataSourceCustomCommandEditor.cs
- DataGridViewTextBoxEditingControl.cs
- DbConnectionFactory.cs
- XmlObjectSerializerWriteContext.cs
- TypedTableBase.cs
- PersonalizableAttribute.cs
- LinqDataSource.cs
- TypeReference.cs
- WebPartCollection.cs
- PlatformNotSupportedException.cs
- ListBoxAutomationPeer.cs
- SignedPkcs7.cs
- FormViewInsertEventArgs.cs
- GetCryptoTransformRequest.cs
- Ipv6Element.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- GeneralTransformCollection.cs
- AttributeEmitter.cs
- LingerOption.cs
- HostedElements.cs
- Accessors.cs
- RepeatBehaviorConverter.cs
- ScriptManager.cs
- InvocationExpression.cs
- ViewManager.cs
- TreeViewItemAutomationPeer.cs
- PenLineCapValidation.cs
- Vector3DKeyFrameCollection.cs
- ToolboxDataAttribute.cs
- DeriveBytes.cs
- WindowsUpDown.cs