Пример #1
0
        private void EnsureState()
        {
            if (store.Categorised)
            {
                //LAMESPEC: why can't we just get a TreePath or a count from the NodeStore?
                TreePath            tp   = new Gtk.TreePath("0");
                CategoryToolboxNode node = (CategoryToolboxNode)store.GetNode(tp);
                while (node != null)
                {
                    if (expandedCategories [node.Label] != null)
                    {
                        nodeView.ExpandRow(tp, false);
                    }
                    tp.Next();
                    node = (CategoryToolboxNode)store.GetNode(tp);
                }
            }

            if (selectedNode != null)
            {
                //LAMESPEC: why oh why is there no easy way to find if a node is in the store?
                //FIXME: This doesn't survive all store rebuilds, for some reason
                foreach (BaseToolboxNode b in store)
                {
                    if (b == selectedNode)
                    {
                        nodeView.NodeSelection.SelectNode(selectedNode);
                        break;
                    }
                }
            }
        }
Пример #2
0
        private void whenRowExpanded(object o, RowExpandedArgs rea)
        {
            CategoryToolboxNode node = store.GetNode(rea.Path) as CategoryToolboxNode;

            if (node != null)
            {
                expandedCategories [node.Label] = true;
            }
        }
Пример #3
0
        private void whenRowCollapsed(object o, RowCollapsedArgs rca)
        {
            CategoryToolboxNode node = store.GetNode(rca.Path) as CategoryToolboxNode;

            if (node != null)
            {
                expandedCategories [node.Label] = null;
            }
        }