<commit_before>// NodeView.cs - a TreeView implementation that exposes ITreeNodes
//
// Author: <NAME> (<EMAIL>)
//
// Copyright (c) 2004 Novell, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General 
// Public License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.

namespace Gtk {

	using System;
	using System.Collections;
	using System.Reflection;
	using System.Runtime.InteropServices;

	public class NodeView : TreeView {

		NodeStore store;
		NodeSelection selection;

		public NodeView (NodeStore store) : base (store == null ? null : store.Adapter)
		{
			this.store = store;
		}

		public NodeView () : base () {}

		public NodeStore NodeStore {
			get {
				return store;
			}
			set {
				store = value;
				this.Model = store == null ? null : store.Adapter;
			}
		}

		public NodeSelection NodeSelection { 
			get {
				if (selection == null)
					selection = new NodeSelection (Selection);
				return selection;
			}
		}

		public Gtk.TreeViewColumn AppendColumn (string title, Gtk.CellRenderer cell, Gtk.NodeCellDataFunc cell_data) 
		{
			Gtk.TreeViewColumn col = new Gtk.TreeViewColumn ();
			col.Title = title;
			col.PackStart (cell, true);
			col.SetCellDataFunc (cell, cell_data);
			
			AppendColumn (col);
			return col;
		}
		
		public void ActivateRow (ITreeNode node, Gtk.TreeViewColumn column) {
			ActivateRow (store.GetPath (node), column);
		}
		
		public bool CollapseRow (ITreeNode node) {
			return CollapseRow (store.GetPath (node));
		}
		
#if FIXME30
		public Gdk.Pixmap CreateRowDragIcon (ITreeNode node) {
			return CreateRowDragIcon (store.GetPath (node));
		}
#endif
		
		public Gdk.Rectangle GetBackgroundArea (ITreeNode node, Gtk.TreeViewColumn column) {
			return GetBackgroundArea (store.GetPath (node), column);
		}
		
		public Gdk.Rectangle GetCellArea (ITreeNode node, Gtk.TreeViewColumn column) {
			return GetBackgroundArea (store.GetPath (node), column);
		}
		
		public ITreeNode GetNodeAtPos (int x, int y) {
			Gtk.TreePath nodePath;
			ITreeNode node = null;
			
			if (this.GetPathAtPos (x, y, out nodePath))
				node = store.GetNode (nodePath);
			
			return node;
		}
		
		public bool GetRowExpanded (ITreeNode node) {
			return GetRowExpanded (store.GetPath (node));
		}

		public bool GetVisibleRange (out ITreeNode startNode, out ITreeNode endNode) {
			Gtk.TreePath start_path, end_path;
			bool retVal = GetVisibleRange (out start_path, out end_path);
			if (retVal) {
				startNode = store.GetNode (start_path);
				endNode = store.GetNode (end_path);
			}
			else {
				startNode = null;
				endNode = null;
			}
			
			return retVal;
		}
		
		public void ScrollToCell (ITreeNode node, TreeViewColumn column, bool use_align, float row_align, float col_align) {
			ScrollToCell (store.GetPath (node),  column,  use_align,  row_align,  col_align);
		}
		
		public void SetTooltipCell (Tooltip tooltip, ITreeNode node, TreeViewColumn column, CellRenderer renderer) {
			SetTooltipCell (tooltip,  store.GetPath (node),  column,  renderer);
		}

		public void ExpandRow (ITreeNode node, bool open_all) {
			ExpandRow (store.GetPath (node), open_all);
		}

		public void ExpandToNode (ITreeNode node) {
			ExpandToPath (store.GetPath (node));
		}
	}
}

<commit_msg>gtk: Re-enable NodeView.CreateRowDragIcon method<commit_after>// NodeView.cs - a TreeView implementation that exposes ITreeNodes
//
// Author: <NAME> (<EMAIL>)
//
// Copyright (c) 2004 Novell, Inc.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of version 2 of the Lesser GNU General 
// Public License as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.

namespace Gtk {

	using System;
	using System.Collections;
	using System.Reflection;
	using System.Runtime.InteropServices;

	public class NodeView : TreeView {

		NodeStore store;
		NodeSelection selection;

		public NodeView (NodeStore store) : base (store == null ? null : store.Adapter)
		{
			this.store = store;
		}

		public NodeView () : base () {}

		public NodeStore NodeStore {
			get {
				return store;
			}
			set {
				store = value;
				this.Model = store == null ? null : store.Adapter;
			}
		}

		public NodeSelection NodeSelection { 
			get {
				if (selection == null)
					selection = new NodeSelection (Selection);
				return selection;
			}
		}

		public Gtk.TreeViewColumn AppendColumn (string title, Gtk.CellRenderer cell, Gtk.NodeCellDataFunc cell_data) 
		{
			Gtk.TreeViewColumn col = new Gtk.TreeViewColumn ();
			col.Title = title;
			col.PackStart (cell, true);
			col.SetCellDataFunc (cell, cell_data);
			
			AppendColumn (col);
			return col;
		}
		
		public void ActivateRow (ITreeNode node, Gtk.TreeViewColumn column) {
			ActivateRow (store.GetPath (node), column);
		}
		
		public bool CollapseRow (ITreeNode node) {
			return CollapseRow (store.GetPath (node));
		}
		
		public Cairo.Surface CreateRowDragIcon (ITreeNode node) {
			return CreateRowDragIcon (store.GetPath (node));
		}
		
		public Gdk.Rectangle GetBackgroundArea (ITreeNode node, Gtk.TreeViewColumn column) {
			return GetBackgroundArea (store.GetPath (node), column);
		}
		
		public Gdk.Rectangle GetCellArea (ITreeNode node, Gtk.TreeViewColumn column) {
			return GetBackgroundArea (store.GetPath (node), column);
		}
		
		public ITreeNode GetNodeAtPos (int x, int y) {
			Gtk.TreePath nodePath;
			ITreeNode node = null;
			
			if (this.GetPathAtPos (x, y, out nodePath))
				node = store.GetNode (nodePath);
			
			return node;
		}
		
		public bool GetRowExpanded (ITreeNode node) {
			return GetRowExpanded (store.GetPath (node));
		}

		public bool GetVisibleRange (out ITreeNode startNode, out ITreeNode endNode) {
			Gtk.TreePath start_path, end_path;
			bool retVal = GetVisibleRange (out start_path, out end_path);
			if (retVal) {
				startNode = store.GetNode (start_path);
				endNode = store.GetNode (end_path);
			}
			else {
				startNode = null;
				endNode = null;
			}
			
			return retVal;
		}
		
		public void ScrollToCell (ITreeNode node, TreeViewColumn column, bool use_align, float row_align, float col_align) {
			ScrollToCell (store.GetPath (node),  column,  use_align,  row_align,  col_align);
		}
		
		public void SetTooltipCell (Tooltip tooltip, ITreeNode node, TreeViewColumn column, CellRenderer renderer) {
			SetTooltipCell (tooltip,  store.GetPath (node),  column,  renderer);
		}

		public void ExpandRow (ITreeNode node, bool open_all) {
			ExpandRow (store.GetPath (node), open_all);
		}

		public void ExpandToNode (ITreeNode node) {
			ExpandToPath (store.GetPath (node));
		}
	}
}


{'fraction_non_alphanumeric': 0.09411609845991839, 'fraction_numerical': 0.005265236277477952, 'mean_word_length': 3.4200116346713205, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '569534', 'n_tokens_mistral': 2735, 'n_tokens_neox': 2317, 'n_words': 768}