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