mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 02:39:28 +00:00
Add the accessible-enabled
property
This commit is contained in:
parent
129936a7d7
commit
2de3b9d455
51 changed files with 80 additions and 1 deletions
|
@ -231,6 +231,19 @@ public:
|
|||
return get_accessible_string_property(cbindgen_private::AccessibleStringProperty::Label);
|
||||
}
|
||||
|
||||
/// Returns the accessible-enabled of that element, if any.
|
||||
std::optional<bool> accessible_enabled() const
|
||||
{
|
||||
if (auto result = get_accessible_string_property(
|
||||
cbindgen_private::AccessibleStringProperty::Enabled)) {
|
||||
if (*result == "true")
|
||||
return true;
|
||||
else if (*result == "false")
|
||||
return false;
|
||||
}
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
/// Returns the accessible-value of that element, if any.
|
||||
std::optional<SharedString> accessible_value() const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue