mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-21 15:52:19 +00:00

Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
36 lines
No EOL
911 B
Text
36 lines
No EOL
911 B
Text
// Copyright © SixtyFPS GmbH <info@slint.dev>
|
|
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
|
|
|
|
//cpp-namespace: my::ui
|
|
//ignore: rust,js
|
|
struct TestStruct {
|
|
condition: bool,
|
|
}
|
|
|
|
enum TestEnum {
|
|
A,
|
|
B,
|
|
C
|
|
}
|
|
|
|
export component TestCase inherits Rectangle {
|
|
in-out property <TestStruct> test_struct;
|
|
in-out property <TestEnum> test_enum;
|
|
}
|
|
|
|
/*
|
|
```cpp
|
|
auto handle = my::ui::TestCase::create();
|
|
const my::ui::TestCase &instance = *handle;
|
|
my::ui::TestStruct test_struct {.condition = false};
|
|
test_struct.condition = true;
|
|
instance.set_test_struct(test_struct);
|
|
assert(instance.get_test_struct() == test_struct);
|
|
instance.set_test_enum(my::ui::TestEnum::A);
|
|
auto test_enum = instance.get_test_enum();
|
|
test_enum = my::ui::TestEnum::B;
|
|
instance.set_test_enum(test_enum);
|
|
assert(instance.get_test_enum() == my::ui::TestEnum::B);
|
|
```
|
|
|
|
*/ |