44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
|
|
#nullable enable
|
||
|
|
using Gpm.Ui;
|
||
|
|
using System;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
|
||
|
|
namespace UVC.UI.List.Tree
|
||
|
|
{
|
||
|
|
public class TreeListItemData : InfiniteScrollData
|
||
|
|
{
|
||
|
|
/// <summary>
|
||
|
|
/// 일반 아이템 이름
|
||
|
|
/// </summary>
|
||
|
|
public string generalName = string.Empty;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 일반 아이템 옵션
|
||
|
|
/// </summary>
|
||
|
|
public string generalOption = string.Empty;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 자식 확장 여부
|
||
|
|
/// </summary>
|
||
|
|
internal bool isExpanded = false;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 카테고리 확장/축소 버튼 클릭 시 호출될 액션입니다.
|
||
|
|
/// </summary>
|
||
|
|
public Action<TreeListItemData>? OnClickAction;
|
||
|
|
|
||
|
|
internal List<TreeListItemData> children = new List<TreeListItemData>();
|
||
|
|
|
||
|
|
public TreeListItemData() { }
|
||
|
|
|
||
|
|
public TreeListItemData(string generalName, List<TreeListItemData>? childrenItemData = null)
|
||
|
|
{
|
||
|
|
this.generalName = generalName;
|
||
|
|
if (childrenItemData != null)
|
||
|
|
{
|
||
|
|
this.children = childrenItemData;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|