(&self, expanded: bool)
| 943 | } |
| 944 | |
| 945 | fn set_expanded(&self, expanded: bool) -> Result<()> { |
| 946 | self.do_complex_action(|node, target_node, target_tree| { |
| 947 | if node.is_disabled() { |
| 948 | return Err(element_not_enabled()); |
| 949 | } |
| 950 | let Some(current) = node.data().is_expanded() else { |
| 951 | return Err(invalid_operation()); |
| 952 | }; |
| 953 | if current == expanded { |
| 954 | return Err(invalid_operation()); |
| 955 | } |
| 956 | Ok(Some(ActionRequest { |
| 957 | action: if expanded { |
| 958 | Action::Expand |
| 959 | } else { |
| 960 | Action::Collapse |
| 961 | }, |
| 962 | target_tree, |
| 963 | target_node, |
| 964 | data: None, |
| 965 | })) |
| 966 | }) |
| 967 | } |
| 968 | |
| 969 | fn set_selected(&self, selected: bool) -> Result<()> { |
| 970 | self.do_complex_action(|node, target_node, target_tree| { |
nothing calls this directly
no test coverage detected