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
- Process.cs
- SetMemberBinder.cs
- TreeNodeBinding.cs
- BindableAttribute.cs
- XPathDocumentBuilder.cs
- AuthenticateEventArgs.cs
- SoapMessage.cs
- SafeHandle.cs
- RedistVersionInfo.cs
- ModelUIElement3D.cs
- MenuEventArgs.cs
- ReflectEventDescriptor.cs
- ImageAttributes.cs
- TreeNodeStyle.cs
- OpenTypeLayoutCache.cs
- GeometryCollection.cs
- Certificate.cs
- Publisher.cs
- ManipulationPivot.cs
- HebrewNumber.cs
- DefaultBinder.cs
- SelectionProcessor.cs
- FilterElement.cs
- HttpProfileBase.cs
- hresults.cs
- PaperSize.cs
- SqlBuffer.cs
- Codec.cs
- DataServiceQueryProvider.cs
- Vector3DConverter.cs
- FixedSOMTableRow.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- BrowserDefinition.cs
- SpecialFolderEnumConverter.cs
- DataTableNewRowEvent.cs
- ActivityWithResult.cs
- PolyLineSegmentFigureLogic.cs
- Listener.cs
- ScopelessEnumAttribute.cs
- DbException.cs
- ComponentResourceKey.cs
- LogSwitch.cs
- DrawingGroup.cs
- COM2EnumConverter.cs
- LambdaCompiler.Logical.cs
- LayoutEditorPart.cs
- Ray3DHitTestResult.cs
- SoapElementAttribute.cs
- ValidationHelper.cs
- XmlParserContext.cs
- DynamicMethod.cs
- SQLSingle.cs
- ListBoxItem.cs
- PixelShader.cs
- TreeViewHitTestInfo.cs
- ArgumentNullException.cs
- NumericUpDownAcceleration.cs
- ImmutableCommunicationTimeouts.cs
- BaseUriHelper.cs
- ServiceHost.cs
- AllMembershipCondition.cs
- SymLanguageType.cs
- TextBoxBase.cs
- SqlCacheDependency.cs
- TimelineCollection.cs
- PolyQuadraticBezierSegment.cs
- SystemIcmpV6Statistics.cs
- ControlPaint.cs
- DesignerTextViewAdapter.cs
- SynchronousChannel.cs
- EntityObject.cs
- ScrollBarRenderer.cs
- HebrewCalendar.cs
- CodeStatement.cs
- CodeNamespaceCollection.cs
- ColorTranslator.cs
- AuthenticationSection.cs
- AuthenticateEventArgs.cs
- HashHelper.cs
- EditCommandColumn.cs
- EditorAttributeInfo.cs
- Aggregates.cs
- DataSourceUtil.cs
- CultureSpecificStringDictionary.cs
- URIFormatException.cs
- ConnectionStringsExpressionEditor.cs
- EventProviderWriter.cs
- ReadOnlyTernaryTree.cs
- WindowsFormsLinkLabel.cs
- PenThreadWorker.cs
- ReadOnlyDictionary.cs
- DetailsViewUpdateEventArgs.cs
- PlainXmlWriter.cs
- XmlSchema.cs
- MessageBuffer.cs
- BulletChrome.cs
- ObjectDisposedException.cs
- basevalidator.cs
- OutputCacheEntry.cs
- EasingKeyFrames.cs