Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- Knowncolors.cs
- NodeLabelEditEvent.cs
- NumericUpDown.cs
- TimersDescriptionAttribute.cs
- OutputWindow.cs
- ResourceWriter.cs
- TextEditorTables.cs
- DataViewManagerListItemTypeDescriptor.cs
- SourceSwitch.cs
- RangeBaseAutomationPeer.cs
- WindowsTreeView.cs
- ContainerUIElement3D.cs
- AsymmetricAlgorithm.cs
- UserPrincipalNameElement.cs
- AppliedDeviceFiltersDialog.cs
- X509ChainPolicy.cs
- RuleSettingsCollection.cs
- UnsettableComboBox.cs
- HttpRequestBase.cs
- RequestContext.cs
- SiteMapDataSource.cs
- StylusPointPropertyInfoDefaults.cs
- FlagsAttribute.cs
- SqlReferenceCollection.cs
- FixedSOMPageConstructor.cs
- WebBrowser.cs
- PrimitiveXmlSerializers.cs
- EnumBuilder.cs
- MailMessageEventArgs.cs
- SafeIUnknown.cs
- FillErrorEventArgs.cs
- ListViewItem.cs
- HeaderLabel.cs
- Accessors.cs
- DefaultPrintController.cs
- OpenFileDialog.cs
- HandlerBase.cs
- EdmTypeAttribute.cs
- Size3DValueSerializer.cs
- VideoDrawing.cs
- Optimizer.cs
- ColorConverter.cs
- DecimalFormatter.cs
- ProcessModelSection.cs
- OdbcPermission.cs
- XmlSortKey.cs
- DataGridColumnCollection.cs
- Bitmap.cs
- ResourceProviderFactory.cs
- WsdlBuildProvider.cs
- SqlCaseSimplifier.cs
- SqlWebEventProvider.cs
- PermissionSetTriple.cs
- RegistryPermission.cs
- SelectionUIHandler.cs
- ModelPerspective.cs
- ComboBoxAutomationPeer.cs
- EntityDataSourceMemberPath.cs
- CodeRemoveEventStatement.cs
- Native.cs
- InstanceValue.cs
- BlurEffect.cs
- TracedNativeMethods.cs
- DoubleLinkListEnumerator.cs
- HttpListenerRequest.cs
- CqlParser.cs
- FormViewUpdatedEventArgs.cs
- Util.cs
- RunWorkerCompletedEventArgs.cs
- AppDomainGrammarProxy.cs
- X509PeerCertificateElement.cs
- XsltArgumentList.cs
- IResourceProvider.cs
- XmlDownloadManager.cs
- ScriptBehaviorDescriptor.cs
- WebPartConnectionsConfigureVerb.cs
- UIElementCollection.cs
- TransformedBitmap.cs
- PropertyPathWorker.cs
- Msec.cs
- BuildProvider.cs
- _RequestCacheProtocol.cs
- EncoderReplacementFallback.cs
- ScriptingRoleServiceSection.cs
- ComIntegrationManifestGenerator.cs
- ViewLoader.cs
- SudsCommon.cs
- BaseProcessProtocolHandler.cs
- UiaCoreProviderApi.cs
- future.cs
- EventToken.cs
- UnSafeCharBuffer.cs
- TrackingProfileDeserializationException.cs
- MappingModelBuildProvider.cs
- Trace.cs
- ipaddressinformationcollection.cs
- GraphicsPathIterator.cs
- EdmScalarPropertyAttribute.cs
- ListParaClient.cs
- EntityKeyElement.cs