public NodeData() { children = new List<NodeData> (); data = new Hashtable (); parent = null; log = new LogUtil ("NodeData"); }
public override bool CanMakeChild(NodeData childData) { return this.CanMakeChild (childData.nodeType); }
public NewCategory(NodeData _providerNode) : base(Gtk.WindowType.Toplevel) { providerNode = _providerNode; this.Build (); }
public override void OnNodeDataChanged(NodeData source, NodeDataChangedEventArgs args) { if (source is CategoryData) { // get the tree builder ITreeBuilder treeBuilder = Context.GetTreeBuilder (source); treeBuilder.UpdateAll (); } }
/// <summary> /// Used to nest categories. /// /// TODO: Migrate createnewcategory to use this function instead /// </summary> /// <param name="parent"> /// A <see cref="NodeData"/> /// </param> public void AddChildCategory(NodeData parent) { NewCategory n = new NewCategory (parent); log.INFO ("Making new category with parent - " + parent.Label); n.ShowAll (); }
public virtual void AddChild(NodeData childData) { // Check if this node can have this as a child if(CanMakeChild(childData)) { // First, remove the child from it's parent list childData.parent.children.Remove(childData); // set the child data's parent to the current object childData.parent = this; // add the child data as a child this.children.Add(childData); // Inform both classes about the updates } }
public override bool CanMakeChild(NodeData childData);
public abstract bool CanMakeChild(NodeData childData);
/// <summary> /// Adds a child and does not update GUI. to be used when heavy /// tree activity is taking place /// /// YOU HAVE TO CALL TriggerUpdate after finishing tree opeartions /// </summary> /// <param name="childData"> /// A <see cref="NodeData"/> /// </param> public virtual void AddChildSilent(NodeData childData) { // Check if this node can have this as a child if (CanMakeChild (childData)) { // First, remove the child from it's parent list NodeData oldParent = childData.parent; if (oldParent != null) childData.parent.children.Remove (childData); // set the child data's parent to the current object childData.parent = this; // add the child data as a child this.children.Add (childData); // Inform both classes about the updates //this.TriggerUpdate(); } }