Inheritance: BaseToolboxNode
コード例 #1
0
ファイル: Toolbox.cs プロジェクト: deck05/aspeditor
        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
ファイル: Toolbox.cs プロジェクト: deck05/aspeditor
        private void whenRowExpanded(object o, RowExpandedArgs rea)
        {
            CategoryToolboxNode node = store.GetNode(rea.Path) as CategoryToolboxNode;

            if (node != null)
            {
                expandedCategories [node.Label] = true;
            }
        }
コード例 #3
0
ファイル: Toolbox.cs プロジェクト: deck05/aspeditor
        private void whenRowCollapsed(object o, RowCollapsedArgs rca)
        {
            CategoryToolboxNode node = store.GetNode(rca.Path) as CategoryToolboxNode;

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