Beispiel #1
0
 public NamespaceNode(DocNode parent, string path, string dir_path, XmlElement index_elem)
     : base(parent)
 {
     this.path = path;
     this.dir = new DirectoryInfo (dir_path);
     this.index_elem = index_elem;
 }
Beispiel #2
0
 public BannerItem(DocView view, DocNode node)
 {
     this.view = view;
     heading = new HeadingItem (view, node.Caption);
     while (node.Parent != null) {
         links.Insert (0, new LinkItem (view, node.Parent.Caption, node.Parent));
         node = node.Parent;
     }
 }
Beispiel #3
0
 public TypeNode(DocNode parent, string dir_path, XmlElement index_elem)
     : base(parent)
 {
     name = index_elem.GetAttribute ("Name");
     this.path = Path.Combine (dir_path, name + ".xml");
     caption = name;
     kind = index_elem.GetAttribute ("Kind");
     if (kind == null || kind == String.Empty) {
         try {
             XmlDocument doc = new XmlDocument ();
             using (XmlTextReader rdr = new XmlTextReader (path))
                 doc.Load (rdr);
             XmlElement elem = doc.SelectSingleNode ("Type/Base/BaseTypeName") as XmlElement;
             kind = GetKind (elem);
         } catch (Exception) {
         }
     }
     caption = name + " " + kind;
 }
Beispiel #4
0
 public CatalogStore(DocNode root_node)
 {
     this.root_node = root_node;
 }
Beispiel #5
0
 TreeIter IterFromNode(DocNode node)
 {
     GCHandle gch;
     if (node_hash [node] != null)
         gch = (GCHandle) node_hash [node];
     else {
         gch = GCHandle.Alloc (node);
         node_hash [node] = gch;
         node.Changed += new EventHandler (OnNodeChanged);
         node.ChildAdded += new NodeEventHandler (OnChildAdded);
         node.ChildRemoved += new NodeEventHandler (OnChildRemoved);
     }
     TreeIter result = TreeIter.Zero;
     result.UserData = (IntPtr) gch;
     return result;
 }
Beispiel #6
0
        internal TreePath PathFromNode(DocNode node)
        {
            if (node == null)
                return new TreePath ();

            DocNode work = node;
            TreePath path = new TreePath ();
            while (work != root_node) {
                DocNode parent = work.Parent;
                path.PrependIndex (parent.IndexOf (work));
                work = parent;
            }
            path.PrependIndex (0);
            return path;
        }
Beispiel #7
0
 public LinkItem(DocView view, string caption, DocNode target)
 {
     this.caption = caption;
     this.target = target;
     this.view = view;
 }
Beispiel #8
0
 public NodeSelectedEventArgs(DocNode node)
 {
     this.node = node;
 }
Beispiel #9
0
 public int IndexOf(DocNode child)
 {
     if (!loaded)
         LazyLoad ();
     return children == null ? -1 : children.IndexOf (child);
 }
Beispiel #10
0
 public OverloadNode(DocNode parent, string caption)
     : base(parent, caption)
 {
 }
Beispiel #11
0
 protected DocNode(DocNode parent, string caption)
     : this(parent)
 {
     this.caption = caption;
 }
Beispiel #12
0
 protected DocNode(DocNode parent)
 {
     this.parent = parent;
 }
Beispiel #13
0
 public NodeEventArgs(DocNode node)
 {
     this.node = node;
 }
Beispiel #14
0
 protected virtual int CompareNodes(DocNode a, DocNode b)
 {
     return String.Compare (a.Caption, b.Caption);
 }
Beispiel #15
0
 public void RemoveChild(DocNode child)
 {
     children.Remove (child);
     if (ChildRemoved == null)
         return;
     ChildRemoved (this, new NodeEventArgs (child));
 }
Beispiel #16
0
 protected override int CompareNodes(DocNode a, DocNode b)
 {
     if (a is MembersNode)
         return -1;
     else if (b is MembersNode)
         return 1;
     else
         return base.CompareNodes (a, b);
 }
Beispiel #17
0
 //XmlElement member;
 public MemberNode(DocNode parent, string caption, XmlElement member)
     : base(parent, caption)
 {
     //this.member = member;
 }
Beispiel #18
0
 public void AddChild(DocNode child)
 {
     if (children == null)
         children = new List <DocNode> ();
     int i = 0;
     while (i < children.Count)
         if (CompareNodes (children [i], child) > 0)
             break;
         else
             i++;
     children.Insert (i, child);
     if (ChildAdded == null || loading)
         return;
     ChildAdded (this, new NodeEventArgs (child));
 }