// Token: 0x060034A1 RID: 13473 RVA: 0x000EA44C File Offset: 0x000E864C internal int FindPendingFrom(DocumentNodeType documentNodeType, int nStart, int nLow) { if (this._dnaOpen != null) { this._dnaOpen.CullOpen(); for (int i = this._dnaOpen.Count - 1; i >= 0; i--) { DocumentNode documentNode = this._dnaOpen.EntryAt(i); if (documentNode.Index <= nStart) { if (documentNode.Index <= nLow) { break; } if (documentNode.IsPending) { if (documentNode.Type == documentNodeType) { return(documentNode.Index); } if (documentNode.Type == DocumentNodeType.dnShape) { break; } } } } } return(-1); }
// Token: 0x06003499 RID: 13465 RVA: 0x000E9F60 File Offset: 0x000E8160 internal int CountOpenNodes(DocumentNodeType documentNodeType) { int num = 0; if (this._dnaOpen != null) { this._dnaOpen.CullOpen(); for (int i = this._dnaOpen.Count - 1; i >= 0; i--) { DocumentNode documentNode = this._dnaOpen.EntryAt(i); if (documentNode.IsPending) { if (documentNode.Type == documentNodeType) { num++; } else if (documentNode.Type == DocumentNodeType.dnShape) { break; } } } } return(num); }
// Token: 0x060034A4 RID: 13476 RVA: 0x000EA4E4 File Offset: 0x000E86E4 internal int FindUnmatched(DocumentNodeType dnType) { if (this._dnaOpen != null) { for (int i = this._dnaOpen.Count - 1; i >= 0; i--) { DocumentNode documentNode = this._dnaOpen.EntryAt(i); if (documentNode.Type == dnType && !documentNode.IsMatched) { return(documentNode.Index); } } } return(-1); }
internal int FindUnmatched(DocumentNodeType dnType) { if (_dnaOpen != null) { for (int i = _dnaOpen.Count - 1; i >= 0; i--) { DocumentNode dn = _dnaOpen.EntryAt(i); if (dn.Type == dnType && !dn.IsMatched) { return dn.Index; } } } return -1; }
internal int FindPending(DocumentNodeType documentNodeType) { return FindPending(documentNodeType, -1); }
internal int FindPending(DocumentNodeType documentNodeType, int nLow) { return FindPendingFrom(documentNodeType, Count - 1, nLow); }
internal int FindPendingFrom(DocumentNodeType documentNodeType, int nStart, int nLow) { if (_dnaOpen != null) { _dnaOpen.CullOpen(); for (int i = _dnaOpen.Count - 1; i >= 0; i--) { DocumentNode dn = _dnaOpen.EntryAt(i); if (dn.Index > nStart) { continue; } if (dn.Index <= nLow) { break; } if (dn.IsPending) { if (dn.Type == documentNodeType) { return dn.Index; } // Don't return pending elements across shape boundaries else if (dn.Type == DocumentNodeType.dnShape) { break; } } } } return -1; }
internal int CountOpenNodes(DocumentNodeType documentNodeType) { int nOpen = 0; if (_dnaOpen != null) { _dnaOpen.CullOpen(); for (int i = _dnaOpen.Count - 1; i >= 0; i--) { DocumentNode dn = _dnaOpen.EntryAt(i); if (dn.IsPending) { if (dn.Type == documentNodeType) { nOpen++; } // Shape blocks nesting else if (dn.Type == DocumentNodeType.dnShape) { break; } } } } return nOpen; }
internal bool TestTop(DocumentNodeType documentNodeType) { return ((Count > 0) && (EntryAt(Count - 1).Type == documentNodeType)); }
internal DocumentNode GetParentOfType(DocumentNodeType parentType) { DocumentNode dn = Parent; while (dn != null && dn.Type != parentType) { dn = dn.Parent; } return dn; }
//------------------------------------------------------ // // Constructors // //------------------------------------------------------ #region Constructors internal DocumentNode(DocumentNodeType documentNodeType) { _type = documentNodeType; _bPending = true; _childCount = 0; _index = -1; _dna = null; _parent = null; _bTerminated = false; _bMatched = false; _bHasMarkerContent = false; _sCustom = null; _nRowSpan = 1; _nColSpan = 1; _nVirtualListLevel = -1; _csa = null; _formatState = new FormatState(); _contentBuilder = new StringBuilder(); }
internal static bool ConvertTagToNodeType(XamlTag xamlTag, ref DocumentNodeType documentNodeType) { documentNodeType = DocumentNodeType.dnUnknown; switch (xamlTag) { default: case XamlTag.XTUnknown: return false; case XamlTag.XTInline: case XamlTag.XTItalic: case XamlTag.XTUnderline: case XamlTag.XTBold: documentNodeType = DocumentNodeType.dnInline; break; case XamlTag.XTHyperlink: documentNodeType = DocumentNodeType.dnHyperlink; break; case XamlTag.XTLineBreak: documentNodeType = DocumentNodeType.dnLineBreak; break; case XamlTag.XTInlineUIContainer: documentNodeType = DocumentNodeType.dnInlineUIContainer; break; case XamlTag.XTBlockUIContainer: documentNodeType = DocumentNodeType.dnBlockUIContainer; break; case XamlTag.XTImage: documentNodeType = DocumentNodeType.dnImage; break; case XamlTag.XTParagraph: documentNodeType = DocumentNodeType.dnParagraph; break; case XamlTag.XTSection: documentNodeType = DocumentNodeType.dnSection; break; case XamlTag.XTList: documentNodeType = DocumentNodeType.dnList; break; case XamlTag.XTListItem: documentNodeType = DocumentNodeType.dnListItem; break; case XamlTag.XTTable: documentNodeType = DocumentNodeType.dnTable; break; case XamlTag.XTTableBody: documentNodeType = DocumentNodeType.dnTableBody; break; case XamlTag.XTTableRow: documentNodeType = DocumentNodeType.dnRow; break; case XamlTag.XTTableCell: documentNodeType = DocumentNodeType.dnCell; break; } return true; }
// Helper for IXamlContentHandler.StartElement. private DocumentNode CreateDocumentNode(ConverterState converterState, DocumentNodeType documentNodeType, DocumentNode dnTop, XamlTag xamlTag) { DocumentNode documentNode = new DocumentNode(documentNodeType); if (dnTop != null) { documentNode.InheritFormatState(dnTop.FormatState); } // Handle implicit formatting properties. switch (xamlTag) { case XamlTag.XTBold: documentNode.FormatState.Bold = true; break; case XamlTag.XTHyperlink: { long lColor = 0; documentNode.FormatState.UL = ULState.ULNormal; if (XamlParserHelper.ConvertToColor(converterState, "#FF0000FF", ref lColor)) { documentNode.FormatState.CF = lColor; } } break; case XamlTag.XTItalic: documentNode.FormatState.Italic = true; break; case XamlTag.XTUnderline: documentNode.FormatState.UL = ULState.ULNormal; break; case XamlTag.XTList: documentNode.FormatState.Marker = MarkerStyle.MarkerBullet; documentNode.FormatState.StartIndex = 1; // Set the default left margin for a list. documentNode.FormatState.LI = 720; break; } return documentNode; }
// Token: 0x060034A3 RID: 13475 RVA: 0x000EA4D8 File Offset: 0x000E86D8 internal int FindPending(DocumentNodeType documentNodeType) { return(this.FindPending(documentNodeType, -1)); }
// Token: 0x060034A2 RID: 13474 RVA: 0x000EA4C6 File Offset: 0x000E86C6 internal int FindPending(DocumentNodeType documentNodeType, int nLow) { return(this.FindPendingFrom(documentNodeType, this.Count - 1, nLow)); }
// Token: 0x0600348F RID: 13455 RVA: 0x000E9957 File Offset: 0x000E7B57 internal bool TestTop(DocumentNodeType documentNodeType) { return(this.Count > 0 && this.EntryAt(this.Count - 1).Type == documentNodeType); }