// Generated by SharpKit.QooxDoo.Generator
using System;
using System.Collections.Generic;
using SharpKit.Html;
using SharpKit.JavaScript;

namespace qx.ui.tree.core
{
    /// <summary>
	/// <para>Objects which are used as delegates for the qx.ui.tree.VirtualTree may
	/// implement any of the methods described in this interface. The delegate does
	/// not need to implement all the methods of this interface. If a method is not
	/// implemented the qx.ui.tree.VirtualTree provides a default
	/// implementation.</para>
	/// <para>Note: This interface is meant to document the delegate but should not be
	/// listed in the implement key of a class unless all methods are
	/// actually implemented.</para>
	/// </summary>
	public interface IVirtualTreeDelegate
    {
		#region Methods

		/// <summary>
		/// <para>Sets up the binding for the given widget cell and index.</para>
		/// <para>For every property you want to bind, use
		/// <see cref="MWidgetController.BindProperty"/> like this:
		/// 
		/// controller.bindProperty(null, &#8220;value&#8221;, options, item, id);
		/// </para>
		/// </summary>
		/// <param name="controller">The currently used controller.</param>
		/// <param name="item">The created and used item.</param>
		/// <param name="id">The id for the binding.</param>
		void BindItem(MWidgetController controller, qx.ui.core.Widget item, double id);

		/// <summary>
		/// <para>Gives the user the opportunity to set individual styles and properties
		/// on the widget cells created by the controller.</para>
		/// </summary>
		/// <param name="item">Item to modify.</param>
		void ConfigureItem(qx.ui.core.Widget item);

		/// <summary>
		/// <para>Creates a widget cell which will be used for rendering. Be sure to
		/// implement the <see cref="BindItem"/> function as well to get the needed
		/// properties bound.</para>
		/// </summary>
		/// <returns>A new created item cell.</returns>
		qx.ui.core.Widget CreateItem();

		/// <summary>
		/// <para>Filter checks the current data and returns a boolean if the data should
		/// appear in the filtered data set or not.</para>
		/// </summary>
		/// <param name="data">The data which will be checked.</param>
		/// <returns>True, if the data passes the filter, false otherwise.</returns>
		bool Filter(object data);

		/// <summary>
		/// <para>Gives the user the opportunity to reset properties or states.</para>
		/// </summary>
		/// <param name="item">Item to modify.</param>
		void OnPool(qx.ui.core.Widget item);

		/// <summary>
		/// <para>Gives the user the opportunity to sort the children items from a node.
		/// The sorting method should return a negative value if a < b, zero
		/// if a = b, or a positive value if a > b.</para>
		/// </summary>
		/// <param name="a">value to compare.</param>
		/// <param name="b">value to compare.</param>
		/// <returns>should return a negative value if a  b.</returns>
		double Sorter(object a, object b);

		#endregion Methods
    }
}