1#![allow(deprecated)]slint::slint!{#[include_path=r#"/input/slint/tests/driver/driverlib/../../cases/issues"#]
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
5component DialogBox inherits Rectangle {
6 callback show-dialog();
7
8 show-dialog() => {
9 dialog.show();
10 }
11
12 dialog := PopupWindow { }
13}
14
15export component TestCase inherits Window {
16 height: 30px;
17 width: 30px;
18 dialog := DialogBox { }
19 TouchArea {
20 clicked => {
21 dialog.show-dialog();
22 }
23 }
24}
25
26
27/*
28```cpp
29auto handle = TestCase::create();
30const TestCase &instance = *handle;
31slint_testing::send_mouse_click(&instance, 5., 5.);
32```
33
34```rust
35let instance = TestCase::new().unwrap();
36slint_testing::send_mouse_click(&instance, 5., 5.);
37```
38
39```js
40var instance = new slint.TestCase();
41slintlib.private_api.send_mouse_click(instance, 5., 5.);
42```
43*/
44}
45
46#[test] fn t_0() -> std::result::Result<(), std::boxed::Box<dyn std::error::Error>> {
47 use i_slint_backend_testing as slint_testing;
48 slint_testing::init();
49 let instance = TestCase::new().unwrap();
50 slint_testing::send_mouse_click(&instance, x:5., y:5.);
51 Ok(())
52}