MCPcopy Create free account
hub / github.com/AccessKit/accesskit / set_expanded

Method set_expanded

platforms/windows/src/node.rs:945–967  ·  view source on GitHub ↗
(&self, expanded: bool)

Source from the content-addressed store, hash-verified

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| {

Callers

nothing calls this directly

Calls 5

element_not_enabledFunction · 0.85
invalid_operationFunction · 0.85
do_complex_actionMethod · 0.80
is_disabledMethod · 0.80
dataMethod · 0.80

Tested by

no test coverage detected