iTextSharp.text.pdf.PdfCell.ProcessActions C# (CSharp) Method

ProcessActions() protected method

protected ProcessActions ( IElement element, PdfAction action, ArrayList allActions ) : void
element IElement
action PdfAction
allActions System.Collections.ArrayList
return void
        protected void ProcessActions(IElement element, PdfAction action, ArrayList allActions) {
            if (element.Type == Element.ANCHOR) {
                string url = ((Anchor)element).Reference;
                if (url != null) {
                    action = new PdfAction(url);
                }
            }
            switch (element.Type) {
                case Element.PHRASE:
                case Element.SECTION:
                case Element.ANCHOR:
                case Element.CHAPTER:
                case Element.LISTITEM:
                case Element.PARAGRAPH:
                    foreach (IElement ele in ((ArrayList)element)) {
                        ProcessActions(ele, action, allActions);
                    }
                    break;
                case Element.CHUNK:
                    allActions.Add(action);
                    break;
                case Element.LIST:
                    foreach (IElement ele in ((List)element).Items) {
                        ProcessActions(ele, action, allActions);
                    }
                    break;
                default:
                    int n = element.Chunks.Count;
                    while (n-- > 0)
                        allActions.Add(action);
                    break;
            }
        }