1#![allow(deprecated)]slint::slint!{#[include_path=r#"/input/slint/tests/driver/driverlib/../../cases/elements"#]
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
5import { StandardButton, Button, GridBox } from "std-widgets.slint";
6
7TestCase := Dialog {
8 Rectangle {
9 background: red;
10 preferred-width: 600px;
11 preferred-height: 600px;
12 }
13
14 StandardButton { kind: help; }
15 StandardButton { kind: ok; }
16 StandardButton { kind: cancel; }
17 StandardButton { kind: apply; }
18 StandardButton { kind: reset; }
19 StandardButton { kind: yes; }
20 Button {
21 text: "Action";
22 dialog-button-role: action;
23 }
24}
25
26/*
27```rust
28let instance = TestCase::new().unwrap();
29instance.on_help_clicked(|| { dbg!() });
30instance.on_cancel_clicked(|| { dbg!() });
31```
32
33```cpp
34auto handle = TestCase::create();
35const TestCase &instance = *handle;
36instance.on_help_clicked([] { });
37instance.on_cancel_clicked([] { });
38```
39
40*/
41}
42
43#[test] fn t_0() -> std::result::Result<(), std::boxed::Box<dyn std::error::Error>> {
44 use i_slint_backend_testing as slint_testing;
45 slint_testing::init();
46 let instance = TestCase::new().unwrap();
47 instance.on_help_clicked(|| { dbg!() });
48 instance.on_cancel_clicked(|| { dbg!() });
49 Ok(())
50}