mirror of
https://github.com/slint-ui/slint.git
synced 2025-07-12 07:35:18 +00:00
Add the accessible-read-only
property
This commit is contained in:
parent
e5c27d57ca
commit
cc91de2d38
18 changed files with 60 additions and 1 deletions
|
@ -394,6 +394,7 @@ public:
|
|||
}
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
/// Returns the accessible-expandable of that element, if any.
|
||||
std::optional<bool> accessible_expandable() const
|
||||
{
|
||||
|
@ -407,6 +408,19 @@ public:
|
|||
return std::nullopt;
|
||||
}
|
||||
|
||||
/// Returns the accessible-read-only of that element, if any.
|
||||
std::optional<bool> accessible_read_only() const
|
||||
{
|
||||
if (auto result = get_accessible_string_property(
|
||||
cbindgen_private::AccessibleStringProperty::ReadOnly)) {
|
||||
if (*result == "true")
|
||||
return true;
|
||||
else if (*result == "false")
|
||||
return false;
|
||||
}
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
/// Invokes the expand accessibility action of that element
|
||||
/// (`accessible-action-expand`).
|
||||
void invoke_accessible_expand_action() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue