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
- WinFormsSpinner.cs
- PageSetupDialog.cs
- ClientUrlResolverWrapper.cs
- storagemappingitemcollection.viewdictionary.cs
- DBConcurrencyException.cs
- InvalidCommandTreeException.cs
- JsonSerializer.cs
- Matrix3DConverter.cs
- LineProperties.cs
- ServiceHttpHandlerFactory.cs
- ProcessThreadCollection.cs
- XamlSerializer.cs
- Event.cs
- SurrogateDataContract.cs
- Subset.cs
- OracleDateTime.cs
- HttpHandlerActionCollection.cs
- BufferAllocator.cs
- SapiGrammar.cs
- ImportContext.cs
- SetIndexBinder.cs
- DataBoundLiteralControl.cs
- ListenerSessionConnectionReader.cs
- UnmanagedHandle.cs
- FileLogRecordStream.cs
- EventProviderTraceListener.cs
- ObjectHandle.cs
- Nullable.cs
- RepeaterItem.cs
- DictionaryKeyPropertyAttribute.cs
- DataBindingValueUIHandler.cs
- LassoSelectionBehavior.cs
- VScrollBar.cs
- Highlights.cs
- Currency.cs
- AvTraceDetails.cs
- XsltContext.cs
- FontInfo.cs
- SQLRoleProvider.cs
- TargetControlTypeAttribute.cs
- ReadOnlyCollectionBase.cs
- ToolBar.cs
- HMACRIPEMD160.cs
- Axis.cs
- StackBuilderSink.cs
- NGCSerializationManager.cs
- GeometryValueSerializer.cs
- PasswordDeriveBytes.cs
- RequiredFieldValidator.cs
- ComMethodElementCollection.cs
- StylusPointPropertyId.cs
- FixedElement.cs
- PaintEvent.cs
- HierarchicalDataBoundControl.cs
- LayoutTable.cs
- CollectionMarkupSerializer.cs
- x509utils.cs
- Int32Storage.cs
- PreviousTrackingServiceAttribute.cs
- ExecutionContext.cs
- SerializationObjectManager.cs
- DrawingContext.cs
- SQLDoubleStorage.cs
- ReflectionHelper.cs
- FormsAuthenticationUser.cs
- MultiPageTextView.cs
- RadioButtonPopupAdapter.cs
- WindowsIdentity.cs
- ConfigXmlElement.cs
- XmlCollation.cs
- XmlDocumentType.cs
- ToolStripLabel.cs
- AppliedDeviceFiltersEditor.cs
- XPathChildIterator.cs
- TypeExtensions.cs
- PersonalizableAttribute.cs
- KoreanCalendar.cs
- ProtocolViolationException.cs
- Vector.cs
- PropertyDescriptorGridEntry.cs
- FlowLayout.cs
- DataGridViewTextBoxCell.cs
- rsa.cs
- VisualStyleElement.cs
- DetailsViewRowCollection.cs
- filewebrequest.cs
- DataServiceQueryOfT.cs
- XmlDeclaration.cs
- shaperfactoryquerycachekey.cs
- BaseComponentEditor.cs
- ListViewDeletedEventArgs.cs
- FormViewUpdateEventArgs.cs
- DataProviderNameConverter.cs
- SecUtil.cs
- ExceptionUtil.cs
- ProfileSettingsCollection.cs
- RawAppCommandInputReport.cs
- StateItem.cs
- TreeNodeBinding.cs
- TextRunProperties.cs