mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
Add C++ API for ComponentDefinition::properties()
This commit is contained in:
parent
342f77139b
commit
70653ec7cd
3 changed files with 47 additions and 0 deletions
|
@ -580,6 +580,8 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
using PropertyDescriptor = sixtyfps::cbindgen_private::PropertyDescriptor;
|
||||
|
||||
/// ComponentDefinition is a representation of a compiled component from .60 markup.
|
||||
///
|
||||
/// It can be constructed from a .60 file using the ComponentCompiler::build_from_path() or
|
||||
|
@ -632,6 +634,16 @@ public:
|
|||
cbindgen_private::sixtyfps_interpreter_component_instance_create(&inner, &u.i);
|
||||
return u.result;
|
||||
}
|
||||
|
||||
/// Returns a vector of that contains PropertyDescriptor instances that describe the list of
|
||||
/// public properties that can be read and written using ComponentInstance::set_property and
|
||||
/// ComponentInstance::get_property.
|
||||
sixtyfps::SharedVector<PropertyDescriptor> properties() const
|
||||
{
|
||||
sixtyfps::SharedVector<PropertyDescriptor> props;
|
||||
cbindgen_private::sixtyfps_interpreter_component_definition_properties(&inner, &props);
|
||||
return props;
|
||||
}
|
||||
};
|
||||
|
||||
using Diagnostic = sixtyfps::cbindgen_private::CDiagnostic;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue