Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- DataGrid.cs
- DataGridViewCellCancelEventArgs.cs
- SmiGettersStream.cs
- ForeignKeyConstraint.cs
- ProxyWebPartManager.cs
- OdbcParameter.cs
- FlowDocumentPaginator.cs
- CodeSpit.cs
- ComponentDispatcherThread.cs
- ToolboxComponentsCreatingEventArgs.cs
- HMACSHA512.cs
- BitmapEffectState.cs
- ByteAnimationUsingKeyFrames.cs
- PreviewPrintController.cs
- Image.cs
- TaskForm.cs
- CodeArgumentReferenceExpression.cs
- TabPanel.cs
- ImpersonationContext.cs
- ZeroOpNode.cs
- ConnectionStringSettings.cs
- TypeInitializationException.cs
- UniqueSet.cs
- ReadOnlyHierarchicalDataSourceView.cs
- GridViewColumnHeader.cs
- TextDpi.cs
- InterleavedZipPartStream.cs
- SelectionPatternIdentifiers.cs
- FileNotFoundException.cs
- WebPartMovingEventArgs.cs
- CaseCqlBlock.cs
- SecurityUniqueId.cs
- DocobjHost.cs
- AlternateViewCollection.cs
- BypassElement.cs
- PriorityBinding.cs
- PropertyMetadata.cs
- QilList.cs
- ClockGroup.cs
- StatusBar.cs
- GridEntry.cs
- PolicyManager.cs
- MemberDescriptor.cs
- typedescriptorpermission.cs
- WorkflowServiceNamespace.cs
- DbModificationCommandTree.cs
- CodeIndexerExpression.cs
- BitmapScalingModeValidation.cs
- KeyValuePair.cs
- DesignerTransaction.cs
- Win32Interop.cs
- _NegoStream.cs
- OracleCommand.cs
- SimpleRecyclingCache.cs
- FindCriteriaApril2005.cs
- GeneralTransformCollection.cs
- HttpCapabilitiesBase.cs
- RegexTree.cs
- CommandDevice.cs
- TraceHandler.cs
- ManagementDateTime.cs
- precedingsibling.cs
- XamlToRtfWriter.cs
- ParameterRetriever.cs
- RelativeSource.cs
- SynchronizedInputAdaptor.cs
- ConfigXmlWhitespace.cs
- AssertFilter.cs
- DataBindingExpressionBuilder.cs
- mansign.cs
- AnalyzedTree.cs
- FileFormatException.cs
- HwndHost.cs
- XmlSchemaAll.cs
- DbMetaDataCollectionNames.cs
- UserControl.cs
- HtmlTable.cs
- FormParameter.cs
- DataGridViewColumnHeaderCell.cs
- ProcessHostConfigUtils.cs
- WebAdminConfigurationHelper.cs
- DBConcurrencyException.cs
- AliasGenerator.cs
- EdgeProfileValidation.cs
- SQLDoubleStorage.cs
- DynamicScriptObject.cs
- RefType.cs
- XamlGridLengthSerializer.cs
- RecognizerInfo.cs
- _AuthenticationState.cs
- SplitContainer.cs
- ObjectViewListener.cs
- DataControlReference.cs
- CompilerCollection.cs
- DataGridViewRow.cs
- ParsedAttributeCollection.cs
- StructuredCompositeActivityDesigner.cs
- ClientBuildManager.cs
- XmlSerializationWriter.cs
- RegistrySecurity.cs