mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 22:01:13 +00:00
Make it possible to use a string binding for Path commands
This was requested a few days ago in the chat and might also present an alternative for #754
This commit is contained in:
parent
ac031a45f8
commit
36e07b8801
11 changed files with 139 additions and 111 deletions
|
@ -37,6 +37,11 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
PathData(const SharedString &commands)
|
||||
: data(cbindgen_private::types::PathData::Commands(commands))
|
||||
{
|
||||
}
|
||||
|
||||
friend bool operator==(const PathData &a, const PathData &b)
|
||||
{
|
||||
if (a.data.tag != b.data.tag)
|
||||
|
@ -46,6 +51,8 @@ public:
|
|||
return a.data.elements._0 == b.data.elements._0;
|
||||
case cbindgen_private::types::PathData::Tag::Events:
|
||||
return a.data.events._0 == b.data.events._0 && b.data.events._0 == b.data.events._0;
|
||||
case cbindgen_private::types::PathData::Tag::Commands:
|
||||
return a.data.commands._0 == b.data.commands._0;
|
||||
case cbindgen_private::types::PathData::Tag::None:
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue