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 / 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
- DynamicControl.cs
- AvTraceFormat.cs
- parserscommon.cs
- Base64Stream.cs
- ResourceDictionaryCollection.cs
- DefaultPropertiesToSend.cs
- SoapAttributeAttribute.cs
- HtmlWindowCollection.cs
- MaskedTextProvider.cs
- SettingsContext.cs
- SqlSupersetValidator.cs
- RegexCapture.cs
- EntityModelBuildProvider.cs
- LineBreakRecord.cs
- XmlFormatReaderGenerator.cs
- MouseGestureValueSerializer.cs
- Polygon.cs
- BlockExpression.cs
- DataRecordInternal.cs
- cryptoapiTransform.cs
- LinearGradientBrush.cs
- IntSecurity.cs
- WebDisplayNameAttribute.cs
- MouseGestureConverter.cs
- COM2ColorConverter.cs
- IndexedString.cs
- TextRangeAdaptor.cs
- WebPartMenuStyle.cs
- AutomationIdentifierGuids.cs
- ForwardPositionQuery.cs
- HebrewCalendar.cs
- odbcmetadatacolumnnames.cs
- ProtocolsSection.cs
- LinqDataSourceEditData.cs
- SemanticAnalyzer.cs
- Connection.cs
- InteropExecutor.cs
- glyphs.cs
- CodeTypeReference.cs
- TaiwanLunisolarCalendar.cs
- MessageSecurityVersion.cs
- CodeRemoveEventStatement.cs
- XmlFileEditor.cs
- ProcessModelSection.cs
- ISO2022Encoding.cs
- SelectedGridItemChangedEvent.cs
- WmlValidatorAdapter.cs
- DirectionalAction.cs
- DocumentSequenceHighlightLayer.cs
- TiffBitmapEncoder.cs
- BitmapInitialize.cs
- TextTreeDeleteContentUndoUnit.cs
- _TimerThread.cs
- FullTextBreakpoint.cs
- StaticFileHandler.cs
- StorageMappingFragment.cs
- TraceEventCache.cs
- ItemList.cs
- DocumentViewerBase.cs
- ParameterInfo.cs
- ParentQuery.cs
- StylusSystemGestureEventArgs.cs
- AvTraceFormat.cs
- MarkupProperty.cs
- SecurityState.cs
- TrackingLocation.cs
- ProcessHostConfigUtils.cs
- SolidBrush.cs
- GlobalItem.cs
- ComAdminInterfaces.cs
- IDictionary.cs
- SpotLight.cs
- TextEditorLists.cs
- OpCodes.cs
- CalendarSelectionChangedEventArgs.cs
- StringConverter.cs
- TrustLevel.cs
- XmlSerializableReader.cs
- SqlDataAdapter.cs
- EmbeddedMailObject.cs
- KnownBoxes.cs
- BitmapSourceSafeMILHandle.cs
- DBConnectionString.cs
- BindToObject.cs
- DataGridCell.cs
- ProfilePropertySettingsCollection.cs
- QilTypeChecker.cs
- SocketAddress.cs
- WsdlInspector.cs
- PagedDataSource.cs
- TypeBuilder.cs
- UInt64.cs
- ClientConfigPaths.cs
- LocalizabilityAttribute.cs
- NotifyParentPropertyAttribute.cs
- SelectionChangedEventArgs.cs
- XmlAttributeCollection.cs
- CodeRemoveEventStatement.cs
- OleDbConnectionInternal.cs
- EmbeddedMailObject.cs