public override void RemoveItem(int index) { var path = new Gtk.TreePath(); path.AppendIndex(index); Handler.Tree.Model.EmitRowDeleted(path); }
public Gtk.TreePath GetPathAtRow(int row) { var path = new Gtk.TreePath(); path.AppendIndex(row); return(path); }
public override void InsertItem(int index, ITreeItem item) { var path = new Gtk.TreePath(); path.AppendIndex(index); var iter = Handler.model.GetIterFromItem(item, path); Handler.tree.Model.EmitRowInserted(path, iter); }
public override void AddItem(ITreeItem item) { var path = new Gtk.TreePath(); path.AppendIndex(Collection.Count); var iter = Handler.model.GetIterFromItem(item, path); Handler.tree.Model.EmitRowInserted(path, iter); }
public Gtk.TreePath GetPath(int index) { this.VerifyValidIndex(index); Gtk.TreePath path = new Gtk.TreePath(); path.AppendIndex(index); path.Owned = false; return(path); }
public Gtk.TreePath GetPath(Gtk.TreeIter iter) { var node = NodeFromIter(iter); var path = new Gtk.TreePath(); path.AppendIndex(node); return(path); }
public Gtk.TreePath GetPath(Gtk.TreeIter iter) { var row = GetRow(iter); var path = new Gtk.TreePath(); path.AppendIndex(row); return(path); }
public Gtk.TreePath GetPath(Gtk.TreeIter iter) { var node = NodeFromIter(iter); if (node == null) { throw new ArgumentException("iter"); } var path = new Gtk.TreePath(); path.AppendIndex(node.Row); return(path); }
private void HandleViewModelSelectionChangedCore(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { _updatingSelection = true; try { var selection = _romListView.Selection; switch (e.Action) { case System.Collections.Specialized.NotifyCollectionChangedAction.Add: case System.Collections.Specialized.NotifyCollectionChangedAction.Remove: case System.Collections.Specialized.NotifyCollectionChangedAction.Replace: if (e.NewItems != null) { foreach (ProgramDescriptionViewModel item in e.NewItems) { var index = ViewModel.Programs.IndexOf(item); var path = new Gtk.TreePath(); path.AppendIndex(index); selection.SelectPath(path); } } if (e.OldItems != null) { foreach (ProgramDescriptionViewModel item in e.OldItems) { var index = ViewModel.Programs.IndexOf(item); var path = new Gtk.TreePath(); path.AppendIndex(index); selection.UnselectPath(path); } } break; case System.Collections.Specialized.NotifyCollectionChangedAction.Reset: selection.UnselectAll(); break; case System.Collections.Specialized.NotifyCollectionChangedAction.Move: break; } } finally { _updatingSelection = false; } }
public override int GetRowIndexOfPath(Gtk.TreePath path) { var tempPath = new Gtk.TreePath(); int count = GetCount(Gtk.TreeIter.Zero, path.Indices[0]); // slow but works for now for (int i = 0; i < path.Indices.Length - 1; i++) { tempPath.AppendIndex(path.Indices[i]); Gtk.TreeIter iter; if (model.GetIter(out iter, tempPath)) { count += GetCount(iter, path.Indices[i + 1]); } } count += path.Indices.Length - 1; //count += path.Indices[row.Indices.Length - 1]; return(count); }
public Gtk.TreePath GetPath(int index) { this.VerifyValidIndex(index); Gtk.TreePath path = new Gtk.TreePath(); path.AppendIndex(index); path.Owned = false; return path; }
public Gtk.TreePath GetPath (Gtk.TreeIter iter) { var node = NodeFromIter (iter); if (node == null) throw new ArgumentException ("iter"); var path = new Gtk.TreePath (); path.AppendIndex (node.Row); return path; }