Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Documents / RtfFormatStack.cs / 1305600 / RtfFormatStack.cs
//---------------------------------------------------------------------------- // // File: RtfFormatStack.cs // // Copyright (C) Microsoft Corporation. All rights reserved. // // Description: Rtf format stack. // //--------------------------------------------------------------------------- using System.Collections; using MS.Internal; // Invariant namespace System.Windows.Documents { ////// RtfFormatStack /// internal class RtfFormatStack : ArrayList { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors internal RtfFormatStack() : base(20) { } #endregion Constructors //------------------------------------------------------ // // Internal Methods // //----------------------------------------------------- #region Internal Methods internal void Push() { FormatState previousFormatState = Top(); FormatState formatState; formatState = previousFormatState != null ? new FormatState(previousFormatState) : new FormatState(); Add(formatState); } internal void Pop() { Invariant.Assert(Count != 0); if (Count > 0) { RemoveAt(Count - 1); } } internal FormatState Top() { return Count > 0 ? EntryAt(Count - 1) : null; } internal FormatState PrevTop(int fromTop) { int index = Count - 1 - fromTop; if (index < 0 || index >= Count) { return null; } return EntryAt(index); } internal FormatState EntryAt(int index) { return (FormatState)this[index]; } #endregion Internal Methods } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // // File: RtfFormatStack.cs // // Copyright (C) Microsoft Corporation. All rights reserved. // // Description: Rtf format stack. // //--------------------------------------------------------------------------- using System.Collections; using MS.Internal; // Invariant namespace System.Windows.Documents { ////// RtfFormatStack /// internal class RtfFormatStack : ArrayList { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors internal RtfFormatStack() : base(20) { } #endregion Constructors //------------------------------------------------------ // // Internal Methods // //----------------------------------------------------- #region Internal Methods internal void Push() { FormatState previousFormatState = Top(); FormatState formatState; formatState = previousFormatState != null ? new FormatState(previousFormatState) : new FormatState(); Add(formatState); } internal void Pop() { Invariant.Assert(Count != 0); if (Count > 0) { RemoveAt(Count - 1); } } internal FormatState Top() { return Count > 0 ? EntryAt(Count - 1) : null; } internal FormatState PrevTop(int fromTop) { int index = Count - 1 - fromTop; if (index < 0 || index >= Count) { return null; } return EntryAt(index); } internal FormatState EntryAt(int index) { return (FormatState)this[index]; } #endregion Internal Methods } } // 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
- EncodingNLS.cs
- HandlerWithFactory.cs
- DataQuery.cs
- Descriptor.cs
- DebugView.cs
- ProviderCommandInfoUtils.cs
- Quaternion.cs
- CheckBoxList.cs
- HyperLink.cs
- ProfileEventArgs.cs
- KeyTimeConverter.cs
- AssemblyUtil.cs
- Attributes.cs
- ProjectionCamera.cs
- TextDecoration.cs
- QuotedPrintableStream.cs
- DelegateArgument.cs
- FrameworkTextComposition.cs
- FullTextState.cs
- XNameConverter.cs
- SqlProviderUtilities.cs
- FontStyles.cs
- IRCollection.cs
- CompiledELinqQueryState.cs
- RequestFactory.cs
- CustomAttribute.cs
- WebPartUtil.cs
- CharKeyFrameCollection.cs
- RSATokenProvider.cs
- NameValuePair.cs
- FixedTextSelectionProcessor.cs
- InternalDispatchObject.cs
- CalendarDay.cs
- PassportAuthentication.cs
- Page.cs
- WeakHashtable.cs
- MsmqChannelFactory.cs
- XamlStyleSerializer.cs
- GradientBrush.cs
- InvalidateEvent.cs
- ContractCodeDomInfo.cs
- XmlDocumentSerializer.cs
- XmlSchemaAttribute.cs
- IntegerCollectionEditor.cs
- ReferencedCollectionType.cs
- SelectedGridItemChangedEvent.cs
- XmlSchemaComplexContent.cs
- ComponentEvent.cs
- SocketConnection.cs
- NativeCompoundFileAPIs.cs
- AstTree.cs
- HtmlControlPersistable.cs
- Activator.cs
- JournalEntryListConverter.cs
- WebHttpBinding.cs
- AnimatedTypeHelpers.cs
- PersonalizationState.cs
- ReflectPropertyDescriptor.cs
- ViewLoader.cs
- VisualTransition.cs
- ObjectHandle.cs
- ResourcesBuildProvider.cs
- HandlerBase.cs
- CatchDesigner.xaml.cs
- AutoGeneratedFieldProperties.cs
- DisposableCollectionWrapper.cs
- DBDataPermissionAttribute.cs
- StringCollectionMarkupSerializer.cs
- FormsIdentity.cs
- FormatterServices.cs
- CheckoutException.cs
- TextProperties.cs
- SafeEventLogWriteHandle.cs
- StatusBar.cs
- WorkflowApplication.cs
- MenuEventArgs.cs
- SelectiveScrollingGrid.cs
- QilLoop.cs
- SafeFindHandle.cs
- ObjectNavigationPropertyMapping.cs
- SelectionService.cs
- DbConnectionClosed.cs
- PanelStyle.cs
- Condition.cs
- RewritingSimplifier.cs
- MultipartContentParser.cs
- BrowserCapabilitiesCompiler.cs
- DocumentSequenceHighlightLayer.cs
- ObjectSet.cs
- XmlCharCheckingWriter.cs
- ObjectDataSourceFilteringEventArgs.cs
- DbgCompiler.cs
- MDIControlStrip.cs
- InputBindingCollection.cs
- TransformerInfoCollection.cs
- ProgressPage.cs
- TimersDescriptionAttribute.cs
- TripleDESCryptoServiceProvider.cs
- MenuItemStyle.cs
- ExpressionBinding.cs