Esempio n. 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;
            }
        }
Esempio n. 2
0
        void RowActivated(object sender, RowActivatedArgs args)
        {
            TreeIter it;

            GtkStore.GetIter(out it, args.Path);
            int id = (int)GtkStore.GetValue(it, BreakpointsStore.ColumnID);
        }
Esempio n. 3
0
        void RowActivated(object sender, RowActivatedArgs args)
        {
            TreeIter it;

            GtkStore.GetIter(out it, args.Path);
            int id = (int)GtkStore.GetValue(it, ThreadsStore.ColumnID);

            remoteStore.SelectThread(id);
        }
Esempio n. 4
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);
        }
Esempio n. 5
0
        public SourceCodeLocation[] GetBreakpoints()
        {
            ArrayList breakpoints = new ArrayList();

            int count = GtkStore.IterNChildren();

            for (int i = 0; i < count; i++)
            {
                TreeIter childIter;
                GtkStore.IterNthChild(out childIter, i);
                SourceCodeLocation bpLocation = (SourceCodeLocation)GtkStore.GetValue(childIter, BreakpointsStore.ColumnLocation);
                breakpoints.Add(bpLocation);
            }

            return((SourceCodeLocation[])breakpoints.ToArray(typeof(SourceCodeLocation)));
        }
Esempio n. 6
0
        public override void ReceiveUpdates()
        {
            GtkTreeStoreUpdater.Update(remoteStore, GtkStore);

            int childCount = GtkStore.IterNChildren();

            for (int i = 0; i < childCount; i++)
            {
                TreePath childPath = new TreePath(new int[] { i });

                TreeIter childIter;
                GtkStore.GetIter(out childIter, childPath);
                string childFullName = (string)GtkStore.GetValue(childIter, LocalsStore.ColumnFullName);
                // This node was expanded in the past - expand it
                if (expandedNodes.ContainsKey(childFullName))
                {
                    GtkTree.ExpandRow(childPath, false);
                }
            }
        }
Esempio n. 7
0
        protected void RowExpanded(object o, RowExpandedArgs args)
        {
            TreeIter it;

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

            for (int i = 0; i < childCount; i++)
            {
                TreePath childPath = args.Path.Copy();
                childPath.AppendIndex(i);

                TreeIter childIter;
                GtkStore.GetIter(out childIter, childPath);
                string childFullName = (string)GtkStore.GetValue(childIter, LocalsStore.ColumnFullName);
                // This node was expanded in the past - expand it
                if (childFullName != null && expandedNodes.ContainsKey(childFullName))
                {
                    GtkTree.ExpandRow(childPath, false);
                }
            }
        }