1#![allow(deprecated)]slint::slint!{#[include_path=r#"/input/slint/tests/driver/driverlib/../../cases/exports"#]
2// Copyright © SixtyFPS GmbH <info@slint.dev>
3// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial
4
5//cpp-namespace: my::ui
6//ignore: rust,js
7struct TestStruct {
8 condition: bool,
9}
10
11enum TestEnum {
12 A,
13 B,
14 C
15}
16
17export component TestCase inherits Rectangle {
18 in-out property <TestStruct> test_struct;
19 in-out property <TestEnum> test_enum;
20}
21
22/*
23```cpp
24auto handle = my::ui::TestCase::create();
25const my::ui::TestCase &instance = *handle;
26my::ui::TestStruct test_struct {.condition = false};
27test_struct.condition = true;
28instance.set_test_struct(test_struct);
29assert(instance.get_test_struct() == test_struct);
30instance.set_test_enum(my::ui::TestEnum::A);
31auto test_enum = instance.get_test_enum();
32test_enum = my::ui::TestEnum::B;
33instance.set_test_enum(test_enum);
34assert(instance.get_test_enum() == my::ui::TestEnum::B);
35```
36
37*/}
38