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 / RtfFormatStack.cs / 1 / 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
- HtmlTableCellCollection.cs
- WindowsListView.cs
- XPathAxisIterator.cs
- SessionViewState.cs
- BuilderPropertyEntry.cs
- ValidatingPropertiesEventArgs.cs
- HtmlPageAdapter.cs
- ObjectListField.cs
- BulletDecorator.cs
- PingOptions.cs
- JoinTreeNode.cs
- WebEventCodes.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- EncoderExceptionFallback.cs
- CalendarButtonAutomationPeer.cs
- SoapSchemaImporter.cs
- XmlMembersMapping.cs
- Group.cs
- sqlmetadatafactory.cs
- DataGridToolTip.cs
- XmlNavigatorStack.cs
- FindCriteriaApril2005.cs
- IssuanceLicense.cs
- RedirectionProxy.cs
- StaticContext.cs
- InfoCardSymmetricCrypto.cs
- Table.cs
- ContextMenu.cs
- DocumentSequence.cs
- Application.cs
- ParserStack.cs
- HashAlgorithm.cs
- GridViewColumnCollection.cs
- TableAdapterManagerGenerator.cs
- AnimationTimeline.cs
- TypeInfo.cs
- VideoDrawing.cs
- AttributeData.cs
- CfgSemanticTag.cs
- ExtensionDataReader.cs
- EdmProperty.cs
- SafeBitVector32.cs
- WindowInteropHelper.cs
- BrowserCapabilitiesFactory.cs
- GenericIdentity.cs
- TextEditorParagraphs.cs
- WebScriptServiceHostFactory.cs
- StateWorkerRequest.cs
- Hashtable.cs
- NaturalLanguageHyphenator.cs
- SortFieldComparer.cs
- Page.cs
- ResXBuildProvider.cs
- DirectionalLight.cs
- InvalidBodyAccessException.cs
- DispatchWrapper.cs
- CodeDomConfigurationHandler.cs
- TriggerAction.cs
- WorkflowInstance.cs
- ExpressionNode.cs
- PortCache.cs
- RelativeSource.cs
- CollectionBase.cs
- PreviewPrintController.cs
- PageVisual.cs
- Control.cs
- XComponentModel.cs
- HwndSubclass.cs
- HelpKeywordAttribute.cs
- GeneralTransformCollection.cs
- PipeStream.cs
- DesignOnlyAttribute.cs
- ToolBar.cs
- ILGen.cs
- WindowAutomationPeer.cs
- Message.cs
- WmpBitmapEncoder.cs
- BitmapFrameEncode.cs
- TreeNodeStyle.cs
- AudioDeviceOut.cs
- XmlHierarchicalEnumerable.cs
- InlineUIContainer.cs
- SimpleFileLog.cs
- WebPartZone.cs
- SafeRegistryHandle.cs
- BaseParagraph.cs
- XslAstAnalyzer.cs
- HandlerWithFactory.cs
- AmbiguousMatchException.cs
- _SSPISessionCache.cs
- objectresult_tresulttype.cs
- XamlTemplateSerializer.cs
- TableLayoutRowStyleCollection.cs
- ListManagerBindingsCollection.cs
- GB18030Encoding.cs
- AQNBuilder.cs
- ApplicationServiceHelper.cs
- MenuItemStyleCollectionEditor.cs
- IntSecurity.cs
- CodeMemberField.cs