Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- StylusOverProperty.cs
- ScriptDescriptor.cs
- Calendar.cs
- PropertyPathWorker.cs
- SqlWorkflowInstanceStoreLock.cs
- WebAdminConfigurationHelper.cs
- FSWPathEditor.cs
- XmlSchemaSequence.cs
- RegexCode.cs
- CryptoSession.cs
- SchemaImporterExtensionsSection.cs
- GridViewColumnCollection.cs
- TypeCacheManager.cs
- Funcletizer.cs
- StreamUpdate.cs
- SafeRightsManagementEnvironmentHandle.cs
- WebPartConnectionsConnectVerb.cs
- LocalizationComments.cs
- ToolStripLabel.cs
- ConstraintConverter.cs
- DataServiceClientException.cs
- GradientStopCollection.cs
- ScriptResourceAttribute.cs
- DataGridViewRowConverter.cs
- Privilege.cs
- BinaryKeyIdentifierClause.cs
- DPCustomTypeDescriptor.cs
- ApplicationHost.cs
- CompiledRegexRunner.cs
- FileStream.cs
- ThreadAbortException.cs
- TextTreeText.cs
- TextElement.cs
- ColorBlend.cs
- RemoteWebConfigurationHostStream.cs
- EncodingDataItem.cs
- SplashScreen.cs
- GenericAuthenticationEventArgs.cs
- AppSettingsReader.cs
- SQLDateTimeStorage.cs
- WeakRefEnumerator.cs
- FormsAuthentication.cs
- HtmlInputButton.cs
- Timeline.cs
- InvokeMethod.cs
- NamedPipeTransportSecurity.cs
- AutoCompleteStringCollection.cs
- WebPartsPersonalizationAuthorization.cs
- OLEDB_Enum.cs
- PagerSettings.cs
- DataGridRow.cs
- NonParentingControl.cs
- TypeUsageBuilder.cs
- ApplicationDirectory.cs
- FlowDocumentView.cs
- HashUtility.cs
- WorkerRequest.cs
- LogEntry.cs
- ConfigPathUtility.cs
- webeventbuffer.cs
- ClientType.cs
- PerformanceCounterCategory.cs
- ComNativeDescriptor.cs
- JpegBitmapEncoder.cs
- ScrollEvent.cs
- Label.cs
- XNodeNavigator.cs
- PrintEvent.cs
- WebPartEditVerb.cs
- RecordBuilder.cs
- DataTableTypeConverter.cs
- TextWriterTraceListener.cs
- DesignerActionListCollection.cs
- DataBoundControl.cs
- QuaternionRotation3D.cs
- CodeMemberProperty.cs
- XsdDuration.cs
- ScopeElement.cs
- RequestUriProcessor.cs
- DisplayMemberTemplateSelector.cs
- _NegoStream.cs
- ListViewItem.cs
- XamlValidatingReader.cs
- RelationshipFixer.cs
- VirtualPath.cs
- SizeConverter.cs
- ActionItem.cs
- ClientCredentialsSecurityTokenManager.cs
- NameObjectCollectionBase.cs
- XmlSchemaSimpleContentRestriction.cs
- HebrewNumber.cs
- SystemWebCachingSectionGroup.cs
- elementinformation.cs
- UrlPath.cs
- Stylesheet.cs
- CharUnicodeInfo.cs
- StateMachine.cs
- DynamicAttribute.cs
- OutputCacheModule.cs
- DataGridViewComboBoxCell.cs