using UnityEditor.IMGUI.Controls;
using UnityEngine;
namespace AlicizaX.EditorExtension.Editor
{
///
/// 表格视图列元素
///
/// 数据类型
public sealed class TableColumn : MultiColumnHeaderState.Column where T : class, new()
{
///
/// 绘制列元素的方法
///
public DrawCellMethod DrawCell;
///
/// 对比列元素的方法
///
public CompareMethod Compare;
}
///
/// 绘制列元素的方法
///
/// 数据类型
/// 绘制区域
/// 绘制数据
/// 在表格中的行索引
/// 是否选中
/// 是否焦点
public delegate void DrawCellMethod(Rect cellRect, T data, int rowIndex, bool isSelected, bool isFocused);
///
/// 对比列元素的方法
///
/// 数据类型
/// 数据1
/// 数据2
/// 排序号
public delegate int CompareMethod(T data1, T data2);
}