1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use crate::{
widgets::{NcTreeItem, NcTreeItemCbUnsafe, NcTreeOptions},
NcDim,
};
#[allow(unused_imports)]
use crate::widgets::NcTree;
impl NcTreeOptions {
pub fn new(items: &[NcTreeItem], indentcols: NcDim) -> Self {
Self::with_all_args(items, items.len(), None, indentcols, 0)
}
pub fn with_all_args(
items: &[NcTreeItem],
count: usize,
nctreecb: Option<NcTreeItemCbUnsafe>,
indentcols: NcDim,
flags: u64,
) -> Self {
Self {
items: items as *const _ as *const NcTreeItem,
count: count as u32,
nctreecb,
indentcols: indentcols as i32,
flags,
}
}
}