| 1 | // Copyright © SixtyFPS GmbH <info@slint.dev> |
| 2 | // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 |
| 3 | |
| 4 | //include_path: ../../helper_components |
| 5 | import { ExportedStruct, ExportEnum } from "export_structs.slint" ; |
| 6 | export { ExportedStruct as NamedStruct, ExportEnum as NamedEnum } |
| 7 | component TestCase inherits Rectangle { |
| 8 | in-out property<ExportedStruct> st; |
| 9 | in-out property<ExportEnum> en: ExportEnum.Bonjour; |
| 10 | } |
| 11 | export { TestCase as NamedTestCase } |
| 12 | |
| 13 | /* |
| 14 | |
| 15 | ```cpp |
| 16 | auto handle = NamedTestCase::create(); |
| 17 | const TestCase &instance = *handle; |
| 18 | assert(instance.get_en() == NamedEnum::Bonjour); |
| 19 | ``` |
| 20 | |
| 21 | ```rust |
| 22 | let instance = NamedTestCase::new().unwrap(); |
| 23 | assert_eq!(instance.get_en(), NamedEnum::Bonjour); |
| 24 | ``` |
| 25 | |
| 26 | */ |
| 27 | |