public int OutlineViewNumberOfChildrenOfItem(OutlineView outlineView, BrowserItem item) { BrowserItem bi = item as BrowserItem; int count = bi != null ? bi.Count : help_tree.Nodes.Count; return(count); }
public void outlineViewDoubleAction(Cocoa.Object sender) { BrowserItem bi = outlineView.SelectedItem as BrowserItem; try { if (bi.node.URL != null) { Node n; string content = ""; if (bi.node.tree != null && bi.node.tree.HelpSource != null) { content = bi.node.tree.HelpSource.GetText(bi.node.URL, out n); } if (content == null || content.Equals("")) { content = help_tree.RenderUrl(bi.node.URL, out n); } content = content.Replace("a href='", "a href='http://monodoc/load?"); content = content.Replace("a href=\"", "a href=\"http://monodoc/load?"); webView.Render(content); addHistoryItem(bi.node.URL); outlineView.ExpandItem(bi); } } catch (Exception e) { Console.WriteLine("ERROR: " + e); } }
public object OutlineViewChildOfItem(OutlineView outlineView, int index, BrowserItem item) { BrowserItem bi = item as BrowserItem; if (bi != null) { bi = bi.ItemAt(index); } else { bi = (BrowserItem)items[index]; } return(bi); }
public object OutlineViewObjectValueForTableColumnByItem(OutlineView outlineView, TableColumn tableColumn, BrowserItem item) { BrowserItem bi = item as BrowserItem; return(bi == null ? null : bi.ValueAt(tableColumn.Identifier)); }
public bool OutlineViewIsItemExpandable(OutlineView outlineView, BrowserItem item) { return(OutlineViewNumberOfChildrenOfItem(outlineView, item) > 0); }