1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (is_type_of = | _ | false , extends = :: js_sys :: Object , js_name = TreeView , typescript_type = "TreeView")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `TreeView` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeView)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `TreeView`*"]
14 pub type TreeView;
15 # [wasm_bindgen (structural , method , getter , js_class = "TreeView" , js_name = rowCount)]
16 #[doc = "Getter for the `rowCount` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeView/rowCount)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `TreeView`*"]
21 pub fn row_count(this: &TreeView) -> i32;
22 #[cfg(feature = "DataTransfer")]
23 # [wasm_bindgen (catch , method , structural , js_class = "TreeView" , js_name = canDrop)]
24 #[doc = "The `canDrop()` method."]
25 #[doc = ""]
26 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeView/canDrop)"]
27 #[doc = ""]
28 #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `TreeView`*"]
29 pub fn can_drop(
30 this: &TreeView,
31 row: i32,
32 orientation: i32,
33 data_transfer: Option<&DataTransfer>,
34 ) -> Result<bool, JsValue>;
35 #[cfg(feature = "DataTransfer")]
36 # [wasm_bindgen (catch , method , structural , js_class = "TreeView" , js_name = drop)]
37 #[doc = "The `drop()` method."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeView/drop)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `TreeView`*"]
42 pub fn drop(
43 this: &TreeView,
44 row: i32,
45 orientation: i32,
46 data_transfer: Option<&DataTransfer>,
47 ) -> Result<(), JsValue>;
48 # [wasm_bindgen (catch , method , structural , js_class = "TreeView" , js_name = getLevel)]
49 #[doc = "The `getLevel()` method."]
50 #[doc = ""]
51 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeView/getLevel)"]
52 #[doc = ""]
53 #[doc = "*This API requires the following crate features to be activated: `TreeView`*"]
54 pub fn get_level(this: &TreeView, row: i32) -> Result<i32, JsValue>;
55 # [wasm_bindgen (catch , method , structural , js_class = "TreeView" , js_name = getParentIndex)]
56 #[doc = "The `getParentIndex()` method."]
57 #[doc = ""]
58 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeView/getParentIndex)"]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `TreeView`*"]
61 pub fn get_parent_index(this: &TreeView, row: i32) -> Result<i32, JsValue>;
62 # [wasm_bindgen (catch , method , structural , js_class = "TreeView" , js_name = getRowProperties)]
63 #[doc = "The `getRowProperties()` method."]
64 #[doc = ""]
65 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeView/getRowProperties)"]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `TreeView`*"]
68 pub fn get_row_properties(
69 this: &TreeView,
70 row: i32,
71 ) -> Result<::alloc::string::String, JsValue>;
72 # [wasm_bindgen (catch , method , structural , js_class = "TreeView" , js_name = hasNextSibling)]
73 #[doc = "The `hasNextSibling()` method."]
74 #[doc = ""]
75 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeView/hasNextSibling)"]
76 #[doc = ""]
77 #[doc = "*This API requires the following crate features to be activated: `TreeView`*"]
78 pub fn has_next_sibling(this: &TreeView, row: i32, after_index: i32) -> Result<bool, JsValue>;
79 # [wasm_bindgen (catch , method , structural , js_class = "TreeView" , js_name = isContainer)]
80 #[doc = "The `isContainer()` method."]
81 #[doc = ""]
82 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeView/isContainer)"]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `TreeView`*"]
85 pub fn is_container(this: &TreeView, row: i32) -> Result<bool, JsValue>;
86 # [wasm_bindgen (catch , method , structural , js_class = "TreeView" , js_name = isContainerEmpty)]
87 #[doc = "The `isContainerEmpty()` method."]
88 #[doc = ""]
89 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeView/isContainerEmpty)"]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `TreeView`*"]
92 pub fn is_container_empty(this: &TreeView, row: i32) -> Result<bool, JsValue>;
93 # [wasm_bindgen (catch , method , structural , js_class = "TreeView" , js_name = isContainerOpen)]
94 #[doc = "The `isContainerOpen()` method."]
95 #[doc = ""]
96 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeView/isContainerOpen)"]
97 #[doc = ""]
98 #[doc = "*This API requires the following crate features to be activated: `TreeView`*"]
99 pub fn is_container_open(this: &TreeView, row: i32) -> Result<bool, JsValue>;
100 # [wasm_bindgen (catch , method , structural , js_class = "TreeView" , js_name = isSeparator)]
101 #[doc = "The `isSeparator()` method."]
102 #[doc = ""]
103 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeView/isSeparator)"]
104 #[doc = ""]
105 #[doc = "*This API requires the following crate features to be activated: `TreeView`*"]
106 pub fn is_separator(this: &TreeView, row: i32) -> Result<bool, JsValue>;
107 # [wasm_bindgen (method , structural , js_class = "TreeView" , js_name = isSorted)]
108 #[doc = "The `isSorted()` method."]
109 #[doc = ""]
110 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeView/isSorted)"]
111 #[doc = ""]
112 #[doc = "*This API requires the following crate features to be activated: `TreeView`*"]
113 pub fn is_sorted(this: &TreeView) -> bool;
114 # [wasm_bindgen (method , structural , js_class = "TreeView" , js_name = performAction)]
115 #[doc = "The `performAction()` method."]
116 #[doc = ""]
117 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeView/performAction)"]
118 #[doc = ""]
119 #[doc = "*This API requires the following crate features to be activated: `TreeView`*"]
120 pub fn perform_action(this: &TreeView, action: &str);
121 # [wasm_bindgen (method , structural , js_class = "TreeView" , js_name = performActionOnRow)]
122 #[doc = "The `performActionOnRow()` method."]
123 #[doc = ""]
124 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeView/performActionOnRow)"]
125 #[doc = ""]
126 #[doc = "*This API requires the following crate features to be activated: `TreeView`*"]
127 pub fn perform_action_on_row(this: &TreeView, action: &str, row: i32);
128 # [wasm_bindgen (method , structural , js_class = "TreeView" , js_name = selectionChanged)]
129 #[doc = "The `selectionChanged()` method."]
130 #[doc = ""]
131 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeView/selectionChanged)"]
132 #[doc = ""]
133 #[doc = "*This API requires the following crate features to be activated: `TreeView`*"]
134 pub fn selection_changed(this: &TreeView);
135 #[cfg(feature = "TreeBoxObject")]
136 # [wasm_bindgen (catch , method , structural , js_class = "TreeView" , js_name = setTree)]
137 #[doc = "The `setTree()` method."]
138 #[doc = ""]
139 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeView/setTree)"]
140 #[doc = ""]
141 #[doc = "*This API requires the following crate features to be activated: `TreeBoxObject`, `TreeView`*"]
142 pub fn set_tree(this: &TreeView, tree: Option<&TreeBoxObject>) -> Result<(), JsValue>;
143 # [wasm_bindgen (catch , method , structural , js_class = "TreeView" , js_name = toggleOpenState)]
144 #[doc = "The `toggleOpenState()` method."]
145 #[doc = ""]
146 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/TreeView/toggleOpenState)"]
147 #[doc = ""]
148 #[doc = "*This API requires the following crate features to be activated: `TreeView`*"]
149 pub fn toggle_open_state(this: &TreeView, row: i32) -> Result<(), JsValue>;
150}
151impl TreeView {
152 #[doc = "The `TreeView.DROP_BEFORE` const."]
153 #[doc = ""]
154 #[doc = "*This API requires the following crate features to be activated: `TreeView`*"]
155 pub const DROP_BEFORE: i16 = -1i64 as i16;
156 #[doc = "The `TreeView.DROP_ON` const."]
157 #[doc = ""]
158 #[doc = "*This API requires the following crate features to be activated: `TreeView`*"]
159 pub const DROP_ON: i16 = 0i64 as i16;
160 #[doc = "The `TreeView.DROP_AFTER` const."]
161 #[doc = ""]
162 #[doc = "*This API requires the following crate features to be activated: `TreeView`*"]
163 pub const DROP_AFTER: i16 = 1u64 as i16;
164}