예제 #1
0
		public TreePosition GetParent (TreePosition pos)
		{
			var node = (TreeStoreNode) pos;
			if (node.Parent == null)
				return null;

			return node.Parent;
		}
예제 #2
0
		IterPos GetIterPos (TreePosition pos)
		{
			IterPos tpos = (IterPos) pos;
			if (tpos != null && tpos.Version != version) {
				tpos.LastChildIndex = -1;
				tpos.ChildrenCount = -1;
			}
			return tpos;
		}
예제 #3
0
		public TreePosition GetChild (TreePosition pos, int index)
		{
			var node = (TreeStoreNode) pos;
			var list = GetListForNode (node);
			if (list.Count == 0 || index >= list.Count)
				return null;

			return list [index];
		}
예제 #4
0
 public TreePosition AddChild(TreePosition pos)
 {
     IterPos tpos = (IterPos)pos;
     Gtk.TreeIter it;
     if (pos == null)
         it = Tree.AppendNode ();
     else
         it = Tree.AppendNode (tpos.Iter);
     return new IterPos (it);
 }
예제 #5
0
 public TreePosition AddChild(TreePosition pos)
 {
     version++;
     IterPos tpos = GetIterPos (pos);
     Gtk.TreeIter it;
     if (pos == null)
         it = Tree.AppendNode ();
     else
         it = Tree.AppendNode (tpos.Iter);
     return new IterPos (version, it);
 }
예제 #6
0
        Gtk.TreeIter IterFromNode (TreePosition node)
		{
			GCHandle gch;
			if (!handleHash.TryGetValue (node, out gch)) {
				gch = GCHandle.Alloc (node);
				handleHash [node] = gch;
				nodeHash [gch] = node;
			}
			Gtk.TreeIter result = Gtk.TreeIter.Zero;
			result.UserData = (IntPtr)gch;
			return result;
		}
예제 #7
0
        public TreePosition AddChild(TreePosition pos)
        {
            version++;
            IterPos tpos = GetIterPos (pos);
            Gtk.TreeIter it;
            if (pos == null)
                it = Tree.AppendNode ();
            else
                it = Tree.AppendNode (tpos.Iter);

            var node = new IterPos (version, it);
            if (NodeInserted != null)
                NodeInserted (this, new TreeNodeEventArgs (node));
            return node;
        }
예제 #8
0
		void SaveChildren (List<NodeInfo> info, TreePosition it)
		{
			int num = tree.DataSource.GetChildrenCount (it);
			for (int n=0; n<num; n++) {
				var child = tree.DataSource.GetChild (it, n);
				object id = tree.DataSource.GetValue (child, idColumn);
				NodeInfo ni = new NodeInfo ();
				ni.Id = id;
				ni.Expanded = tree.IsRowExpanded (child);
				ni.Selected = tree.IsRowSelected (child);
				info.Add (ni);
				if (tree.DataSource.GetChildrenCount (child) > 0) {
					ni.ChildInfo = new List<NodeInfo> ();
					SaveChildren (ni.ChildInfo, child);
				}
			}
		}
예제 #9
0
		void Load (List<NodeInfo> info, TreePosition it)
		{
			bool oneSelected = false;
			var infoCopy = new List<NodeInfo> (info);
			Dictionary<NodeInfo,TreePosition> nodes = new Dictionary<NodeInfo, TreePosition> ();
			
			int num = tree.DataSource.GetChildrenCount (it);
			for (int n=0; n<num; n++) {
				var child = tree.DataSource.GetChild (it, n);
				object id = tree.DataSource.GetValue (child, idColumn);
				NodeInfo ni = ExtractNodeInfo (info, id);
				if (ni != null) {
					nodes [ni] = child;
					if (ni.Expanded)
						tree.ExpandRow (child, false);
					else
						tree.CollapseRow (child);
					
					if (ni.Selected) {
						oneSelected = true;
						tree.SelectRow (child);
					}
					else
						tree.UnselectRow (child);
					
					if (ni.ChildInfo != null)
						Load (ni.ChildInfo, child);
				}
			}
			
			// If this tree level had a selected node and this node has been deleted, then
			// try to select and adjacent node
			if (!oneSelected) {
				// 'info' contains the nodes that have not been inserted
				if (info.Any (n => n.Selected)) {
					NodeInfo an = FindAdjacentNode (infoCopy, nodes, info[0]);
					if (an != null) {
						it = nodes [an];
						tree.SelectRow (it);
					}
				}
			}
		}
예제 #10
0
 public void CollapseRow(TreePosition pos)
 {
     Widget.CollapseRow(Widget.Model.GetPath(((IterPos)pos).Iter));
 }
예제 #11
0
 public void ExpandToRow(TreePosition pos)
 {
     Widget.ExpandToPath(Widget.Model.GetPath(((IterPos)pos).Iter));
 }
예제 #12
0
        public bool IsRowSelected(TreePosition pos)
        {
            var it = tsource.GetItem(pos);

            return(it != null && Table.IsRowSelected(Tree.RowForItem(it)));
        }
예제 #13
0
 public void ScrollToRow(TreePosition pos)
 {
     Widget.ScrollToCell (Widget.Model.GetPath (((IterPos)pos).Iter), Widget.Columns[0], false, 0, 0);
 }
예제 #14
0
 public void SetValue(TreePosition pos, int column, object value)
 {
     IterPos tpos = GetIterPos (pos);
     SetValue (tpos.Iter, column, value);
     if (NodeChanged != null)
         NodeChanged (this, new TreeNodeEventArgs (pos));
 }
예제 #15
0
 public TreePosition GetPrevious(TreePosition pos)
 {
     IterPos tpos = GetIterPos (pos);
     Gtk.TreePath path = Tree.GetPath (tpos.Iter);
     int [] indices = path.Indices;
     if (indices.Length < 1 || indices [indices.Length - 1] == 0)
         return null;
     indices [indices.Length - 1] --;
     Gtk.TreePath previousPath = new Gtk.TreePath (indices);
     Gtk.TreeIter previous;
     if (!Tree.GetIter (out previous, previousPath))
         return null;
     return new IterPos (version, previous);
 }
예제 #16
0
 public TreePosition AddWiget(TreePosition pos, string name)
 {
     return(store.AddNode(pos)
            .SetValue(nameCol, name)
            .CurrentPosition);
 }
예제 #17
0
 public void CollapseRow(TreePosition row)
 {
     ((TreeStoreNode)row).IsExpanded = false;
 }
예제 #18
0
 public bool IsRowExpanded(TreePosition row)
 {
     return(((TreeStoreNode)row).IsExpanded);
 }
예제 #19
0
 public bool IsRowSelected(TreePosition row)
 {
     return(Tree.SelectedItems.Contains(row));
 }
예제 #20
0
 public void UnselectRow(TreePosition pos)
 {
     Tree.SelectedItems.Remove(pos);
 }
예제 #21
0
 public void SelectRow(TreePosition pos)
 {
     Tree.SelectedItems.Add(pos);
 }
예제 #22
0
        public TreePosition GetChild(TreePosition pos, int index)
        {
            IterPos tpos = GetIterPos (pos);
            if (tpos != null && tpos.LastChildIndex == index)
                return new IterPos (version, tpos.LastChildIter);
            if (index == 0) {
                if (tpos != null) {
                    Gtk.TreeIter it;
                    if (Tree.IterChildren (out it, tpos.Iter)) {
                        tpos.LastChildIter = it;
                        tpos.LastChildIndex = 0;
                        return new IterPos (version, it);
                    }
                } else {
                    Gtk.TreeIter it;
                    if (Tree.GetIterFirst (out it))
                        return new IterPos (version, it);
                }
                return null;
            }

            if (tpos == null) {
                Gtk.TreeIter it;
                if (Tree.IterNthChild (out it, index))
                    return new IterPos (version, it);
                else
                    return null;
            }

            if (tpos.LastChildIndex == -1 || tpos.LastChildIndex > index) {
                Gtk.TreeIter it;
                if (Tree.IterNthChild (out it, tpos.Iter, index)) {
                    tpos.LastChildIter = it;
                    tpos.LastChildIndex = index;
                    return new IterPos (version, it);
                } else
                    return null;
            }

            // tpos.LastChildIndex < index

            Gtk.TreeIter iter = tpos.LastChildIter;
            for (int n = tpos.LastChildIndex; n < index; n++) {
                if (!Tree.IterNext (ref iter))
                    return null;
            }
            tpos.LastChildIter = iter;
            tpos.LastChildIndex = index;
            return new IterPos (version, iter);
        }
예제 #23
0
 public TreePosition GetNext(TreePosition pos)
 {
     IterPos tpos = GetIterPos (pos);
     Gtk.TreeIter it = tpos.Iter;
     if (!Tree.IterNext (ref it))
         return null;
     return new IterPos (version, it);
 }
예제 #24
0
파일: TreeStore.cs 프로젝트: miryamGSM/xwt
        public TreeNavigator InsertNodeAfter(TreePosition positon)
        {
            var pos = Backend.InsertAfter(positon);

            return(new TreeNavigator(Backend, pos));
        }
예제 #25
0
        public TreePosition InsertBefore(TreePosition pos)
        {
            version++;
            IterPos tpos = GetIterPos (pos);
            var p = Tree.InsertNodeBefore (tpos.Iter);

            var node = new IterPos (version, p);
            if (NodeInserted != null)
                NodeInserted (this, new TreeNodeEventArgs (node));
            return node;
        }
예제 #26
0
파일: TreeStore.cs 프로젝트: miryamGSM/xwt
        public TreeNavigator InsertNodeBefore(TreePosition positon)
        {
            var pos = Backend.InsertBefore(positon);

            return(new TreeNavigator(Backend, pos));
        }
예제 #27
0
 public bool GetDropTargetRow(double x, double y, out RowDropPosition pos, out TreePosition nodePosition)
 {
     pos          = RowDropPosition.Into;
     nodePosition = null;
     return(false);
 }
예제 #28
0
파일: TreeStore.cs 프로젝트: miryamGSM/xwt
 TreePosition ITreeDataSource.GetChild(TreePosition pos, int index)
 {
     return(Backend.GetChild(pos, index));
 }
예제 #29
0
 public void CollapseRow(TreePosition pos)
 {
     Widget.CollapseRow (Widget.Model.GetPath (((IterPos)pos).Iter));
 }
예제 #30
0
파일: TreeStore.cs 프로젝트: miryamGSM/xwt
 TreePosition ITreeDataSource.GetParent(TreePosition pos)
 {
     return(Backend.GetParent(pos));
 }
예제 #31
0
 public void ExpandToRow(TreePosition pos)
 {
     Widget.ExpandToPath(Widget.Model.GetPath(GetIterFromPosition(pos)));
 }
예제 #32
0
파일: TreeStore.cs 프로젝트: miryamGSM/xwt
 int ITreeDataSource.GetChildrenCount(TreePosition pos)
 {
     return(Backend.GetChildrenCount(pos));
 }
예제 #33
0
파일: TreeStore.cs 프로젝트: miryamGSM/xwt
 object ITreeDataSource.GetValue(TreePosition pos, int column)
 {
     return(Backend.GetValue(pos, column));
 }
예제 #34
0
파일: TreeStore.cs 프로젝트: miryamGSM/xwt
 void ITreeDataSource.SetValue(TreePosition pos, int column, object val)
 {
     Backend.SetValue(pos, column, val);
 }
예제 #35
0
 public void ScrollToRow(TreePosition pos)
 {
     ScrollToRow(((IterPos)pos).Iter);
 }
예제 #36
0
파일: TreeStore.cs 프로젝트: miryamGSM/xwt
 public TreeNavigator GetNavigatorAt(TreePosition pos)
 {
     return(new TreeNavigator(Backend, pos));
 }
예제 #37
0
 public void ExpandRow(TreePosition pos, bool expandedChildren)
 {
     Widget.ExpandRow(Widget.Model.GetPath(((IterPos)pos).Iter), expandedChildren);
 }
예제 #38
0
파일: TreeStore.cs 프로젝트: miryamGSM/xwt
        public TreeNavigator AddNode(TreePosition position)
        {
            var pos = Backend.AddChild(position);

            return(new TreeNavigator(Backend, pos));
        }
예제 #39
0
        public int GetChildrenCount(TreePosition pos)
        {
            if (pos == null)
                return Tree.IterNChildren ();

            IterPos tpos = GetIterPos (pos);

            if (tpos.ChildrenCount != -1)
                return tpos.ChildrenCount;

            return tpos.ChildrenCount = Tree.IterNChildren (tpos.Iter);
        }
예제 #40
0
 public TreePosition AddWiget(TreePosition pos, string name)
 {
     return store.AddNode (pos)
         .SetValue (nameCol, name)
         .CurrentPosition;
 }
예제 #41
0
 public TreePosition GetParent(TreePosition pos)
 {
     IterPos tpos = GetIterPos (pos);
     Gtk.TreeIter it;
     if (!Tree.IterParent (out it, tpos.Iter))
         return null;
     return new IterPos (version, it);
 }
예제 #42
0
 public TreePosition AddWiget(TreePosition pos, string name, Type type, Widget widget)
 {
     var item = new ItemWidget (type) { Widget = widget };
     return store.AddNode (pos)
         .SetValue (nameCol, name)
     //.SetValue (iconCol, Icon)
         .SetValue (widgetCol, item)
         .CurrentPosition;
 }
예제 #43
0
 public object GetValue(TreePosition pos, int column)
 {
     IterPos tpos = GetIterPos (pos);
     return GetValue (tpos.Iter, column);
 }
예제 #44
0
 public void ExpandToRow(TreePosition pos)
 {
     Widget.ExpandToPath (Widget.Model.GetPath (((IterPos)pos).Iter));
 }
예제 #45
0
 public void Remove(TreePosition pos)
 {
     version++;
     IterPos tpos = GetIterPos (pos);
     Gtk.TreeIter it = tpos.Iter;
     var delPath = Tree.GetPath (it);
     var eventArgs = new TreeNodeChildEventArgs (GetParent (tpos), delPath.Indices[delPath.Indices.Length - 1]);
     Tree.Remove (ref it);
     if (NodeDeleted != null)
         NodeDeleted (this, eventArgs);
 }
예제 #46
0
 public bool IsRowExpanded(TreePosition pos)
 {
     return Widget.GetRowExpanded (Widget.Model.GetPath (((IterPos)pos).Iter));
 }
예제 #47
0
        public TreeViews()
        {
            TreeView  view  = new TreeView();
            TreeStore store = new TreeStore(triState, check, option1, option2, option3, text, desc);

            view.GridLinesVisible = GridLines.Both;

            var triStateCellView = new CheckBoxCellView(triState)
            {
                Editable = true, AllowMixed = true
            };

            triStateCellView.Toggled += (object sender, WidgetEventArgs e) => {
                if (view.CurrentEventRow == null)
                {
                    MessageDialog.ShowError("CurrentEventRow is null. This is not supposed to happen");
                }
                else
                {
                    store.GetNavigatorAt(view.CurrentEventRow).SetValue(text, "TriState Toggled");
                }
            };
            var checkCellView = new CheckBoxCellView(check)
            {
                Editable = true
            };

            checkCellView.Toggled += (object sender, WidgetEventArgs e) => {
                if (view.CurrentEventRow == null)
                {
                    MessageDialog.ShowError("CurrentEventRow is null. This is not supposed to happen");
                }
                else
                {
                    store.GetNavigatorAt(view.CurrentEventRow).SetValue(text, "Toggled " + checkCellView.Active);
                }
            };
            var optionCellView1 = new RadioButtonCellView(option1)
            {
                Editable = true
            };

            optionCellView1.Toggled += (object sender, WidgetEventArgs e) => {
                if (view.CurrentEventRow == null)
                {
                    MessageDialog.ShowError("CurrentEventRow is null. This is not supposed to happen");
                }
                else
                {
                    store.GetNavigatorAt(view.CurrentEventRow).SetValue(option2, optionCellView1.Active);
                }
            };
            var optionCellView2 = new RadioButtonCellView(option2)
            {
                Editable = true
            };

            optionCellView2.Toggled += (object sender, WidgetEventArgs e) => {
                if (view.CurrentEventRow == null)
                {
                    MessageDialog.ShowError("CurrentEventRow is null. This is not supposed to happen");
                }
                else
                {
                    store.GetNavigatorAt(view.CurrentEventRow).SetValue(option1, optionCellView2.Active);
                }
            };

            TreePosition initialActive   = null;
            var          optionCellView3 = new RadioButtonCellView(option3)
            {
                Editable = true
            };

            optionCellView3.Toggled += (object sender, WidgetEventArgs e) => {
                if (view.CurrentEventRow == null)
                {
                    MessageDialog.ShowError("CurrentEventRow is null. This is not supposed to happen");
                }
                else
                {
                    if (initialActive != null)
                    {
                        store.GetNavigatorAt(initialActive).SetValue(option3, false);
                    }
                    initialActive = view.CurrentEventRow;
                }
            };

            view.Columns.Add("TriCheck", triStateCellView);
            view.Columns.Add("Check", checkCellView);
            view.Columns.Add("Radio", optionCellView1, optionCellView2, optionCellView3);
            view.Columns.Add("Item", text);
            view.Columns.Add("Desc", desc);
            view.Columns[2].Expands   = true;           // expand third column, aligning last column to the right side
            view.Columns[2].CanResize = true;
            view.Columns[3].CanResize = true;

            store.AddNode().SetValue(text, "One").SetValue(desc, "First").SetValue(triState, CheckBoxState.Mixed);
            store.AddNode().SetValue(text, "Two").SetValue(desc, "Second").AddChild()
            .SetValue(text, "Sub two").SetValue(desc, "Sub second");
            store.AddNode().SetValue(text, "Three").SetValue(desc, "Third").AddChild()
            .SetValue(text, "Sub three").SetValue(desc, "Sub third");
            PackStart(view, true);

            Menu contextMenu = new Menu();

            contextMenu.Items.Add(new MenuItem("Test menu"));
            view.ButtonPressed += delegate(object sender, ButtonEventArgs e) {
                TreePosition    tmpTreePos;
                RowDropPosition tmpRowDrop;
                if ((e.Button == PointerButton.Right) && view.GetDropTargetRow(e.X, e.Y, out tmpRowDrop, out tmpTreePos))
                {
                    // Set actual row to selected
                    view.SelectRow(tmpTreePos);
                    contextMenu.Popup(view, e.X, e.Y);
                }
            };

            view.DataSource = store;

            Label la = new Label();

            PackStart(la);

            view.SetDragDropTarget(DragDropAction.All, TransferDataType.Text);
            view.SetDragSource(DragDropAction.All, TransferDataType.Text);

            view.DragDrop += delegate(object sender, DragEventArgs e) {
                TreePosition    node;
                RowDropPosition pos;
                view.GetDropTargetRow(e.Position.X, e.Position.Y, out pos, out node);
                var nav = store.GetNavigatorAt(node);
                la.Text  += "Dropped \"" + e.Data.Text + "\" into \"" + nav.GetValue(text) + "\" " + pos + "\n";
                e.Success = true;
            };
            view.DragOver += delegate(object sender, DragOverEventArgs e) {
                TreePosition    node;
                RowDropPosition pos;
                view.GetDropTargetRow(e.Position.X, e.Position.Y, out pos, out node);
                if (pos == RowDropPosition.Into)
                {
                    e.AllowedAction = DragDropAction.None;
                }
                else
                {
                    e.AllowedAction = e.Action;
                }
            };
            view.DragStarted += delegate(object sender, DragStartedEventArgs e) {
                var val = store.GetNavigatorAt(view.SelectedRow).GetValue(text);
                e.DragOperation.Data.AddValue(val);
                var img = Image.FromResource(GetType(), "class.png");
                e.DragOperation.SetDragImage(img, (int)img.Size.Width, (int)img.Size.Height);
                e.DragOperation.Finished += delegate(object s, DragFinishedEventArgs args) {
                    Console.WriteLine("D:" + args.DeleteSource);
                };
            };
            view.RowExpanding += delegate(object sender, TreeViewRowEventArgs e) {
                var val = store.GetNavigatorAt(e.Position).GetValue(text);
                Console.WriteLine("Expanding: " + val);
            };
            view.RowExpanded += delegate(object sender, TreeViewRowEventArgs e) {
                var val = store.GetNavigatorAt(e.Position).GetValue(text);
                Console.WriteLine("Expanded: " + val);
            };
            view.RowCollapsing += delegate(object sender, TreeViewRowEventArgs e) {
                var val = store.GetNavigatorAt(e.Position).GetValue(text);
                Console.WriteLine("Collapsing: " + val);
            };
            view.RowCollapsed += delegate(object sender, TreeViewRowEventArgs e) {
                var val = store.GetNavigatorAt(e.Position).GetValue(text);
                Console.WriteLine("Collapsed: " + val);
            };

            RadioButtonGroup group = new RadioButtonGroup();

            foreach (SelectionMode mode in Enum.GetValues(typeof(SelectionMode)))
            {
                var radio = new RadioButton(mode.ToString());
                radio.Group      = group;
                radio.Activated += delegate {
                    view.SelectionMode = mode;
                };
                PackStart(radio);
            }

            int addCounter = 0;

            view.KeyPressed += (sender, e) => {
                if (e.Key == Key.Insert)
                {
                    TreeNavigator n;
                    if (view.SelectedRow != null)
                    {
                        n = store.InsertNodeAfter(view.SelectedRow).SetValue(text, "Inserted").SetValue(desc, "Desc");
                    }
                    else
                    {
                        n = store.AddNode().SetValue(text, "Inserted").SetValue(desc, "Desc");
                    }
                    view.ExpandToRow(n.CurrentPosition);
                    view.ScrollToRow(n.CurrentPosition);
                    view.UnselectAll();
                    view.SelectRow(n.CurrentPosition);
                    view.FocusedRow = n.CurrentPosition;
                }
            };
            Button addButton = new Button("Add");

            addButton.Clicked += delegate(object sender, EventArgs e) {
                addCounter++;
                TreeNavigator n;
                if (view.SelectedRow != null)
                {
                    n = store.AddNode(view.SelectedRow).SetValue(text, "Added " + addCounter).SetValue(desc, "Desc");
                }
                else
                {
                    n = store.AddNode().SetValue(text, "Added " + addCounter).SetValue(desc, "Desc");
                }
                view.ExpandToRow(n.CurrentPosition);
                view.ScrollToRow(n.CurrentPosition);
                view.SelectRow(n.CurrentPosition);
            };
            PackStart(addButton);

            Button removeButton = new Button("Remove Selection");

            removeButton.Clicked += delegate(object sender, EventArgs e) {
                foreach (TreePosition row in view.SelectedRows)
                {
                    store.GetNavigatorAt(row).Remove();
                }
            };
            PackStart(removeButton);

            Button clearButton = new Button("Clear");

            clearButton.Clicked += delegate(object sender, EventArgs e) {
                store.Clear();
            };
            PackStart(clearButton);

            var label = new Label();

            PackStart(label);

            view.RowExpanded += (sender, e) => label.Text = "Row expanded: " + store.GetNavigatorAt(e.Position).GetValue(text);
        }
예제 #48
0
        public bool IsRowExpanded(TreePosition pos)
        {
            var it = tsource.GetItem(pos);

            return(it != null && Tree.IsItemExpanded(it));
        }
예제 #49
0
 public TreePosition AddWiget(TreePosition pos, string name, Type widgetType)
 {
     return store.AddNode (pos)
         .SetValue (nameCol, name)
     //.SetValue (iconCol, Icon)
         .SetValue (widgetCol, new ItemWidget (widgetType))
         .CurrentPosition;
 }
예제 #50
0
 public void UnselectRow(TreePosition pos)
 {
     Widget.Selection.UnselectIter(GetIterFromPosition(pos));
 }
예제 #51
0
 public void ExpandRow(TreePosition pos, bool expandedChildren)
 {
     Widget.ExpandRow (Widget.Model.GetPath (((IterPos)pos).Iter), expandedChildren);
 }
예제 #52
0
 public bool IsRowSelected(TreePosition pos)
 {
     return(Widget.Selection.IterIsSelected(GetIterFromPosition(pos)));
 }
예제 #53
0
        public bool GetDropTargetRow(double x, double y, out RowDropPosition pos, out TreePosition nodePosition)
        {
            Gtk.TreeViewDropPosition tpos;
            Gtk.TreePath path;
            if (!Widget.GetDestRowAtPos ((int)x, (int)y, out path, out tpos)) {
                pos = RowDropPosition.Into;
                nodePosition = null;
                return false;
            }

            Gtk.TreeIter it;
            Widget.Model.GetIter (out it, path);
            nodePosition = new IterPos (-1, it);
            switch (tpos) {
            case Gtk.TreeViewDropPosition.After: pos = RowDropPosition.After; break;
            case Gtk.TreeViewDropPosition.Before: pos = RowDropPosition.Before; break;
            default: pos = RowDropPosition.Into; break;
            }
            return true;
        }
예제 #54
0
 public bool IsRowExpanded(TreePosition pos)
 {
     return(Widget.GetRowExpanded(Widget.Model.GetPath(GetIterFromPosition(pos))));
 }
예제 #55
0
 public bool IsRowSelected(TreePosition pos)
 {
     return Widget.Selection.IterIsSelected (((IterPos)pos).Iter);
 }
예제 #56
0
 public void ExpandRow(TreePosition pos, bool expandedChildren)
 {
     Widget.ExpandRow(Widget.Model.GetPath(GetIterFromPosition(pos)), expandedChildren);
 }
예제 #57
0
 public void UnselectRow(TreePosition pos)
 {
     Widget.Selection.UnselectIter (((IterPos)pos).Iter);
 }
예제 #58
0
 public void CollapseRow(TreePosition pos)
 {
     Widget.CollapseRow(Widget.Model.GetPath(GetIterFromPosition(pos)));
 }
예제 #59
0
 TreePosition AddSample(TreePosition pos, string name, Type sampleType)
 {
     //if (page != null)
     //	page.Margin.SetAll (5);
     return store.AddNode (pos).SetValue (nameCol, name).SetValue (iconCol, icon).SetValue (widgetCol, new Sample (sampleType)).CurrentPosition;
 }
예제 #60
0
 public void ScrollToRow(TreePosition pos)
 {
     ScrollToRow(GetIterFromPosition(pos));
 }