Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- LocationSectionRecord.cs
- CheckBox.cs
- HandoffBehavior.cs
- FlowDocumentFormatter.cs
- ParserContext.cs
- InternalDispatchObject.cs
- _ContextAwareResult.cs
- SoapUnknownHeader.cs
- DeleteMemberBinder.cs
- messageonlyhwndwrapper.cs
- ObjectDataSourceEventArgs.cs
- SingleBodyParameterMessageFormatter.cs
- ElapsedEventArgs.cs
- MsmqIntegrationProcessProtocolHandler.cs
- ReflectionUtil.cs
- Compilation.cs
- ViewKeyConstraint.cs
- CheckBox.cs
- FileInfo.cs
- ConditionalAttribute.cs
- ToolStripItem.cs
- UserPreferenceChangedEventArgs.cs
- _HeaderInfo.cs
- CodeIdentifier.cs
- OneToOneMappingSerializer.cs
- TimeSpanStorage.cs
- EntityDataSourceWrapperCollection.cs
- NotificationContext.cs
- WrapPanel.cs
- EmptyEnumerable.cs
- PolicyException.cs
- Application.cs
- RoleGroupCollection.cs
- TextBoxAutomationPeer.cs
- StopStoryboard.cs
- JsonReaderDelegator.cs
- MarkupExtensionReturnTypeAttribute.cs
- ToolStripScrollButton.cs
- DataGridToolTip.cs
- QilReference.cs
- ContentElement.cs
- GeneratedCodeAttribute.cs
- DetailsViewInsertedEventArgs.cs
- ObjectQueryExecutionPlan.cs
- ComponentCodeDomSerializer.cs
- StorageRoot.cs
- GlyphShapingProperties.cs
- FixedHighlight.cs
- VersionedStream.cs
- CryptoConfig.cs
- HtmlGenericControl.cs
- Variable.cs
- StrongNamePublicKeyBlob.cs
- DataConnectionHelper.cs
- AttributeCollection.cs
- ProtocolsConfigurationEntry.cs
- ReferenceConverter.cs
- ZipIOExtraFieldPaddingElement.cs
- AttachedAnnotationChangedEventArgs.cs
- EntityCommandDefinition.cs
- EventLogPermission.cs
- ResetableIterator.cs
- FileUtil.cs
- TypeConverterHelper.cs
- ClientUtils.cs
- ScriptMethodAttribute.cs
- StringArrayConverter.cs
- PageThemeBuildProvider.cs
- BoundsDrawingContextWalker.cs
- StreamReader.cs
- WebPartMovingEventArgs.cs
- TreeViewItem.cs
- SqlNodeAnnotations.cs
- RawStylusInputReport.cs
- GridViewRowEventArgs.cs
- RawTextInputReport.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- ProxyManager.cs
- TransformGroup.cs
- Matrix3D.cs
- EntitySetBase.cs
- NetCodeGroup.cs
- FileInfo.cs
- XPathExpr.cs
- HashRepartitionStream.cs
- TextParagraphProperties.cs
- filewebrequest.cs
- PlainXmlSerializer.cs
- LingerOption.cs
- StylusPlugInCollection.cs
- DataGridColumn.cs
- PropertyTab.cs
- SerialPinChanges.cs
- Binding.cs
- XPathDocumentNavigator.cs
- ManagedCodeMarkers.cs
- TemplateAction.cs
- XhtmlStyleClass.cs
- XPathItem.cs
- RegistryPermission.cs