Beispiel #1
0
        protected void TestExpandRow(object o, TestExpandRowArgs args)
        {
            // Add to the expandedNodes table
            string fullName = (string)GtkStore.GetValue(args.Iter, LocalsStore.ColumnFullName);

            expandedNodes[fullName] = null;             // No value, just insert the key

            // Notify remote store
            RemoteTreeNodeRef nodeRef = (RemoteTreeNodeRef)GtkStore.GetValue(args.Iter, LocalsStore.ColumnReference);

            remoteStore.ExpandNode(nodeRef);

            GtkTreeStoreUpdater.Update(remoteStore, GtkStore);

            TreeIter it;

            GtkStore.GetIter(out it, args.Path);
            int childCount = GtkStore.IterNChildren(it);

            if (childCount == 0)
            {
                args.RetVal = true;                  // Cancel expanding
            }
            else
            {
                args.RetVal = false;
            }
        }
		public RemoteTreeNode GetNode(RemoteTreeNodeRef reference)
		{
			if (referenceToNode.Contains(reference)) {
				return (RemoteTreeNode)referenceToNode[reference];
			} else {
				return null;
			}
		}
		public void CollapseNode(RemoteTreeNodeRef nodeRef)
		{
			RemoteTreeNode node = GetNode(nodeRef);
			
			// There might be a race condition and the node might have been just removed
			if (node != null) {
				node.SetValue(ColumnUpdateChilds, false);
			}
		}
		public void ExpandNode(RemoteTreeNodeRef nodeRef)
		{
			RemoteTreeNode node = GetNode(nodeRef);
			
			// There might be a race condition and the node might have been just removed
			if (node != null) {
				node.SetValue(ColumnUpdateChilds, true);
				UpdateNodeRecursive(node, (AbstractVariable)node.Tag);
			}
		}
        public override bool Equals(object obj)
        {
            if (!(obj is RemoteTreeNodeRef))
            {
                return(false);
            }
            RemoteTreeNodeRef myRemoteTreeNodeRef = (RemoteTreeNodeRef)obj;

            return(this.id == myRemoteTreeNodeRef.id);
        }
Beispiel #6
0
        public void CollapseNode(RemoteTreeNodeRef nodeRef)
        {
            RemoteTreeNode node = GetNode(nodeRef);

            // There might be a race condition and the node might have been just removed
            if (node != null)
            {
                node.SetValue(ColumnUpdateChilds, false);
            }
        }
Beispiel #7
0
 public RemoteTreeNode GetNode(RemoteTreeNodeRef reference)
 {
     if (referenceToNode.Contains(reference))
     {
         return((RemoteTreeNode)referenceToNode[reference]);
     }
     else
     {
         return(null);
     }
 }
Beispiel #8
0
        public void ExpandNode(RemoteTreeNodeRef nodeRef)
        {
            RemoteTreeNode node = GetNode(nodeRef);

            // There might be a race condition and the node might have been just removed
            if (node != null)
            {
                node.SetValue(ColumnUpdateChilds, true);
                UpdateNodeRecursive(node, (AbstractVariable)node.Tag);
            }
        }
Beispiel #9
0
        protected void TestCollapseRow(object o, TestCollapseRowArgs args)
        {
            // Remove from the expandedNodes table
            string fullName = (string)GtkStore.GetValue(args.Iter, LocalsStore.ColumnFullName);

            if (expandedNodes.ContainsKey(fullName))
            {
                expandedNodes.Remove(fullName);
            }

            // Notify remote store
            RemoteTreeNodeRef nodeRef = (RemoteTreeNodeRef)GtkStore.GetValue(args.Iter, LocalsStore.ColumnReference);

            remoteStore.CollapseNode(nodeRef);
        }